|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
stored procedure
I am trying to make this into a stored procedure because as a trigger I get write conflicts in access 2000 everytime I update a record can anyone help
CREATE TRIGGER TerminationUpdateTrigger ON EmployeeGamingLicense FOR UPDATE AS INSERT INTO TERMINATION(Status,[TM #],LastName, FirstName, [SocialSecurityNumber], DateHired, Title) SELECT STATUS, [TM#], LASTNAME, FIRSTNAME, [SSN#], HIREDATE, JOBTITLE FROM Inserted WHERE STATUS = 'TERMINATED' |
|
#2
|
||||
|
||||
|
try this
Code:
CREATE PROCEDURE stp_TerminationUpdate As INSERT INTO Termination( Status, [TM #], LastName, FirstName, SocialSecurityNumber, DateHired, Title) SELECT Status, [TM#], LASTNAME, FIRSTNAME, [SSN#], HIREDATE, JOBTITLE FROM Inserted WHERE STATUS = 'TERMINATED' |
|
#3
|
|||
|
|||
|
That worked
thank you Memnoch I appreciate it. Apparently as a trigger I'm getting errros so it works best as a stored procedure. Can you recommend a good book for stored procedure, I need to get a better understanding of them. I have a database that has sQl server 2000 as the engine and access 2000 on the client end (gui) and I am finding triggers and stored procedures save me alot of time. Any suggestions on what kind of literature i could get to assist me??
|
|
#4
|
||||
|
||||
|
Any in depth SQL Server book should be fine.
Check any bookstores website for various SQL Server books. |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > stored procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|