wangotango
Programmer
I am having a problem getting the syntax right on this (if this is even legal in 12.5).
I am creating a stored procedure and I am inside of a cursor, looping on a temp table. I need to set two variables (@part_id and @ass_id) with each pass of the loop, and I am attempting to do so as follows:
SELECT @part_id, @ass_id =
SELECT part_id, ass_id
FROM partner
WHERE part_action_id = @part_action_id
All the variables have been declared. The variable @part_action_id is the variable that the cursor is fetching into. I am unable to compile the proc because of a syntax error near the keyword 'SELECT'.
@part_id and @ass_id are used for an insert further down inside of the cursor. Any suggestions on this? Any way to do this without (more) temp tables?
Thanks!
I am creating a stored procedure and I am inside of a cursor, looping on a temp table. I need to set two variables (@part_id and @ass_id) with each pass of the loop, and I am attempting to do so as follows:
SELECT @part_id, @ass_id =
SELECT part_id, ass_id
FROM partner
WHERE part_action_id = @part_action_id
All the variables have been declared. The variable @part_action_id is the variable that the cursor is fetching into. I am unable to compile the proc because of a syntax error near the keyword 'SELECT'.
@part_id and @ass_id are used for an insert further down inside of the cursor. Any suggestions on this? Any way to do this without (more) temp tables?
Thanks!