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 |
pnpsql
Posting Yak Master
246 Posts |
Posted - 2012-11-05 : 08:49:14
|
i have program a program "pr_acc"that inserts some values in table tbl_accid name amount date 1 aa 10 '05-nov-2012'2 ab 11 '05-nov-2012'3 ac 14 '05-nov-2012'4 ax 19 '05-nov-2012'now i need to call this program from another program and when the inner program is complete i need to update the values in rows that are inserted in current session. the "pr_acc" is also called from some where else may be at same time.challenge everything |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-11-05 : 11:56:07
|
If you have the ability to modify the "pr_acc" program, you can change it so it returns the Id's inserted and then use those id's to identify the rows that need to be updated.If the ID's are auto-generated (IDENTITY), and if you are using SQL 2008 or later, you can use the OUTPUT clause when you insert to return the ID's inserted.I know these are vague answers - if you can post more details on how you are doing the inserts, people on the forum may be able to offer more specific suggestions. |
|
|
|
|
|