Having difficulty with my first attempt at returning values from a stored procedure... can anyone cast any light on it please?
Here is a snippet.
ALTER PROCEDURE [dbo].[ds_get_id]
@ds_id int output
SELECT top 1 it_request_id_int from requests order by it_request_id_int DESC
above returns 70, as expected
now i want to set @ds_get_id = 70
and return the value
Simply - I don't know how I can assign the result of the select statement to @ds_id to send it back to my code.
Thanks in advance.
SELECT @ds_id = top 1 it_request_id_int FROM requests ORDER BY it_request_id_int DESC