How to convert rows returned by a query into columns in oracle?

Posted by Piyush Lohana on Stack Overflow See other posts from Stack Overflow or by Piyush Lohana
Published on 2011-01-01T17:49:29Z Indexed on 2011/01/01 17:54 UTC
Read the original article Hit count: 351

Filed under:
|
|
|

I have to display the results of the below query as columns.

select to_char(sysdate + 1 - rownum,'MON-YYYY') as d from all_objects where trunc(sysdate + 1 - rownum,'MM') >= trunc(to_date(:from_date,'MON-YYYY'),'MM') minus select to_char(sysdate + 1 - rownum,'MON-YYYY') as d from all_objects where trunc(sysdate + 1 - rownum,'MM') > trunc(to_date(':to_date','MON-YYYY'),'MM')

Please help me in figuring that out.

© Stack Overflow or respective owner

Related posts about convert

Related posts about column