I think you might be one to something here... is there such a thing
as a while loop in MySQL? i.e. can I fill a table with data via a
MySQL query? I guess I could do it via PHP...
I could create a temp table with one column of dates for the range I
am looking for and then LEFT JOIN my
Dan Tappin wrote:
I think you might be one to something here... is there such a thing as
a while loop in MySQL? i.e. can I fill a table with data via a MySQL
query? I guess I could do it via PHP...
I could create a temp table with one column of dates for the range I am
looking for and
I have a table full of data... a log of sorts. Each row has a
timestamp.
I want to generate some reports based on this data.
For example I want a COUNT(*) of the rows for each day for the past
week, 30 days, 12 months etc.
I have no problem generating the query but I am stuck on a
Dan Tappin wrote:
I have a table full of data... a log of sorts. Each row has a
timestamp.
I want to generate some reports based on this data.
For example I want a COUNT(*) of the rows for each day for the past
week, 30 days, 12 months etc.
I have no problem generating the query but I
Dan Tappin wrote:
I have a table full of data... a log of sorts. Each row has a timestamp.
I want to generate some reports based on this data.
For example I want a COUNT(*) of the rows for each day for the past
week, 30 days, 12 months etc.
I have no problem generating the query but I am
://groups.google.com/groups?hl=enlr=ie=UTF-8oe=UTF-8;
group=mailing.database.mysqlmailing.database.mysql
Date: 2003-01-08 01:16:04 PST
Subject: Question - Query
Perhaps you didn't see it:).
Use a CASE statement to conditionally SUM the
amount_us values,
ie. SUM only when
this to:
Newsgroups: A
HREF=http://groups.google.com/groups?hl=enlr=ie=UTF-8oe=UTF-8group=mailing.database.mysql;mailing.database.mysql/A
Date: 2003-01-08 01:16:04 PST
Subject: Question - Query
Perhaps you didn't see it:).
Use a CASE statement to conditionally SUM the
amount_us values,
ie
How do I correct this SQL code:
2 tables there,
lcopen: id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date
#this condition :lcreceive.due_date current_date
#only affect to : SUM(lcreceive.amount_us)
#and NOT :
#SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open
FROM must precede WHERE.
Terence Ng wrote:
How do I correct this SQL code:
2 tables there,
lcopen: id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date
#this condition :lcreceive.due_date current_date
#only affect to : SUM(lcreceive.amount_us)
#and NOT :
ignore the obsolete in the main select when it's returned since it will all
be the same value... put it first.
Alan
-Original Message-
From: Ed Reed [mailto:ereed;nearfield.com]
Sent: Tuesday, 12 November 2002 18:54
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Newbie Question
BY Products.PartNumber;
Mark
-Original Message-
From: Alan McDonald [mailto:alan;meta.com.au]
Sent: Tuesday, November 12, 2002 02:05
To: Ed Reed; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Newbie Question - Query works in access but not MySQL
Do you have a space between PartNumber and Like
Question - Query works in access but not MySQL
Do you have a space between PartNumber and Like?
Also there's not need to ORDER BY - the GROUP BY does that anyway (I
know that's the case elsewhere) and finally, I have to guess that it's
objecting to Obsolete not being in the main select.. have you
This is my first post. I hope it works and please excuse me if I screw
up.
I have an MS Access database I'm trying to convert to MySQL v4.0.3 for
Netware. I use a VB frontend to talk to my .mdb file. So far I've gotten
all my data into MySQL using the MyAccess tool I bought. In my VB
frontend
I came up with a translation to the first query, which had the two
sub-selects, and it now seems to work. I've yet to come up with a
solution to the second query, which had the Group By clause. I'd still
like to hear some ideas.
- Ed
Ed Reed [EMAIL PROTECTED] 11/11/2002 8:03:03 PM
This is my
UPDATE:
Still trying to solve this and I think I have something that's a little
easier to understand. If I run the following query against MySQL it
returns Unknown column 'Obsolete' in 'having clause'. If I run the
query using MSAccess as a frontend to MySQL the query runs correctly (it
returns a
15 matches
Mail list logo