Re: VALUES query question

Attila Szegedi <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
I believe you posted to a wrong forum. You need to find the  
documentation (or support) site of your SQL database vendor...

Attila.

On 2008.12.12., at 7:17, MassimoH wrote:

>
> 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!






------------------------------------------------------------------------------
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.