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
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Sure it will, as long as they are written identically.
ASKER