RE: SQL Count Question...

2005-08-26 Thread Dave.Phillips
sorry, typo. I didn't look back to see who wrote what, just remembered it. Dave -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 1:14 PM To: CF-Talk Subject: Re: SQL Count Question... Who you talking about "he." I'

Re: SQL Count Question...

2005-08-26 Thread Deanna Schneider
Who you talking about "he." I'm a "she." ;) But, I am glad to see you agreeing. I thought for a minute there that I must have been confused if he got it to work with those statements in there. On 8/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > FYI - he's write about the 0 = 0, it's useless

RE: SQL Count Question...

2005-08-26 Thread Dave.Phillips
m: Protoculture [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 11:39 AM To: CF-Talk Subject: Re: SQL Count Question... thanks RADEMAKERS, that did it... here is the working code.. SELECT COUNT(DISTINCT(opportunity.id))

Re: SQL Count Question...

2005-08-26 Thread Protoculture
thanks RADEMAKERS, that did it... here is the working code.. SELECT COUNT(DISTINCT(opportunity.id)) FROMopportunity, advertiser,

RE: SQL Count Question...

2005-08-26 Thread Dave.Phillips
o: CF-Talk Subject: RE: SQL Count Question... I don't know about sql server specifically, but you could try syntax like select count(distinct(mycolumn)) from mytable or else you should be able to do select count(*) from (select distinct(mycolumn) from mytable) /t >-Ori

Re: SQL Count Question...

2005-08-26 Thread Deanna Schneider
Well, I've never seen that behavior then. But, I also don't understand what the heck you're trying to do with your query. You realize that 0=0 will always be true, right? So, when you have a where statement like 0=0 OR (0 LIKE '%' + ',' + CONVERT(VARCHAR,0) + ',' + '%' AND

RE: SQL Count Question...

2005-08-26 Thread RADEMAKERS Tanguy
I don't know about sql server specifically, but you could try syntax like select count(distinct(mycolumn)) from mytable or else you should be able to do select count(*) from (select distinct(mycolumn) from mytable) /t >-Original Message- >Subject: SQL Count Question... >From: <[EMAIL P

Re: SQL Count Question...

2005-08-26 Thread Protoculture
yes I've also tried 'id' AS opportunity.id ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try

Re: SQL Count Question...

2005-08-26 Thread Deanna Schneider
I've never seen the 'id' = opportunity.id syntax before. Of course, I don't use sql server. Do you get the same if you do select opportunty.id AS id? On 8/26/05, Protoculture <[EMAIL PROTECTED]> wrote: > I am trying to get a total count of all our records. The query itself is a > join ( as you c

Re: SQL Count Question...

2005-08-26 Thread Protoculture
ms-sql, basically want to get the proper number of records. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with L

RE: SQL Count Question...

2005-08-26 Thread Dave.Phillips
I don't think you can use DISTINCT with an aggregate function like count(). Also, you didn't indicate anywhere in this e-mail which database server you're using. Are you doing the query just to get the count, or is it for some other purpose as well. There's nothing wrong with using #queryna