Viewing 15 posts - 2,671 through 2,685 (of 2,894 total)
Paul White NZ (6/25/2010)
Eugene Elutin (6/25/2010)
It just a bit unpredictable sometimes...My favoured one is "division by zero error" in SELECT Col1/Col2 FROM MyTable WHERE Col2 != 0
That's not unpredictable...it's a...
June 25, 2010 at 9:10 am
Tara-1044200 (6/25/2010)
set nocount on
SET...
June 25, 2010 at 8:45 am
How are you enabling CLR?
You can do it by t-sql:
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
go
-- just to turn off advanced options:
EXEC sp_configure 'show advanced...
June 25, 2010 at 8:22 am
Paul White NZ (6/25/2010)
...Not too many SQL DBAs would be able to make that transformation by visual inspection. The optimiser is a truly amazing piece of kit....
Can't disagree.
It...
June 25, 2010 at 7:47 am
Paul White NZ (6/25/2010)
I first came across this around the time the article I referenced came out - which would be four or so years ago. I was aware...
June 25, 2010 at 7:40 am
Paul White NZ (6/25/2010)
...Try a search for "schemabinding udf" - it's result #4
...
Cool, it works. But...
To search for the above word combination you probably need to know about schemabinding...
June 25, 2010 at 7:30 am
The query can be even shorter (and faster) if you like:
SELECT MIN([Salary]) FROM (SELECT DISTINCT TOP 4 [Salary] FROM [SSIS].[dbo].[Salary] ORDER BY [Salary] DESC) q
But are you sure that you've...
June 25, 2010 at 6:02 am
I though that the join to FeesCategory table in a function, whould ensure something... But I have overlooked that the LEFT JOIN has been used. However, function also checks if...
June 25, 2010 at 5:25 am
Paul White NZ (6/25/2010)
...SCHEMABINDING ensures that SQL Server checks the function for determinism.
A function that is not schema-bound is marked by SQL Server as non-deterministic and as doing data access.
http://blogs.msdn.com/b/sqlprogrammability/archive/2006/05/12/596424.aspx
...
Paul,...
June 25, 2010 at 5:16 am
The function you have doesn't look very good written...
Actually you would not need this function in the first place!
Anyway, here is a replacement query for your sp:
;WITH PaidFeesUsers
AS
(
...
June 25, 2010 at 5:02 am
Use lmu92 query, it will even work in case if you will have more than one record with non-null Xaml.
If you like, you can add every column into CTE,...
June 25, 2010 at 4:39 am
IsNumeric doesn't guarantee that your string can be converted into numeric datatype (as was mentioned in the previous post). Actually, it may show return false, when value can be converted....
June 25, 2010 at 3:21 am
In a past, I used to achieve it using SQL DMO (Distributed Management Objects). However, with addition of PowerShell support in SQL Server 2008, you better use SQL Server Management...
June 24, 2010 at 4:30 pm
george.greiner (6/24/2010)
Eugene Elutin (6/24/2010)
george.greiner (6/24/2010)
...I have not used cursors before...
And I believe, you don't need to use the cursor in this case as well 😀
Please provide some DDL script to...
June 24, 2010 at 11:43 am
Viewing 15 posts - 2,671 through 2,685 (of 2,894 total)