Viewing 15 posts - 211 through 225 (of 310 total)
OK, I have now made some tests on both 2005 and 2008.
Exact versions:
Microsoft SQL Server 2008 (SP1) - 10.0.2757.0 (X64) Jan 8 2010 19:55:08 Copyright...
April 21, 2010 at 2:55 pm
Lynn Pettis (4/21/2010)
Microsoft SQL Server 2005 - 9.00.4053.00...
April 21, 2010 at 1:38 pm
Lynn Pettis (4/21/2010)
NOT A BUG, the code isn't even being executed. It is failing during the compile phase. So, as Paul indicated, it is constant folding.
I know that...
April 21, 2010 at 1:25 pm
Lynn Pettis (4/21/2010)
April 21, 2010 at 1:08 pm
MB_DB (4/21/2010)
The output fields will be LOCATION_NAME,...
April 21, 2010 at 12:53 pm
Paul White NZ (4/21/2010)
Stefan_G (4/21/2010)
select * from dbo.SafeDateAdd(cast('99991231' as datetime),1)declare @d datetime
set @d=cast('99991231' as datetime)
select * from dbo.SafeDateAdd(@d,1)
Both run without error for me on both 2005 and 2008.
Versions tested:
SQL Server...
April 21, 2010 at 12:38 pm
Paul White NZ (4/21/2010)
Do you still think this is not a bug?
I do, and I hope you can see why - none of your code samples produce an error for...
April 21, 2010 at 9:22 am
Paul White NZ (4/21/2010)
Stefan_G (4/21/2010)
select * from dbo.SafeDateAdd(cast('99991231' as datetime),1)declare @d datetime
set @d=cast('99991231' as datetime)
select * from dbo.SafeDateAdd(@d,1)
Both run without error for me on both 2005 and 2008.
Versions tested:
SQL Server...
April 21, 2010 at 8:41 am
MB_DB (4/21/2010)
I did not not drop my tables though as they have production data.
Good. I probably should not have included those DROP TABLE statements in my script. Glad you did...
April 21, 2010 at 8:26 am
Paul White NZ (4/21/2010)
And, if what you are trying to do is to create a report of the 10 most expensive tables and indexes in terms of size, using sys.dm_db_index_physical_stats...
April 21, 2010 at 8:21 am
Paul White NZ (4/21/2010)
Stefan_G (4/21/2010)
Nice function, the only problem is that this throws an error:select * from dbo.SafeDateAdd('99991231',1)
Works fine here. :w00t: :w00t: :w00t:
Have you tried passing it a date time...
April 21, 2010 at 8:03 am
Paul White NZ (4/21/2010)
Stefan_G (4/21/2010)
One problem with sys.dm_db_index_physical_stats is that it can take a fair amount of time and resources to run it on a large table.
This is true, but...
April 21, 2010 at 7:41 am
Paul White NZ (4/21/2010)
In-line function example:
Nice function, the only problem is that this throws an error:
select * from dbo.SafeDateAdd('99991231',1)
Msg 517, Level 16, State 1, Line 1
Adding a value to a...
April 21, 2010 at 7:30 am
Paul White NZ (4/21/2010)
The optimiser in SQL Server can use a number of transformations to improve performance or find better...
April 21, 2010 at 7:25 am
Paul White NZ (4/21/2010)
Sumanta-1056020 (4/21/2010)
Is there any t-sql commands to get the no. of data pages contained by a particular table and the no. of index pages for a index?
I...
April 21, 2010 at 7:02 am
Viewing 15 posts - 211 through 225 (of 310 total)