Is there a way to call a stored procedure within a SELECT statement?
Example;
----
SELECT FirstName,
LastName,
(EXEC UniqueID_KEYGEN @.keyval output) AS UniqueID
INTO #tNewEmployee
FROM EmployeeTable
----
SELECT *
FROM #tNewEmployee
The return from the temp table would have a unique ID ready to insert into another table.
Our DBA has this stored procedure to create unique ID's and is to be used on all INSERTS. I was used to having a Identity field do this for me, I don't know why we have to do it his way. Except for the reason of sequence and easily get the next record. But we don't use URL variables, only FORM or SESSION.
Thanks for your help in advance.
That is a real pisser ;P, why would he do that?
grrrrrrrrrrr
No comments:
Post a Comment