Re: SELECT question - query for records over a series of dates

2005-08-17 Thread Michael Stassen
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 th

Re: SELECT question - query for records over a series of dates

2005-08-17 Thread Dan Tappin
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 log

Re: SELECT question - query for records over a series of dates

2005-08-16 Thread Michael Stassen
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

Re: SELECT question - query for records over a series of dates

2005-08-16 Thread Daniel Kasak
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 a

SELECT question - query for records over a series of dates

2005-08-16 Thread Dan Tappin
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 creativ

Re: Question - Query

2003-01-27 Thread Terence Ng
27;); INSERT INTO lcreceive VALUES (32,45.0738,'ASU-HKG/200218',51384.13,'2003-01-02'); INSERT INTO lcreceive VALUES (33,46.8816,'ASU-HKG/200218',50632.13,'2003-01-02'); INSERT INTO lcreceive VALUES (34,18.1444,'PONLASU00409415',18852.03,&#x

Re: Question - Query

2003-01-22 Thread Terence Ng
I posted this to: > Newsgroups: HREF="http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&group=mailing.database.mysql";>mailing.database.mysql > Date: 2003-01-08 01:16:04 PST > Subject: Question - Query > > Perhaps you didn't see it:). >

Re: Question - Query

2003-01-08 Thread gerald_clark
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 : #SUM(lcopen.unit_pr

Question - Query

2003-01-08 Thread Terence Ng
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 SELE

RE: Newbie Question - Query works in access but not MySQL

2002-11-12 Thread Ed Reed
mber 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? Also there's not need to ORDER BY - the GROUP BY does that anyway (I know that's the case elsewhere)

RE: Newbie Question - Query works in access but not MySQL

2002-11-12 Thread Mark Armer
ts.Obsolete<>-1)) > GROUP 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 M

RE: Newbie Question - Query works in access but not MySQL

2002-11-12 Thread Alan McDonald
PROTECTED] > Subject: Re: Newbie Question - Query works in access but not MySQL > > > 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 &

Re: Newbie Question - Query works in access but not MySQL

2002-11-11 Thread Ed Reed
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

Re: Newbie Question - Query works in access but not MySQL

2002-11-11 Thread Ed Reed
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 >>> Th

Newbie Question - Query works in access but not MySQL

2002-11-11 Thread Ed Reed
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'v