Microsoft
Software
Hardware
Network
Question : Creating unique values for every row in a result set query
I am writing a stored procedure which is inserting data into a SQL table in a 3rd party application. There is a unique field in this table, PRECID, which is a alphanumeric number generated by a sp, sp_getprecid. When I insert multiple rows into the table, I need each PRECID field to generate a new PRECID with the execution of this SP. If I create a variable EXEC sp_getprecid, and use that variable as the insert value, the same value will be inserted for all rows. How can I loop to get a unique value for each row?
Answer : Creating unique values for every row in a result set query
Yes. You can't alter your database from within a function. Looks like you will have to call it in a loop.
Random Solutions
Change the Current Directory to the Directory where the Excel Macro was run from
Error 127 while trying to start the Background Intelligent Transfer Service
Setting FK in SQL server management studio
Batch file as Login Script
how do I hide and show a form using JS and/or AJAX?
Killed processes in state D - uninterruptible sleep (usually IO)
slow torrent
Exchange 2003 with primary and secondary email address dropping attachments to one or the other address
Craigslist software clone
Why my drop down list shows in top of the UpdataProgress?