|
Posted by Tolga Yaramis via SQLMonster.com on 06/29/05 10:34
Hi All
I have a question about generating dynmamicly If Update() statement in a
trigger..
in My db, there is a table that holds some column names of an another table.
for example;
Columns Table-A: Col1, Col2, Col3, Col4,Col5
Table-B: Col2, Col5 (The selected columns of Table A)
Then, in the Trigger of Table-A I use;
Select name from syscolumns where id=object_id('Table-A')
fetch next from TableA_Cursor into @strColName
then, I used a statement like this..
if UPDATE(' + @strColName + ')
But it gives "incorrect syntax" error..
How can I write this line?
Thanks alot in advance...
--
Message posted via http://www.sqlmonster.com
Navigation:
[Reply to this message]
|