|
|
|
|
Re: How to read oracle diagram in the documentation? [message #442538 is a reply to message #442520] |
Mon, 08 February 2010 23:05   |
 |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:in sys_connect_by_path, the second parameter is chr,
but chr(10) or chr(13) is not allowed I guess.
SQL> select level, sys_connect_by_path(ename,ch(10)) path
2 from emp
3 connect by prior empno = mgr
4 start with ename='KING'
5 /
select level, sys_connect_by_path(ename,ch(10)) path
*
ERROR at line 1:
ORA-30003: illegal parameter in SYS_CONNECT_BY_PATH function
You're right, you may raise a documentation bug because the restriction is missing.
Regards
Michel
[Updated on: Mon, 08 February 2010 23:06] Report message to a moderator
|
|
|
|
|
Re: How to read oracle diagram in the documentation? [message #442555 is a reply to message #442550] |
Tue, 09 February 2010 00:35   |
 |
rahulvb
Messages: 924 Registered: October 2009 Location: Somewhere Near Equator.
|
Senior Member |
|
|
Hay Michel
same error for me too.
1 select level, sys_connect_by_path(ename,chr(47)) path
2 from emp
3 connect by prior empno = mgr
4 start with ename='KING'
5 /
select level, sys_connect_by_path(ename,chr(47)) path
*
ERROR at line 1:
ORA-30003: illegal parameter in SYS_CONNECT_BY_PATH function
but when I have replaced chr(47) with '/' and it worked for me!
1 select level, sys_connect_by_path(ename,'/') path
2 from emp
3 connect by prior empno = mgr
4* start with ename='KING'
/
no rows selected
My version is
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
[Updated on: Tue, 09 February 2010 00:36] Report message to a moderator
|
|
|
|
|
|
Re: How to read oracle diagram in the documentation? [message #443469 is a reply to message #443468] |
Mon, 15 February 2010 23:55   |
kang
Messages: 89 Registered: November 2007
|
Member |
|
|
my mistakes.
select level,
trim(sys_connect_by_path(ename,'
')) path
from emp
connect by prior empno = mgr
start with ename = 'KING'
select level,
trim(ltrim(sys_connect_by_path(ename,'
'),chr(10))) path
from emp
connect by prior empno = mgr
start with ename = 'KING'
conclusiion!
chr(10) can't be trimed with trim method.
Thanks.
|
|
|
|
|
|