Posted by David Portas on 08/03/07 19:00
<ben@jammin.co.uk> wrote in message
news:1186159481.367058.24370@o61g2000hsh.googlegroups.com...
>I would like to know if it is possible to use a variable to use with
> the IF UPDATE(column) statement. Only, the column should be a variable
> [e.g. IF UPDATE(@column_name)] which should be substituted at run-time
> with the real column name.
>
> TIA
>
Not possible. UPDATE() can only ever refer to one table. Why wouldn't you
know the names of the columns in your table?
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
[Back to original message]
|