Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASA 7 Triggers

Status
Not open for further replies.

NuWood

Programmer
Mar 14, 2002
44
0
0
GB
Hi

I know ASA 7 is a bit old but thats what my client is using.

I wrote a trigger which uses the inserted mechanism to obtain fields inserted into a table and place them elsewhere. This trigger compiles fine within SYBASE.

When I run the application which owns the table and attempt to insert data into the table I get the following error

-----
Unable To Save Message At Present - Please Try Again: Table or view not found: Correlation name 'inserted' not found
-----

This is the trigger which I have shortened to just collect the inserted columns into variables and it still comes up with the error.

create trigger test1
on InBox_TB
for insert
as
begin
declare @staff varchar(10),
@branch varchar(10),
@folder int,
@item int

select @staff = inserted.staffcode_fd
select @branch = inserted.branchcode_fd
select @folder = inserted.folderno_fd
select @item = inserted.linboxitemno_fd

end;

Any help would be greatly recieved

---
Andrew
 
Hi

Found the answer if I use

select @staff = staffcode_fd from inserted

instead of

select @staff = inserted.staffcode_fd

it works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top