Thursday, 4 December 2008

Deleting From Computed Columns

You may have noticed that deleting from a table with a computed column works fine in Query Analyzer, yet when its a scheduled job it fails. This is because you need to SET ARITHABORT ON before executing the query as a job. By default Query Analyzer has that option enabled, under Tools..Options - that though is specific to your session. The actual SQL Server itself when referenced from a job has it set to OFF.