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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-08-19 : 09:06:13
|
| Mary writes "This problem has raised it's head a few times. Usually I solve it in ASP, but I think using SQL Server, being what is, there must be a workaround.ASP code handles the addition of a TEST. Each test can have >=0 CHEMICALS. I retrieve them via ASP in a comma delimited string. Usually in the ASP I split this string and loop through the array : 1. Checking if this is a new chemical2. Inserting it as new if not existing3. Associating the test with the chemical in the bridge tableIs there a more efficient way of doing this using SQL Server functionality? A user defined function, perhaps?1. You can't loop in SQL Server sproc?2. You can't pass an array, can you?3. If answer to 2 is no, how would split the comma delimited string in a sproc?So basically I want to know can you handle arrays in SQL Server sproc?And likewise can you split comma delimited strings?thanks,Mary" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
|
|
|