I am trying to create a variable that I can use to compare a date column in one of my tables. I know for a fact that this date exists but I am not getting any results but no error messages either. Here is what I have:
VAR TEST_DATE Char(10)
EXEC SELECT '06/20/1989' INTO :TEST_DATE FROM DUAL;
SELECT LASTNAME, FIRSTNAME
FROM MEMBER
INNER JOIN PERS ON MEMBER.ID = PERS.ID
WHERE PERS.DATEBIRTH = TO_DATE(:TEST_DATE,'MM/DD/YYYY');
Thanks.
DATE, or is it a string? Do you actually have a matching record inMEMBER?