Home » SQL & PL/SQL » SQL & PL/SQL » Query with CONNECT BY PRIOR (oracle 10g)
Query with CONNECT BY PRIOR [message #424030] Wed, 30 September 2009 00:20 Go to next message
lraok
Messages: 5
Registered: April 2009
Location: Bangalore
Junior Member
Hi,

Can you please construct the query by using CONNECT BY PRIOR

Query:

SELECT TO_CHAR(ADD_MONTHS(SYSDATE, ROWNUM -1), 'YYYY-MON') as YEAR_MONTH FROM DUAL
CONNECT BY ROWNUM < 12

Thanks,
Lakshman
Re: Query with CONNECT BY PRIOR [message #424035 is a reply to message #424030] Wed, 30 September 2009 00:40 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
First of all, this is not query generating machine.

You have to first describe, what is your requirement.
What did you tried to get it.
What problems did you fetch.
Where have you stuck up.
And so on.

Moreover, you can not use anything (CONNECT BY PRIOR) anywhere( in your case)

regards,
Delna

[Updated on: Wed, 30 September 2009 00:43]

Report message to a moderator

Re: Query with CONNECT BY PRIOR [message #424042 is a reply to message #424030] Wed, 30 September 2009 01:10 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the question?

Regards
Michel
Previous Topic: What am I making wrong
Next Topic: Help me to correct this query
Goto Forum:
  


Current Time: Sun Dec 04 04:24:04 CST 2016

Total time taken to generate the page: 0.07337 seconds