>Are you looking for something like this:
>
>DECLARE @cmd varchar(2000)
>SET @cmd = 'SELECT COUNT(*) FROM x'
>EXECUTE (@cmd)
>
>I've not directly tried it but I can't think of any reason why it wouldn't work. There are something that you need to be aware of. The statement is considered another batch. It doesn't have access to any of the variables within the calling batch. I'm also not sure if you would be able to access the Inserted and Deleted tables.
>
>-Mike
Let me ask you this, What is the best way to update the values in one table with only the values that changed in the table that fired the trigger?
I don't want to copy the deleted record to another table, I want to copy only the fields that change in the deleted record to another table.
Tim Westmoreland
Software Engineer
Skyline Technologies, Inc.
"Upper classes are a nation's past; the middle class is its future." - Ayn Rand, Russian-born author (1905-1982).