SELECT SUM(CASE WHEN maepos = 1 THEN 1 ELSE 0) AS pos1Count,
SUM(CASE WHEN maepos = 2 THEN 1 ELSE 0) AS pos2Count,
SUM(CASE WHEN maepos = 3 THEN 1 ELSE 0) AS pos3Count,
SUM(CASE WHEN maepos = 4 THEN 1 ELSE 0) AS pos1Count
FROM mae
- Original Message -
From: Che Vilnonis
Is there an
select
(select count(meepos) from mae where maepos = 1) as pos1count,
(select count(maepos) from mae where maepos = 2) as pos2count
...
or better yet,
select maepos, count(maepos) as poscount
from mae group by maepos
order by maepos
This will return 2 columns and multiple rows - the first
THEN 1 ELSE 0 END) AS pos4Count
FROM MAE
WHERE ACTIVE = 1
-Original Message-
From: Deanna Schneider [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 4:36 PM
To: CF-Talk
Subject: Re: Quick SQL question...maybe.
SELECT SUM(CASE WHEN maepos = 1 THEN 1 ELSE 0) AS pos1Count,
SUM(CASE WHEN
Oh yah, typing too fast and then cutting and pasting will do that to ya.
Sorry. :)
- Original Message -
From: Che Vilnonis [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 3:44 PM
Subject: RE: Quick SQL question...maybe.
Thanks Deanna...I got an error
__
-Original Message-
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 14, 2004 2:39 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
That's a neat trick- saves a lot of typing. Thanks!
-Original Message-
From
That's a neat trick- saves a lot of typing. Thanks!
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:35 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
thank you!
-Original Message-
From: DURETTE, STEVEN J (AIT) [mailto:[EMAIL
Try dropping the second Group By Variable.
Thank you.
Steve Burcham
Webmaster
RDO Equipment Co.
Phone (701) 526-9838
Fax (701) 526-9839
mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
_
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 1:28 PM
To: CF-Talk
Subject:
becasue all the dates are different. does a psuedo DISTINCT
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 1:28 PM
To: CF-Talk
Subject: Quick SQL Question...
This SQL Code works:
SELECT COUNT(creationdate) AS TotalRefsPerDay
FROM Referer
then i get the 'not contained in aggregate function or group by error'. any
other ideas?
-Original Message-
From: Burcham, Steve [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:32 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
Try dropping the second Group By Variable.
Thank
The 2 are mutually exclusive.One is the group of all the stuff on this
day, but the other (the actual date) is not merely a date - but a - by
nature a very unique item - down to the second. So you are actually getting
the grouping you are asking for.If 2 referals occured at the exact instant
(say
-Talk
Subject: RE: Quick SQL Question...
becasue all the dates are different. does a psuedo DISTINCT
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 1:28 PM
To: CF-Talk
Subject: Quick SQL Question...
This SQL Code works:
SELECT COUNT
mark, i see where you are coming from...alas, i still am having no luck.
-Original Message-
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:51 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
The 2 are mutually exclusive.One is the group of all
do not use it, I was explaining why you are getting the results you are getting. sorry if that was confusing.
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 1:44 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
distinct does not seem to work
: Friday, March 12, 2004 2:52 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
mark, i see where you are coming from...alas, i still am having no luck.
-Original Message-
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:51 PM
To: CF-Talk
Subject: RE: Quick SQL
WOW! WOW! WOW! Thanks so much. I knew this was possible.
what is the significanse of the 101
-Original Message-
From: DURETTE, STEVEN J (AIT) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 3:03 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
Che,
If you are on MSSql 2K
:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 3:18 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
WOW! WOW! WOW! Thanks so much. I knew this was possible.
what is the significanse of the 101
-Original Message-
From: DURETTE, STEVEN J (AIT) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12
thank you!
-Original Message-
From: DURETTE, STEVEN J (AIT) [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 3:31 PM
To: CF-Talk
Subject: RE: Quick SQL Question...
The numbers in the 3rd position of the convert are qualifiers for how it
will convert.In this case 101 = USA = MM/DD/YY
Amanda,
Sounds more like you want to do a hidden input field with
value=#left(programcode, 1)# in it.
HTH
Hatton
Amanda Stern wrote:
Hello,
I need to add a new hidden field to my add/edit page
that will update the table when a new record it added
or updated..not sure how to write the
cfset hiddenField = left(trim(UserInputString),1)
this should move the first non-blank entry into the variable hiddenField
At 01:05 PM 3/7/02 -0800, you wrote:
Hello,
I need to add a new hidden field to my add/edit page
that will update the table when a new record it added
or updated..not
19 matches
Mail list logo