You are here: Re: Problem with trigger « MsSQL Server « IT news, forums, messages
Re: Problem with trigger

Posted by Hugo Kornelis on 12/21/06 21:54

On 21 Dec 2006 09:26:27 -0800, Jimbo wrote:

>Im having problems with an after insert trigger...
>
>Im trying to join the INSERTED table with other tables to retrieve
>data....Some of these tables it must link to get data inserted into
>them at the same time my original table does...my question is why when
>the trigger runs, my sql statement gets no data...however afterwards if
>I run the statement and use the primary key that was just inserted, the
>statement brings up data?..
>
>I hope I was clear enough..

Hi Jim,

No, you were not.

Please post CREATE TABLE statements to reproduce your tables (you may
omit irrelevant columns, but please do include all keys, properties, and
indexes), the CREATE TRIGGER statement with your current, non-working
trigger code, some INSERT statements with sample data, the expecte
results and the results yoou are actuallly seeing. That allows us to
reproduce your problem by cut and paste, and to test if our suggestions
match the desired resuls.

--
Hugo Kornelis, SQL Server MVP

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация