I have a field in Oracle table with XML data that varies in size and position. I need to pull out the data from some of these nodes using SQL.
For example in the XML below the node &BADGE_NUM contains the value TEST05. I would like to write an sql that returns TEST05 in a specific column. I cannot use SUBSTR because fields prior to BADGE_NUM vary in length so BADGE_NUM is not always in the same position.
nb It uses a subquery to allow posleft and posright to be referenced which also has the advantage of allowing use of a case expression to assist in validation.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
This worked perfectly in Toad but when I moved to clients network and run with SQL Developer it interpreted the ']' as a variable, so it prompted me to enter a value.
How can I get this to work in SQL Developer?
PortletPaul
try mine :)
Your help has saved me hundreds of hours of internet surfing.
Open in new window
nb It uses a subquery to allow posleft and posright to be referenced which also has the advantage of allowing use of a case expression to assist in validation.