SQL help
if either of the queries in union returns a value, i want to mark status as closed. How do i put the INTO clause in this case because of two queries. Thanks
BEGIN
SELECT 1
FROM TableA ta
WHERE tA.col1 = 13
AND tA.col2 = '100'
UNION
SELECT 1
FROM TableA tb
WHERE tb.col2 = 'y'
AND tb.col3 = -123
AND tb.col4 IS NOT NULL;
status_cd := 'Closed';
EXCEPTION
WHEN NO_DATA_FOUND THEN
status_cd := 'Unknown';
END;