sql query problem

Posted by benjamin button on Stack Overflow See other posts from Stack Overflow or by benjamin button
Published on 2010-04-29T15:08:37Z Indexed on 2010/04/29 15:27 UTC
Read the original article Hit count: 325

Filed under:
|

why this query give me an error:ORA-01790

SELECT TO_CHAR(logical_date,'MM') MONTH
       FROM logical_date WHERE logical_date_type='B'        
UNION 
SELECT 
        TO_CHAR(logical_date,'MM')+1 MONTH
        FROM logical_date WHERE logical_date_type='B'

but when i run them separately,they give the proper output.

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle