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)
 select function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-18 : 10:50:59
siraj writes "Hi Team,

i'm really poor in writing sql statements.
now i want to retrive data's from a particular column in a table
with the search expression of 200 row id's

i wrote the query like this,

select (column name) from (table) where row_id = '1-e2wh',...'1-as2fh'

but i got the error incorrect syntax near ','

please help me out.

thanks in advance.

siraj"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-18 : 10:53:57
That should be

select column_name from table where row_id in ( '1-e2wh','1-as2fh',etc)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -