MySQL Forums
Forum List  »  InnoDB

Re: selet sql statement
Posted by: KimSeong Loh
Date: July 06, 2005 07:43PM

Create another table containing all the dates that you want, then do a left join.

Eg, CREATE TABLE dates (period DATETIME);

INSERT into dates value ('2004-03-01 00:00:00'),('2004-04-01 00:00:00'), ....

SELECT t.param1, t.chartdata, t.selected, d.period
FROM dates AS d LEFT JOIN table as t USING (period);


Anyway, this is not related to transactions, please post in the appropriate forum.

Options: ReplyQuote


Subject
Views
Written By
Posted
3237
July 06, 2005 09:13AM
Re: selet sql statement
1934
July 06, 2005 07:43PM
2010
July 07, 2005 11:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.