This is related to the stored proc i posted here:
Right before the Declare c1 Cursor, I need to do a check for userlogin and see if it exists in the database. If not, I need to set it to a value. I know in a stored proc , Declares have to be grouped together on top.
So, anyway i can add this check?
I tired "if exists" with the cursor and it didnt work, so I tried code below. That doesnt give me an error. Then I open s1. But how do i check to see if T1User is in s1 or not?
DECLARE s1 CURSOR WITH RETURN FOR select T1user from taborder where t1user = UserLogin fetch first 1 rows only;
Declare c1 cursor with return for select ....