adspace


Suppose a simple query involving professor, asst professor and to find if both can be available before and at a mentioned date?

Answer Posted / Moh Sharif Khan

To check the availability of both Professor and Asst. Professor before and at a certain date, you would need to query their schedules. Here is a simplified example in PeopleSoft SQL (PSQL):nn```sqlnSELECT p.employee_id AS professor_id,n ap.employee_id AS asst_professor_id,n p.effective_start_date,n p.effective_end_date,n ap.effective_start_date,n ap.effective_end_date,n (p.effective_end_date - p.effective_start_date) AS professor_duration,n (ap.effective_end_date - ap.effective_start_date) AS asst_professor_duration,n p.effect_type,n ap.effect_typenFROM ps_persons pnJOIN ps_persons ap ON p.employee_id = 'PROF' AND ap.employee_id = 'AP' -- replace with actual professor and asst professor employee IDsnWHERE (p.effective_end_date > date 'your_date') AND (ap.effective_end_date > date 'your_date');```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category