Hello all,
Here is an example of some TSQL that I would like to rewrite in PL/SQL.
DECLARE @xml XML
SET @xml = '<theRange>
<theRow><First>Bob</First><Last>Smith</Last><Age>30</Age></theRow>
<theRow><First>Sue</First><Last>Jones</Last><Age>34</Age></theRow>
<theRow><First>John</First><Last>Bates</Last><Age>40</Age></theRow>
</theRange>'
;WITH OpenedXML AS (
SELECT r.value('First[1]','varchar(50)') AS First,
r.value('Last[1]','varchar(50)') AS Last,
r.value('Age[1]','int') AS Age
FROM @xml.nodes('//theRange/theRow') AS Row(r)
)
SELECT *
FROM OpenedXML
WHERE Age BETWEEN 30 AND 35
Can anyone give me some direction here.