Good morning, I have created an alert which fires when new employee is been hired. This alert should be sent to the HR officer with the new employee's details. Unfortunately, when I test it , it does n't work. So, could someone check the SQL statemnets and tell me what's wrong? this is the query in general: SELECT EMPLOYEE_NUMBER, FULL_NAME, EMAIL_ADDRESS, ORIGINAL_DATE_OF_HIRE INTO &EMPLOYEE_NUMBER, &FULL_NAME, &EMAIL_ADDRESS, &JOINING_DATE FROM PER_ALL_PEOPLE_F WHERE TRUNC(SYSDATE) BETWEEN EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE AND TRUNC(SYSDATE) = TRUNC(ORIGINAL_DATE_OF_HIRE) and this is when i try to test it : SELECT EMPLOYEE_NUMBER, FULL_NAME, EMAIL_ADDRESS, ORIGINAL_DATE_OF_HIRE INTO &EMPLOYEE_NUMBER, &FULL_NAME, &EMAIL_ADDRESS, &JOINING_DATE FROM PER_ALL_PEOPLE_F WHERE TRUNC(SYSDATE) BETWEEN EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE AND TRUNC(SYSDATE) = to_DATE('26-DEC-2010','DD-MON-YYYY')
Welcome to the forum! This is a mainly SQL Sevrer focussed community. Since you are asking an Oracle related question, you might be better off doing so in a community dedicated to Oracle.
As Frank reminded correctly that your query relates to Oracle it is not possible here to answer, you may be confusing about SQL statements and this is related to PLSQL.