Skip to Main Content

Database Software

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!

Xpath functions in oracle

860250Aug 24 2012 — edited Aug 28 2012
Hi,

Is there any function like fn:local-name(.) in oracle XPATH functions. If yes help me wit ha simple example.

I am new to Oracle & migrating procedure from SQL server to oracle where procedure taken XML script as input.

I need to convert below SQL server select statement to Oracle.

SELECT converseUID,
'Distributed',
cast(ServiceCalls.query('fn:local-name(.)') as varchar(100)),
1,
WIP.ServiceCalls.value('(TotalTime)[1]','int'),
WIP.ServiceCalls.value('(Status)[1]','varchar(100)'),
WIP.ServiceCalls.value('(Primary_deferred)[1]','varchar(20)'),
WIP.ServiceCalls.value('(FromCache)[1]','bit'),
@DateTimeStamp
FROM @WIP.nodes('//WIP/gatewayServiceCalls/*') as WIP(ServiceCalls)
WHERE WIP.ServiceCalls.value('(startTime)[1]','int') <> 0

Thanks in advance.
This post has been answered by odie_63 on Aug 28 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2012
Added on Aug 24 2012
5 comments
242 views