Thanks! We'll email you
when relevant content is
added and updated.
I am trying to create a calender with people in a department, which must be printed monthly by the department head. The user must enter the month and department and calender must be generated and printed.
I want to know if this is possible with SQL.
I tried a few options, but cannot get the dates (from 1 to end of month) to be displayed as column aliases and employees as rows. My query looks like this:
--up to date 31
where dept_code = '&dept'
and (sysdate between to_date('&from_date','dd-mon-yyyy') and
group by emp_name
output looks something like this:
EMP_NAME DAY1 DAY2 DAY3
bonita graupe 2006/01/01 2006/01/02 2006/01/03
helena david 2006/01/01 2006/01/02 2006/01/03
hento truter 2006/01/01 2006/01/02 2006/01/03
valme kruger 2006/01/01 2006/01/02 2006/01/03
I want to date value to be the column alias for DAY1, DAY2 and DAY3 and where the current dates are, must be blanks.
January 27, 2006 5:39 AM
January 30, 2006 5:57 AM