Hi,
I need to use an update statement to update a given field with the results of a stored procedure call (unique id). Theres multiple items in the table without a value
so its something like
update mytable set myid=exec getmyid, @myid output where myid is null
but obviously this doesnt work I can declare @myid and then the exec will return the value correctly to that, and I can set myid=@myid but then the same id would be used for each record which also doesnt work...
Any solutions would be appreciated.
Regards,
Richard.
I need to use an update statement to update a given field with the results of a stored procedure call (unique id). Theres multiple items in the table without a value
so its something like
update mytable set myid=exec getmyid, @myid output where myid is null
but obviously this doesnt work I can declare @myid and then the exec will return the value correctly to that, and I can set myid=@myid but then the same id would be used for each record which also doesnt work...
Any solutions would be appreciated.
Regards,
Richard.