I am working on the below query, I want to return a date column (DATE1
) to the outer query for each candidate. Since each candidate can have multiple date entries, I want it to return those multiple entries where they exist.
I am getting the above error and other times I get
ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
SELECT DISTINCT xyf.can_num,
xyf.associate_id,
event_f.pi_his_itm_app_trk_creation_dt,
xyf.offer_accepted_date,
xyf.conversion_hire_date,
xyf.parent_pi_number,
information_d.job_sub_family_name,
information_d.job_family_name,
event_f.contest_number,
xyf.full_time_offer_location,
xyf.associate_name
FROM (
SELECT *
FROM (
SELECT event_f.pi_his_itm_app_trk_creation_dt
FROM event_f
inner join xyf
ON xyf.can_num = event_f.can_num
inner join information_d
ON event_f.job_info_row_wid = information_d.row_wid
WHERE information_d.job_family_name IN ('MP',
'PLE',
'EP',
'Other')
AND event_f.pi_his_itm_app_trk_sts_name = 'Extended'
AND event_f.pi_his_itm_app_trk_step_name = 'Offer'
AND information_d.title NOT IN ('Student Ambassador Program for Eligible Summer Interns',
'Student Ambassador')
AND event_f.pi_his_itm_app_trk_sts_name = 'Extended'
AND event_f.pi_his_itm_app_trk_step_name = 'Offer')) AS date1
from xyf
inner join event_f
ON xyf.can_num = event_f.can_num
inner join information_d
ON event_f.job_info_row_wid = information_d.row_wid
WHERE information_d.job_family_name IN ('MP',
'PLE',
'EP',
'Other')
AND event_f.pi_his_itm_app_trk_sts_name = 'Extended'
AND event_f.pi_his_itm_app_trk_step_name = 'Offer'
AND information_d.title NOT IN ('Student Ambassador Program for Eligible Summer Interns',
'Student Ambassador');