Viewing 15 posts - 2,611 through 2,625 (of 5,504 total)
scott.pletcher (11/11/2010)
If Results holds other values than 0 to 3, the COUNT(*) in your query would show a different result than what the OP currently will get.
Quite. ...
November 11, 2010 at 12:17 pm
scott.pletcher (11/10/2010)
SELECT
COUNT(*)...
November 11, 2010 at 11:56 am
CELKO (11/10/2010)
November 10, 2010 at 2:37 pm
Two things:
#1 (less important)
The thread you "hijacked" is almost 7 years old... It's usually better to open a new thread and to add a link to the old one for...
November 10, 2010 at 12:53 pm
You might want to have a look at Jacob Sebastians blog over at beyondrelational.com
November 10, 2010 at 12:40 pm
Karthik,
you've been around long enough to know how to ask questions. Table DDL and sample data in a ready to use format, expected output and what you've tried so far....
November 10, 2010 at 12:35 pm
Instead of the additional index I'd replace the multiple SELECT with a single SELECT. Something like
SELECT
COUNT(*) AS TotalNumberOfUnits,
SUM(CASE WHEN Results = 0 THEN 1 ELSE 0 END) AS T1,
SUM(CASE...
November 10, 2010 at 12:31 pm
npulsezone.zone (11/5/2010)
Hello,Can you explain me how to Configure database mail on the server ?
Here are two great resources that should help you getting started:
November 6, 2010 at 11:23 am
Jack Corbett (11/5/2010)
Diagnosis is in. Displaced fracture about 2 inches below the elbow which requires surgery to be set properly. Local ortho doesn't do kids (which makes me...
November 5, 2010 at 3:16 pm
Do you have any column in your table to identify a single row? (e.g. an identity column?)
If so, you could use a subquery to get either the min or max...
November 5, 2010 at 12:19 pm
Glad I could help 😀
If you get stuck with your next challenge, post back (or open another thread if not directly related). 😉
Good luck!
November 5, 2010 at 11:46 am
I second Michael.
Why not use the update directly?
UPDATE sample_table
SET CLEAN_POSTCODE = SUBSTRING(postcode, NULLIF(PATINDEX('% ' + format + ' %', ' ' + postcode + ' '), 0), LEN(format))
Edit: or are...
November 5, 2010 at 11:42 am
I'm not sure if you're looking for a "static" function (in the meaning of returning the first day of a week regardless of the DATEFIRST setting)...
In this case you could...
November 5, 2010 at 11:37 am
several options
1) change the data source to provide clean data to begin with (I know, most probably unlikely to happen, but that's the ideal scenario 😉 )
2) SELECT DISTINCT...
November 5, 2010 at 11:09 am
Viewing 15 posts - 2,611 through 2,625 (of 5,504 total)