Oracle SQL display a different column depending on the date -
i have table has 33 columns
employee month day1 day2 ...... etc. etc.
the day column represents day of month.
is possible display employee column , day of month depending on today's date?
i.e.
12th may
employee day12
no idea start if it's possible. great
you record (here: month) clause. column (here: day) decode or case.
select employee, decode( extract(day sysdate), 1, day1, 2, day2, 3, day3, ... ) day mytable t t.month = extract(month sysdate) group employee order employee;
Comments
Post a Comment