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 |
|
mahimam_2004
Starting Member
40 Posts |
Posted - 2006-12-15 : 11:22:19
|
| Now Iam using the @State in IN clauseLike select ID from Organization where Name IN(@State)But it is not producing the result.Why?How to use the @state in 'IN' |
|
|
mahimam_2004
Starting Member
40 Posts |
Posted - 2006-12-15 : 11:24:05
|
| Hi,In the above @state is coming from the following statementdeclare @state varchar(100),@st varchar(100)set @state='NY,VA,AL,CA'--select REPLACE ( @state , ',' , ''',''' )select @state=''''+REPLACE ( @state , ',' , ''',''' )+''''print @st |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|