This query below is running but I would like to add this extra condition; run this query only if there is data in the table STAGE.LAB.DATA.
I tried CASE and IF THEN, but I can't get it to work. Please help. Thanks
SELECT *
FROM
( SELECT EXISTS ( SELECT 1 FROM STAGE.LAB.DATA A
WHERE (A.HOT_TEMP_VALUE >= 118 AND A.HOT_TEMP_VALUE <= 122) ) AS result)
WHERE RESULT !='TRUE';