Viewing 15 posts - 58,306 through 58,320 (of 59,048 total)
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
If the UDF returns a scalar value instead of a table datatype, it would be like saying...
SELECT * FROM ((1))
April 1, 2006 at 7:31 pm
Similar to what's already been suggested but accomplished in a single step...
REPLACE(REPLACE(@WordList,' ',' '),' ',',')
April 1, 2006 at 7:25 pm
Yes, it is wrong... it does not account for Leap Years.
The following shows an age of 55 when the real age is 2 WEEKS less than what is shown...
Declare
...
April 1, 2006 at 7:15 pm
| I still don't understand what test the clause -- substring(ResourceEnterpriseRMV21ID,1,1) > 0 -- is really doing?????? |
If...
March 27, 2006 at 7:59 pm
Very interesting problem... thought I'd try the "exercise" a wee bit differently...
This one uses a "Tally" table... If you don't already have one, this is one way to make one...
March 25, 2006 at 9:57 pm
Jeff,
If you are talking about importing with BCP, you can tell it to skip the first row by setting the first row (-F) parameter to 2.
If you are talking about...
March 25, 2006 at 8:43 pm
Viewing 15 posts - 58,306 through 58,320 (of 59,048 total)