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.
| Author |
Topic |
|
Vack
Aged Yak Warrior
530 Posts |
Posted - 2008-08-13 : 13:47:50
|
Working with two tables. IMITMIDX_SQLOEORDLIN_SQLif userfld3 is updated or changed in the imitmidx_sql I want to look at the oeordlin_sql and anywhere userfld5 is null populate it with imitmidx_sql.userfld3. I've tried the following in a trigger and it does not seem to work.CREATE TRIGGER [UPDATEoeordlinuserfield5ifnull] ON [dbo].[imitmidx_sql] for INSERT, updateASupdate oeordlin_sqlset oeordlin_sql.user_def_fld_5 = inserted.user_def_fld_3from inserted join oeordlin_sql on inserted.item_no = oeordlin_sql.item_nowhere oeordlin_sql.user_def_fld_5 = null |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-13 : 13:50:32
|
| [code]CREATE TRIGGER [UPDATEoeordlinuserfield5ifnull] ON [dbo].[imitmidx_sql] for INSERT, updateASupdate oset o.user_def_fld_5 = i.user_def_fld_3from inserted ijoin oeordlin_sql oon i.item_no = o.item_nowhere o.user_def_fld_5 is null[/code] |
 |
|
|
|
|
|