Viewing 15 posts - 58,321 through 58,335 (of 59,070 total)
You shouldn't necessarily need a function to convert a VARCHAR date to a datetime to save in a table... it's one of those "instrinsic conversions" that happen auto-magically if the...
April 8, 2006 at 11:17 am
KH did it right... if you expand upon the example KH provided, it works great, is nasty fast, and does not require a trip to the app.
April 8, 2006 at 9:50 am
Zia,
Instead of using COMPUTE, consider using WITH ROLLUP or WITH CUBE. There's some great documentation on how to exploit the related GROUPING sub-totals for ROLLUP and CUBE in Books OnLine under...
April 8, 2006 at 9:45 am
Dave,
Very volitile subject... I got involved with a pretty big discussion on this subject before and I'll just say that, in all the "million-row" testing I did, I satisfied myself that properly...
April 8, 2006 at 9:31 am
They say that one test is worth a thousand calculations and a million guesses... Noeld is correct. But don't take my word for it... I expanded my normally well behaved...
April 7, 2006 at 11:03 pm
Very nice... very nice indeed...
These might execute a bit quicker... in fact, considering that they're single line formulas, you may not want to use them as functions, at all.. just...
April 7, 2006 at 8:38 pm
For the data presented, this'll do it... and it doesn't assume that there will only be different 3 rows in the return...
SELECT Col1,Col2,Col3,MAX(Col4) AS Col4 FROM yourtable GROUP BY Col1, Col2, Col3 ORDER...
April 7, 2006 at 6:27 am
For the data presented, this'll do it... and it doesn't assume that there will only be different 3 rows in the return...
SELECT Col1,Col2,Col3,MAX(Col4) AS Col4 FROM yourtable GROUP BY Col1, Col2, Col3 ORDER...
April 7, 2006 at 6:26 am
Whether the column allows NULLs or not, the following will produce returns only if the column is NOT NULL and the column has something other than all blanks regardless of...
April 7, 2006 at 6:18 am
It seems like a pretty straight forward error message... your table won't allow nulls in the Status column but you're trying to add rows from data that contains no status. ...
April 6, 2006 at 6:57 am
I understand the question but why must it be without a sub-query? Seems like a very unnecessary limitation unless you're doing this in an early version of MySQL or something...
April 6, 2006 at 6:51 am
Uhhg... I know you're right and it works great, but I just can't bring myself to do it
because way deep down inside, I know...
April 2, 2006 at 9:44 pm
WOW! Another myth destroyed. I was always led to believe that BCP was always faster than BULK INSERT. Phil's post
prompted me to do some long overdue testing on that fact. ...
April 2, 2006 at 9:30 am
Try this, Donald...
select * from xyz where datefield >= DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)
AND datefield < DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)+1
The DateAdd/DateDiff thing strips the time from the date without the expense of a character conversion and without...
April 1, 2006 at 7:49 pm
Finally... the voice of reason...
April 1, 2006 at 7:40 pm
Viewing 15 posts - 58,321 through 58,335 (of 59,070 total)