Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

emulate "wm_sys.wm_conat over(order by sKey)" using "model caluse"

Aketi JyuuzouApr 14 2009 — edited Nov 4 2010
create table workT(ID,Val) as
select 1,'AAA' from dual union all
select 1,'BBB' from dual union all
select 1,'CCC' from dual union all
select 1,'CCC' from dual union all
select 1,'DDD' from dual union all
select 2,'EEE' from dual union all
select 2,'EEE' from dual union all
select 2,'EEE' from dual union all
select 2,'EEE' from dual union all
select 2,'FFF' from dual union all
select 2,'FFF' from dual union all
select 2,'GGG' from dual;
There is one of usage of "wm_sys.wm_concat" and emulate it.
col conStr for a50

select ID,Val,
wm_sys.wm_concat(Val)
over(partition by ID order by Val) as conStr
  from workT

select ID,aVal,
substr(sys_connect_by_path(bVal,','),2) as conStr
  from (select a.ID,a.Val as aVal,b.Val as bVal,
        a.RowID as Row_ID,
        Row_Number()
        over(partition by a.RowID order by b.Val) as rn
          from workT a,workT b
         where a.ID = b.ID
           and a.Val >= b.Val)
 where connect_by_IsLeaf = 1
Start With rn=1
connect by prior rn+1   = rn
       and prior Row_ID = Row_ID
order by ID,aVal;

ID  aVal  conStr
--  ----  ---------------------------
 1  AAA   AAA
 1  BBB   AAA,BBB
 1  CCC   AAA,BBB,CCC,CCC
 1  CCC   AAA,BBB,CCC,CCC
 1  DDD   AAA,BBB,CCC,CCC,DDD
 2  EEE   EEE,EEE,EEE,EEE
 2  EEE   EEE,EEE,EEE,EEE
 2  EEE   EEE,EEE,EEE,EEE
 2  EEE   EEE,EEE,EEE,EEE
 2  FFF   EEE,EEE,EEE,EEE,FFF,FFF
 2  FFF   EEE,EEE,EEE,EEE,FFF,FFF
 2  GGG   EEE,EEE,EEE,EEE,FFF,FFF,GGG
However,I want to know "model solution" which is tablseScan once only.
Can we make it?
I supoose we must use TableFunction.

I am using Oracle10gR2.
This post has been answered by Rob van Wijk on Apr 14 2009
Jump to Answer

Comments

Timo Hahn

Have you tested the web service in the EM on the stand-alone server?
Maybe the server has a security-enabled you have not on your embedded sever. Have you talked to an admin about this?

Timo

Aniruddh Mishra-Oracle

I have tested the webservice in EM on the stand alone server. It's working.
If I test the webservice directly through the webservice endpoint url in the EM then it's working. I'm able to trigger the webservice and receive the result. However, when I try to consume the web service through Web Service data control it throws the above mentioned error.

Timo Hahn

Have you tried the web service with any other tool e.g. soapui?
The error you get points to a missing authorization or if you don't use security to a wrong configuration when you created the part of the app that should consume the web service.

Timo

Filip Huysmans

Hi everyone,

is here a solution for? I have the same issue, after upgrading from 11.1.1.7 to 12.2.1.4.
The webservice call worked correctly before and generates now this error.
Is there an extra security setting we need to set?

Thx

Timo Hahn

@filip-huysmans Please don't hijack an almost one year old thread. Open your own question providing all information about your environment.
Timo

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 13 2009
Added on Apr 14 2009
6 comments
2,074 views