Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Query Parser

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-03-04 : 07:27:38
Deepak writes "Hi,

I have a expression like - 'C and UNIX and WINDOWS or MAC', with this expression i should generate a SQL Query like, "Select * from table where Language = C AND Language = UNIX AND Language = WINDOWS OR Language = MAC".

Now the problem is how to parse the expression and generate SQL Query."

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-03-04 : 07:38:25
quote:

I have a expression like - 'C and UNIX and WINDOWS or MAC', with this expression i should generate a SQL Query like, "Select * from table where Language = C AND Language = UNIX AND Language = WINDOWS OR Language = MAC".



Note that the sentence you gave does not translate into a query like you gave. No row will ever have two values in the same column (in your example, Language = to C and to UNIX) so the query you gave as an example will always fail.

Give us a little more detail about the data you are querying and someone may be able to help out.

- Jeff
Go to Top of Page
   

- Advertisement -