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.
| Author |
Topic |
|
PJ
Starting Member
1 Post |
Posted - 2004-12-13 : 18:18:44
|
| I'm trying to find a way to declare a list of integers that I can than use in a "IN" Statement. Is this possible? I've tried varchar and a few others but there is a conversion problem. If anybody knows if this can be done please let me know, otherwise I'll just create a temp table to house the program ID's or something.ie.DECLARE @ProgramID (some data type)SET @ProgramID = '1, 2'select distinct program_idfrom MAILING_LISTWHERE program_id IN (ProgramID)note: program_id is an INT field |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-12-13 : 18:21:36
|
| http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=20675Tara |
 |
|
|
|
|
|