This topic is locked

Oracle Problem with Connect by Prior command

7/13/2012 12:20:08 AM
PHPRunner General questions
A
Abhijeet author

Hello Room,
Greetings !
I am using phprunner 5.3 build 7474 on windows xp. I have a master detail table details as given below.
Master table:

projectmaster (co number(1),projectid number(5));
Details Table (co number(1),projectid number(5),milestoneid number(5),undermilestoneid number(5),milestonename)
I want a tree structure in oracle connect by prior command. So I edited the sql in the details table as follows.
SELECT co,projectid,milestoneid,

substr(LPAD(' ',4(LEVEL-1))||substr(milestonename,1,30),1,50) "MileStoneLevel",level

FROM scott.projectdetails

START WITH undermilestoneid = 0

CONNECT BY PRIOR milestoneid = undermilestoneid
I am able to see the records in the sql query page. the php code is generated successfully as well. Now I have a master detail page on phprunner. I have removed the tick on the relationship window in "Display number of child records" , "Hide Details link if no child exist", "Display master info on details page"
Now when I click on the details link I get the error as given below.
ociexecute() [function.ociexecute]: ORA-00933: SQL command not properly ended

select count(
) FROM scott.projectdetails START WITH undermilestoneid = 0 CONNECT BY PRIOR milestoneid = undermilestoneid where co=19 and projectid=1
I have oracle 9i on Windows xp.
As I have almost reached it there, I just want to remove this count command which is causing error. this command has not been given by me.
Please help me.
Thank you in advance.