wtite down triggr not any entry on Sunday

Answers were Sorted based on User's Feedback



wtite down triggr not any entry on Sunday..

Answer / debasish sinha

create or replace trigger trg_sun
before insert on <table name>
begin
if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then
raise_application_error(-20345,'no transaction in sunday');
end if;
end trg_sun;

Is This Answer Correct ?    7 Yes 1 No

wtite down triggr not any entry on Sunday..

Answer / rajdeep

create or replace trigger <trigger_name> before insert on <table_name>
begin
if (sysdate,'day') in 'sunday'
then
raise_application_error(-20500,'cannot insert values on sunday');
end if;
end;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is heap table? : Sql dba

0 Answers  


Is primary key is clustered index?

0 Answers  


What is snowflake sql?

0 Answers  


Is progress software supports to ( pl/sql )?

0 Answers  


What is rollback?

0 Answers  






Is it possible to create the following trigger: before or after update trigger for each row?

0 Answers  


What is orm in sql?

0 Answers  


How to avoid duplicate records in a query?

0 Answers  


a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution

0 Answers   TCS,


What is localdb mssqllocaldb?

0 Answers  


Which query operators in sql is used for pattern matching?

0 Answers  


How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?

2 Answers   Fidelity,






Categories