AtomicChip
Programmer
OK, here's the scenario - I have 2 tables within a SQL 2000 database. Let's call them, aahh, Table1 and Table2. Table1 stores information about item batches received, and Table2 stores the detailed information about each batch received in Table1.
Now, I know that I _could_ do this an easier way by defining column ID's myself, but I don't want to. I would like to be able to do this by using SQL 2000's uniqueidentifier data type (isrowguid).
Now, here's what I would like to do:
Take user inputted fields, and stick them into Table1. From there, get the uniqueidentifier that was automagically generated and return that to the calling function. From there, I would like to take that returned ID, and input values into Table2 using that ID as a rowguid. I would like this to take place completely in a single stored procedure.
Any ideas? (This one's worth some _BIG_ stars ) -----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
Now, I know that I _could_ do this an easier way by defining column ID's myself, but I don't want to. I would like to be able to do this by using SQL 2000's uniqueidentifier data type (isrowguid).
Now, here's what I would like to do:
Take user inputted fields, and stick them into Table1. From there, get the uniqueidentifier that was automagically generated and return that to the calling function. From there, I would like to take that returned ID, and input values into Table2 using that ID as a rowguid. I would like this to take place completely in a single stored procedure.
Any ideas? (This one's worth some _BIG_ stars ) -----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy