Home » SQL & PL/SQL » SQL & PL/SQL » SQL Error (10g)
SQL Error [message #337425] Wed, 30 July 2008 19:10 Go to next message
rikki90
Messages: 1
Registered: July 2008
Junior Member
I'm having trouble with the following SQL.

SELECT visible_parameter1 Plan_Order,visible_parameter31 Budget_year,
count(*) ITWR_count,
LTRIM (MAX(REPLACE(SYS_CONNECT_BY_PATH(Request_id,'~'),'~',','))
KEEP (DENSE_RANK LAST ORDER BY ROW#),',') ITWR
FROM ( select A.visible_parameter1,A.request_id,
reqhdr.visible_parameter31,
row_number() OVER (Partition by
A.visible_parameter1,reqhdr.visible_parameter31
order by A.visible_parameter1,reqhdr.visible_parameter31) ROW#,
row_number() OVER (Partition by
A.visible_parameter1,reqhdr.visible_parameter31
order by A.visible_parameter1,reqhdr.visible_parameter31) PREVROW#
from ITG.kcrt_table_entries A, ITG.kcrt_requests reqs,
ITG.kcrt_request_types Reqtype, ITG.kcrt_req_header_details Reqhdr
WHERE Reqtype.request_type_name IN ('ITWR - Operations/Maintenance
Proposal',
'ITWR - New/Enhance Proposal')
AND Reqtype.request_type_id = Reqs.request_type_id
AND Reqhdr.request_id=reqs.request_id
AND reqs.request_id=A.request_id
AND Reqs.STATUS_CODE != 'CANCELLED' )
START WITH ROW#=1
CONNECT BY visible_parameter1= PRIOR visible_parameter1
AND visible_parameter31= PRIOR visible_parameter31
GROUP BY visible_parameter1, visible_parameter31 order by 1

***************************************************
ERROR: ORA-01436: CONNECT BY loop in user data

Any help? (Thank you in advance!!)
Re: SQL Error [message #337435 is a reply to message #337425] Wed, 30 July 2008 21:40 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
I am not trying to be rude so please do not take this comment as such but...

did you try googling for ORA-01436

If you do you will find there are plenty of things to read about this error. Give it a try. If you do not find an answer in about 1 hour of searching and reading, then come on back with a second post and I'll help you out.

If you do find your answer, then post it here so others can learn from it.

Kevin
Re: SQL Error [message #337474 is a reply to message #337425] Thu, 31 July 2008 00:57 Go to previous message
Michel Cadot
Messages: 64122
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In addition, please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter).
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: avoid muitating table error
Next Topic: PLSQL Procedure
Goto Forum:
  


Current Time: Wed Dec 07 04:51:42 CST 2016

Total time taken to generate the page: 0.07672 seconds