Unix Technical Forum

Re: SQL works in Access but not in SQL Server 2000 ! Why?

This is a discussion on Re: SQL works in Access but not in SQL Server 2000 ! Why? within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi & is not a valid operator to concatenate strings. Try using + John "Learning" <question_asp@yahoo.com> wrote in message ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:11 PM
John Bell
 
Posts: n/a
Default Re: SQL works in Access but not in SQL Server 2000 ! Why?

Hi

& is not a valid operator to concatenate strings. Try using +

John


"Learning" <question_asp@yahoo.com> wrote in message
news:99a92f8.0307191244.1ce72a90@posting.google.co m...
> I am new to MS SQL Server. I have SELECT statement which works fine
> using Access 2000 but when I try to use this in SQL Server 2000 I get
> error.
>
> Statement works fine in Access 2000:
>
> SELECT Field1, Field2
> FROM Table
> WHERE Field1 & Field2 LIKE '%keyword1%' AND Field1 & Field2 LIKE
> '%keyword2%'
>
> Error I get using SQL Server 2000:
>
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid operator for
> data type. Operator equals boolean AND, type equals float.
>
> Does anyone know how to fix this? I would really appreciate your help.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:12 PM
Learning
 
Posts: n/a
Default Re: SQL works in Access but not in SQL Server 2000 ! Why?

"John Bell" <jbellnewsposts@hotmail.com> wrote in message news:<3f19d003$0$2870$afc38c87@news.easynet.co.uk> ...
> Hi
>
> & is not a valid operator to concatenate strings. Try using +
>
> John
>
>
> "Learning" <question_asp@yahoo.com> wrote in message
> news:99a92f8.0307191244.1ce72a90@posting.google.co m...
> > I am new to MS SQL Server. I have SELECT statement which works fine
> > using Access 2000 but when I try to use this in SQL Server 2000 I get
> > error.
> >
> > Statement works fine in Access 2000:
> >
> > SELECT Field1, Field2
> > FROM Table
> > WHERE Field1 & Field2 LIKE '%keyword1%' AND Field1 & Field2 LIKE
> > '%keyword2%'
> >
> > Error I get using SQL Server 2000:
> >
> > Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> > [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid operator for
> > data type. Operator equals boolean AND, type equals float.
> >
> > Does anyone know how to fix this? I would really appreciate your help.



Thanks that works fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:35 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com