Rob Farley has a great post on when is a SQL function not a function? Read the two below functions – they return the same thing, but one is more effecient than the other. If you can’t see why, head over to Rob’s post that shows the execution plans for a great explaination. CREATE FUNCTION dbo.FetchSales_inline(@salespersonid […]
You are browsing archives for
ANSWER: UPDATE failed because the following SET options have incorrect settings: ‘ANSI_NULLS, QUOTED_IDENTIFIER’
I came across an interesting problem last night – a stored procedure that had been created years ago was suddenly coming up with this error message: UPDATE failed because the following SET options have incorrect settings: ‘ANSI_NULLS, QUOTED_IDENTIFIER’. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or […]
If you are trying to determine which rows are different between two sets, the usual method is to create a query comparing table1.Column1 != table2.Column1 but this doesn’t check for rows where one of these columns is null. isnull(table1.Column1,-1) != isnull(table2.Column1,-1) might seem like a good way to compare nullable columns – but the performance […]
Rob Farely has posted a great article on why your covering indexes in SQL Server may not be getting the perfomance you are expecting. Covering, schmuvvering – when a covering index is actually rubbish If you use covering indexes but SQL Server keeps ignoring them – read Rob’s article for some reasons why.
Piotr Rodak has a great article on Security – How To Assign Rights To SQL Server Database Objects and why you should not assign rights to the public role and why assigning rights to roles instead of users gives you much more flexibility. He also covers why you should only grant permissions to your stored […]