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 |
|
NewCents
Starting Member
19 Posts |
Posted - 2006-01-16 : 18:42:12
|
| I have a listbox where the user can choose from 1 to n countries. What would be the best way to pass the countries the user has selected to SQL?Thank you for any help |
|
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2006-01-16 : 18:44:22
|
| You could pass in a comma separated value string into your stored procedure and split the string using a user defined function. |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-01-16 : 18:52:20
|
| see thishttp://sqlteam.com/forums/topic.asp?TOPIC_ID=50648 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-17 : 01:09:13
|
| If you want to select the records that have selected countries, thenSelect columns from yourTable where ','+CountryCol+',' like '%,'+@CSV+',%'Also search for Where in @MYCSV in this topichttp://sqlteam.com/forums/topic.asp?TOPIC_ID=55210MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|