Viewing 15 posts - 4,561 through 4,575 (of 6,486 total)
Andrew (2/25/2008)
I am happy to discuss NULL as...
February 25, 2008 at 11:31 am
The "problem" with the SUM is that it's going to preserve the datatype, so you end up with some really "strange" results. Such as - anything summing up even...
February 25, 2008 at 10:36 am
I'm forcing the like to compare something that looks like this (the @statuscodes)
|2|3|4|12|15|
to this (what I'm doing to status)
|1|
Now - I'm forcing the | on either side of the status...
February 25, 2008 at 10:31 am
Select user,
datepart(yyyy,datein)*100+datepart(mm,datein) as yearmonth,
count(datein) as LoginCount
from login
WHERE
...
February 25, 2008 at 10:21 am
Use a "conditional count" to do that. Looks something like this (one of several methods - but this is the one I use)
select count(*) as TotalCount,
...
February 25, 2008 at 10:14 am
Andrew (2/25/2008)
Row 1 = "Fred", 50
Row 2 = "Jane", NULL
Now formulate SQL to answer the questions
"How many people are under 3 years...
February 25, 2008 at 9:30 am
Are you trying to get a count by month by user? or do you just want a count by user for the period?
February 25, 2008 at 9:02 am
My experience leads me to believe that it is almost never a good idea to perform ANY transformation of the incoming data during the initial load phase. Pretty much...
February 25, 2008 at 8:57 am
I guess my voice on this is - it's so discouraging to use that I don't use it. I too have found that it seems structured specifically to put...
February 25, 2008 at 8:43 am
LIKE applies to text/char-based columns. If your status field is numeric, then you would need to CAST it to a varchar(20) (making the width appropriate to your data).
So:
Declare @StatusCodes...
February 25, 2008 at 8:33 am
Andrew (2/25/2008)
February 25, 2008 at 8:28 am
By the way - I'd like to post a "null" value to your poll - no answer really applies to my scenario (or rather fully represents my situation).
February 25, 2008 at 8:00 am
Google is a powerful powerful thing......:cool: ( I had forgotten what the P was for...:D)
February 25, 2008 at 7:55 am
As much as I'd like to say that the positions espoused by our friends CJ Date and Fabian Pascal are wonderful and true, and that NULL should be banished into...
February 25, 2008 at 7:51 am
Jeff Moden (2/25/2008)
February 25, 2008 at 7:32 am
Viewing 15 posts - 4,561 through 4,575 (of 6,486 total)