Oracle XMLSequence (Extract non-leap years)
SELECT
 value(xmlt).getstringval()
  Attribute_Value
FROM
 table(XMLSequence(extract(XMLType(' 
   <Year>
    <Y>2010</Y>
    <Y>2011</Y>
    <LY>2012</LY>
   <Year>'), '/Year/Y'))) xmlt;
XMLSequence - Extract non-leap Year

Oracle XMLSequence (Extract leap year)
SELECT
 value(xmlt).getstringval()
  Attribute_Value
FROM
 table(XMLSequence(extract(XMLType(' 
   <Year>
    <Y>2010</Y>
    <Y>2011</Y>
    <LY>2012</LY>
   <Year>'), '/Year/LY'))) xmlt;
XMLSequence - Extract leap Year


Oracle registered trademark of Oracle Corporation.

Last Revised On: August 13, 2014

  1272