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
 Transact-SQL (2000)
 Return multiple records with one select command

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-06-13 : 08:53:48
David writes "How can I return multiple records with one select command? I need to do return a series of records based on different criteria in a list. Something like:

Select * from TABLE where FIELD = 123456789, 246810121, 369114151, etc...

Suggestions?

DS"

Kristen
Test

22859 Posts

Posted - 2006-06-13 : 08:55:07
This perhaps?

Select *
from TABLE
where FIELD IN (123456789, 246810121, 369114151, ...)

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-13 : 08:55:14
Refer this
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm

Madhivanan

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

- Advertisement -