Joshua,
How about this:
CREATE OR REPLACE TRIGGER "SCOTT"."WINDOW_OPEN_TR" BEFORE INSERT ON "SCOTT"."ORDER_TYPE" FOR EACH ROW DECLARE l_compare_time NUMBER; BEGIN SELECT to_char(sysdate,'HH24') into l_compare_time FROM dual; IF l_compare_time between '8' and '16' THEN :NEW.window_open := 'Y'; ELSE :NEW.window_open := 'N'; END IF; END;
John Green SSi Technologies, North America
-----Original Message-----
Hi all,
I need help in order to create a following "mechanism".
I have a table where is a column called window_open and it has two values 'Y' and 'N'
Now I need to automate the update a single row based on following rules:
If time is between 08:00-16:00 the value on that window_open column should be 'Y' during other period the value should be 'N'. How can I do this and automate the task...
Thanks in advance,
Joshua Gå före i kön och få din sajt värderad på nolltid med Yahoo! Express |
- Automate an update Joshua Becker
- Re: Automate an update Joe Frohne
- Re: Automate an update Gudmundur Bjarni Josepsson
- Re: Automate an update AK
- RE: Automate an update Pardee, Roy E
- RE: Automate an update John A. Green
- RE: Automate an update Chelur, Jayadas {PBSG}
- RE: Automate an update Jamadagni, Rajendra