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 |
|
lavani
Starting Member
2 Posts |
Posted - 2009-04-29 : 01:56:24
|
| Hi, i have a table "LOOKUP". i want to query this table using a dynamic IN clause like belowSelect name_cd,rank from LOOKUP where rank =(select min(rank) from LOOKUP where name_cd IN('A','B').My question is, instead of 'A' and 'B' i have to use variables dynamically from my program which used DCLGEN variables.how do i fetch my rows now? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-04-29 : 02:07:32
|
Are you using SQL Server 2005 or DB2 ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
lavani
Starting Member
2 Posts |
Posted - 2009-04-29 : 02:11:38
|
| Am using DB2 |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-04-29 : 02:18:29
|
you do notice that this is a Microsoft SQL Server forum right ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-04-29 : 02:49:01
|
| Try at www.dbforums.comMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|