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 |
|
shebert
Yak Posting Veteran
85 Posts |
Posted - 2010-02-25 : 10:25:19
|
| So I have a programmer that wants me to build a procedure to accept data that is inconsistent.depending what happens on a test station he would like to run a procedure against sql like this: sp_add_pacakge '12,15,35', 'yes,no,yes', 'blue,red,green'then have the procedure populate table called like test_resultwith three columns ID,PASS,COLOR12 yes blue15 no red35 yes greenPlease help |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-25 : 10:32:10
|
| not a good approach. better to pass a single string value like belowsp_add_pacakge '12,yes,blue;15,no,red;35,yes,green'and then insert them to various rows of table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
shebert
Yak Posting Veteran
85 Posts |
Posted - 2010-02-25 : 10:55:40
|
| OK But when data is passes like this how do you handle it with sql code?12,no,blue;13,yes,redSteve |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
shebert
Yak Posting Veteran
85 Posts |
Posted - 2010-02-25 : 11:31:09
|
| Thanks A BUNCH |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-25 : 11:31:44
|
welcome ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|