xander031
asked on
group by a computed column didn't work in sybase. why?
In Sybase adaptive server 11, the following gave me 'invalid column name mnth'. How can I summarize sales by month?
select sum( subtotal ) as sales_summary,
datediff ( mm, 'Jan 1 2000', order_date ) as mnth
from sales_order
where mnth > 0
group by mnth
select sum( subtotal ) as sales_summary,
datediff ( mm, 'Jan 1 2000', order_date ) as mnth
from sales_order
where mnth > 0
group by mnth
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sure it will, as long as they are written identically.
ASKER