Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Stored procedure help
04-30-2009, 06:30 PM #1
- Join Date
- Apr 2009
- Thanked 0 Times in 0 Posts
Stored procedure help
I need help with a stored procedure I am writing.
If a certain condition exists, I need to perform inserts to two separate databases.
First, I insert a new record into database A, using three variables whose values are retrieved from an XSLT transformation that is done. However, there is a fourth column in each record in Database A called "ID". This field is automatically generated with a unique identifier (int) each time a new record is created.
My second insert, into Database B, needs to include the unique identifier that was just created for the record in question in Database A. Since I don't know what that value is, I need to find a way to select it from Database A.
Any help here would be great.... Thanks!
05-02-2009, 02:40 AM #2
- Join Date
- Jan 2009
- Thanked 1 Time in 1 Post
Can you give an example of your current code?
05-02-2009, 04:31 AM #3
Is this what you are looking for??
If this ID column with the unique identifier that you referred to is *NOT* an AUTOINCREMENT column, then show us the DB schema for it and how you generate the values for it.