Topic: SQL*Plus and PL/SQL >> Getting error while creating trigger
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: Getting error while creating trigger |
| viral |
Posted: Jan 25, 2008 07:07:23 AM |
Total Post: 8
Joined: Jun, 2007
|
hii every one we r getting the following errors while creating the trigger
so plz can u help us out.....
1 SQL> create or replace trigger no_update_on_sunday
2 before insert or update or delete
3 on emp
4 begin
5 if to_char(trim(sysdate,'day'))='SUNDAY'
6 dbms_output.print_line('can not update on sunday');
7 end if;
8 end;
9 /
warning: Trigger created with compilation errors.
|
|
|
Mohammed Taj |
| Posted: Jan 26, 2008 03:41:08 AM | |
|
Total Post: 746
Joined: Jul, 2007
|
>> dbms_output.print_line('can not update on sunday');
use dbms_output.put_line.
|
|
|
|
|
Nehru |
| Posted: Jan 28, 2008 02:10:27 AM | |
|
Total Post: 46
Joined: Jul, 2007
|
Hi,
May be the following also one Error.
SQL> select upper(to_char(sysdate,'day')) Day from dual;
DAY
---------
MONDAY
SQL> select to_char(sysdate,'day') Day from dual;
DAY
---------
monday
use the 'UPPER' Function.
Any one Let me know if am wrong.
Take Care.
Thanks,
Nehru.
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Vinoth Kumar | 357 |
| Gopu Gopi | 340 |
| Gitesh Trivedi | 322 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|