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...ma
= 4 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
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 column
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
Is there an easy/simple way to combine these four queries into one?
I'm not thinking clearly today. :(
SELECT COUNT (MAEPOS) AS Pos1Count
FROM MAE
WHERE MAEPOS = 1
SELECT COUNT (MAEPOS) AS Pos2Count
FROM MAE
WHERE MAEPOS = 2
SELECT COUNT (MAEPOS) AS Pos3Count
FROM MAE
WHERE MAEPOS = 3
SELECT CO
__
-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: Che Vilnonis [mailto:[EMAIL PROTECTED]
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
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
:[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
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
: 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
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
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 "
2:36 PM
To: CF-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
e work to get it exactly right.
-Mark
Mark A. Kruger, MCSE, CFG
www.cfwebtools.com
www.necfug.com
http://blog.mxconsulting.com
...what the web can be!
-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 1:28 PM
To: CF-Talk
Subject: Quick SQL Question...
T
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 secon
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
Try dropping the second Group By Variable.
Thank you.
Steve Burcham
Webmaster
RDO Equipment Co.
Phone (701) 526-9838
Fax (701) 526-9839
[EMAIL PROTECTED]
_
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
GROUP BY DATEPART(dw, creationdate)
197
364
350
294
260
243
196
But when I add a column... this does not):
SELECT COUNT(creationdate) AS TotalRefsPerDay, creationdate
FROM Referer
GROUP BY DATEPART(dw, creati
Here is my query:
SELECT psi.id,
psi.price,
psi.accessory,
rm.catalogmodel rnum,
rm.id rmid,
r.model_name rname,
r.image rimage,
a.access_name aname,
a.access_num anum,
a.image aimage,
a.listprice as aprice,
a.id as AID
FROM ps_inventory psi
JOIN radio_model rm on ps
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 sure how to write the SQL stmt to
>automatical
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
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 SQL stmt to
automatically create this hidden field.
The user is required to enter a 6 digit program code,
which begins with a letter followed by
23 matches
Mail list logo