Viewing 15 posts - 48,091 through 48,105 (of 59,095 total)
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
... and, yes... that "feeling" goes towards delete triggers, as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 7:14 pm
ZIP is obviously a reference table. Someday, you may want to delete a ZIP with no impact on other tables. Cascading deletes is a pretty bad idea to...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 7:12 pm
The basic table naming convention I try to follow is... what does one row contain? Does it contain a Customer or Customers (answer should be obvious, there)? Same...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 7:03 pm
Hmmm... alright, Neela... thanks. I've got this. I'm on my way to work... I'll bang it out tonight.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 26, 2008 at 5:51 am
Viewing 15 posts - 48,091 through 48,105 (of 59,095 total)