Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 trigger

Author  Topic 

TajKazi
Posting Yak Master

101 Posts

Posted - 2014-11-26 : 04:50:55
create or replace
trigger trgRNR_Budget before insert on tblRNR_Budgets
for each row
when (new.BUDGETID is null)
begin
select RNR_BID.nextval into :new.BUDGETID from dual;
end;
/

...........................................................
how to write above before insert trigger for each row in sql server

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-11-26 : 10:07:18
use INSTEAD OF trigger:

http://msdn.microsoft.com/en-us/library/ms189799.aspx
Go to Top of Page
   

- Advertisement -