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
 Transact-SQL (2000)
 Control of flow in trigger

Author  Topic 

wotrac
Yak Posting Veteran

98 Posts

Posted - 2006-01-23 : 18:05:03
I am trying to create a trigger to update 3 fields in a table, on an insert trigger. However there are 3 possible options for each field.

If field is empty return
If value from another table is empty return, if not use this value
else
use a default.

What would be the cleanest way to code this

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-01-23 : 18:12:57
Can you post your table structure, sample data and expected result ?

----------------------------------
'KH'

I do work from home but I don't do homework
Go to Top of Page
   

- Advertisement -