I have an insert statement:
INSERT INTO tbl1 (Col1)
SELECT
CASE
WHEN Col1 = 'a' THEN 'TRUE'
ELSE 'FALSE'
END
FROM tbl2;
This works as expected. For every row in tbl2, 1 row gets inserted into tbl1 with a Col1 value of 'TRUE' or 'FALSE'
If I put this same statement into a stored procedure, I get the following error:
↧