Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

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

  




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 Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software