I am trying to do something like the example below. I want to run a sql query and then execute a sp using the query result.
QUERY:
SELECT ID from zSYSUSER WHERE HRID = XXXXX
-----> This returns the result of a zSYSUSERID of YYYYY
SP:
EXEX spUpdTerminatedStatus 'T','HRID','03/20/2012','YYYYY'
QUERY:
SELECT ID from zSYSUSER WHERE HRID = XXXXX
-----> This returns the result of a zSYSUSERID of YYYYY
SP:
EXEX spUpdTerminatedStatus 'T','HRID','03/20/2012','YYYYY'