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 |
haroon2k9
Constraint Violating Yak Guru
328 Posts |
Posted - 2010-11-09 : 02:05:36
|
Let say,i have a TABLEA,2 fieldsid(primarykey,auto gen)casename (varchar)Add Logic:if i passs the param as test to the TAbleA and param2 as 100;200;300PLEASE see the table below and this scope identity of tableA,passed to the TableB OF Id Column and userid splitted by ; and inserted like of TableB..PLEASE see TableBTABLEAID CASENAME1 TESTTABLEB:PKID ID USERID1 1 1002 1 2003 1 300i mean if userid passed as single then 1 record to be inserted else spllitted by ; and insertion..... |
|
Sachin.Nand
2937 Posts |
Posted - 2010-11-09 : 02:16:38
|
It's difficult to understand what you want.PBUH |
 |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-11-09 : 02:27:55
|
What i understand is that you are going to insert the data through stored procedure. The SP have two parameters.The first parameter will go in TableA and SecondParameter will go in TableB (After splitting the csv value as individual row).The first table(TableA) have an identity field which needs to be captured upon inserting the new records and the same value needs to be inserted in tableB against the csv separated values.Let me know if my understanding is correct ? |
 |
|
|
|
|