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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Insert Trigger problem from inserted table null returned

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-29 : 09:27:27
vikas Gupta writes "I am facing problem during insertion a single row. On that table
i have one insert trigger on that. In which i fired another store procedure for inserting values in another table. before that in trigger i select statements some values from inserted tabled & passed into that storeprocedure . But the problem is select return null values.
Once again the trigger is insert trigger so it definately have values. I am using MS SQL 7.00


Waiting for early reply."

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-05-29 : 09:33:19
Remember that triggers fire on the statement, NOT the actual manipulation of data. No rows need to be modified for triggers to fire.

If I had an insert trigger on a table "test", and I ran:

insert test( column1 )
select 0
where 1 = 2

no rows will be inserted, but the trigger still fires. in that case, the inserted table will contain no rows.

quote:

vikas Gupta writes "I am facing problem during insertion a single row. On that table
i have one insert trigger on that. In which i fired another store procedure for inserting values in another table. before that in trigger i select statements some values from inserted tabled & passed into that storeprocedure . But the problem is select return null values.
Once again the trigger is insert trigger so it definately have values. I am using MS SQL 7.00


Waiting for early reply."



setBasedIsTheTruepath
<O>
Go to Top of Page
   

- Advertisement -