Viewing 15 posts - 48,091 through 48,105 (of 59,099 total)
prasanna_pathangi (9/25/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 5:47 pm
It doesn't matter if you have a max of 8000 characters for a variable, or not. You cannot print more than 8000 characters in SQL Server in a single...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 5:29 pm
Actually, there IS a limit on the size of stored procedures and batches... it's (65,536 * Network packet size) for batches and the lesser of batch size or 250 MB...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 5:11 pm
Yes... there's a huge problem... you have a double nested correlated subquery in the SET clause... and THAT will be executed, in it's entirety, once for every row qualified by...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 5:01 pm
Roger Abram (9/27/2008)
Thanks! I get trying to use the DATEADD function again in the same line.Roger
... and that will work, also... although it's a bit uglier...
DECLARE @date DATETIME
SELECT @date...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 4:48 pm
stephane3d (9/27/2008)
I have a log table that saves web visits. And I have this query which is pretty slow :
select top 500 count(1) as nbCount, currentPage as item,
dateadd(dd, DATEDIFF(dd,...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 4:45 pm
As a side bar, I strongly question the value of assigning the NCHAR datatype to a column, like the amount column, that will obviously hold a numeric value.;) I...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 1:06 pm
There is one lightning quick method to do this in a set based fashion that depends on a clustered index. The method is discussed at some great length in...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 12:59 pm
For starters, you could try adding the "WITH RECOMPILE" option to the sprocs just to test the water. A better way would be to actually assume that parameter sniffing...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 11:12 am
Thanks... I hate it when that happens... just splits resources and makes it difficult for others to search for a correct answer.
Since the other post has more activity, I'll continue...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 7:15 am
peter (9/25/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
September 27, 2008 at 7:07 am
rbarryyoung (9/26/2008)
What the IF NOT EXISTS check was intended to do was merely to prevent the error message in the first place. And they did complete that intention.
You could...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 9:46 pm
Heh... yep... I understand all of that. But the obvious intention of generating the dynamic SQL is to make it possible to protect the user from accidental overwrites when...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 7:46 pm
If you want one that's ready made and pretty handy, lookup DBCC SHOWCONTIG and take a look at "Example E"... It even has a place to set a "Max Frag"...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 7:43 pm
Because they clear cache... not just for the proc running, but for everybody. Depending on what's being done, cache is very important for performance by repetative and other code.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 7:27 pm
Viewing 15 posts - 48,091 through 48,105 (of 59,099 total)