VALUES query question

MassimoH <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
I want to do a query like this:

SELECT Months.????, (SELECT SUM(Amount) FROM Sales WHERE SaleMonth =
Months.????) AS Sales
FROM (VALUES '2008-01-01', '2008-02-01', '2008-03-01', '2008-04-01',
'2008-05-01', '2008-06-01', '2008-07-01') AS Months;

However, when I use VALUES in a sub-query, I don't see how to reference the
column. Basically, how can I get the above query to work?

Thanks!
-- 
View this message in context: http://www.nabble.com/VALUES-query-question-tp20970471p20970471.html
Sent from the freemarker-user mailing list archive at Nabble.com.


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.