Shoulder Angel's Deadjournal - April 1st, 2009 [entries|archive|friends|userinfo]
Shoulder Angel

[ website | my calendar ]
[ userinfo | deadjournal userinfo ]
[ archive | journal archive ]

April 1st, 2009

[Apr. 1st, 2009|09:21 am]
[Tags|, , , , ]
[mood | frustrated]

Yes, it's Oracle. Yes, Oracle hates my guts. Yes, it's probably something really obvious I'm overlooking.

Can anyone think of why this would be returning "Wednesday" instead of "Holiday"? And how to fix it?
INSERT INTO dbp_holiday
  (holiday_date
  )
SELECT sysdate FROM dual;
SELECT sysdate,
  (
  CASE
    WHEN sysdate IN
      (SELECT h.holiday_date FROM dbp_holiday h
      )
    THEN 'holiday'
    ELSE TO_CHAR(sysdate , 'day')
  END)
FROM dual;

-Mmaster

EDIT: Translation: It adds today's date to a table called dbp_holiday. Then it does a select, searching for today's date in that same table - if found, it prints the date and 'holiday', otherwise it prints today's date and the day of the week, i.e. Wednesday.
linkBe an Angel

.nottuB nimajneB fo esac suoiruc ehT [Apr. 1st, 2009|08:13 pm]
[Tags|]
[mood | weird]
[music |Anything You Can Do, Ruthie Henshaw and John Barrowman]

The world has been going in reverse the last couple of days.

Saturday night was Earth Hour. Parents and I headed to Darling Harbour to watch the lights turn out. It was rather impressive, actually - a number of the companies I would not expect (e.g. Novotel) were willing to turn out their lights (though Novotel still left the name blazing, they did turn out the ones highlighting the corners of the building). Star City still had everything blazing when we looked at it, though.


Monday afternoon there were blackouts all over the CBD. A couple of power substations blew out simultaneously. What lost power and what didn't was interesting - the traffic lights at the end of Forveaux Street were blacked out, with a policeperson busily directing traffic, but the interchanges either side were still working.

...But logically, shouldn't that have happened at 9am Monday morning when everything was being turned back on after Earth Hour? Alternatively, the electricity companies decided it was payback time.


And then it spent Tuesday and Wednesday raining various amounts. Another potential cause of blackouts - except that the blackouts had already happened.


What's the next logical step?
-Mmaster
linkBe an Angel

navigation
[ viewing | April 1st, 2009 ]
[ go | Previous Day|Next Day ]