MySQL Forums
Forum List  »  Newbie

multiple SQL statements
Posted by: Henrique Seganfredo
Date: August 11, 2005 08:56AM

Hi folks,

I wanted to know how I can make multiple select statements returin into one single row. I tried, but something funny happens:

this works, I get one row with columns currentdate and total filled with data...

select curdate() as currentdate,
sum(amount) as total from bills where date="xx-xx-xxxx"

this DOES NOT work, I expected to get one row, with column 'deposits' and column 'total' filled

select sum(amount) from deposits where date="xx-xx-xxxx",
sum(amount) as total from bills where date="xx-xx-xxxx"

using mysql 4.1

Is this a standard SQL limitation or am I not aware of something?

Options: ReplyQuote


Subject
Written By
Posted
multiple SQL statements
August 11, 2005 08:56AM


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.