SELECT to_clob(
rdbms.xmltype.getclobval(
rdbms.XMLQuery(
LITERAL ' ''<Tours>
{for $c in ora:view("SCHEDTOUR")/ROW
WHERE $c/START_DATE > current-date()
RETURN <Tour>(<Name>{$c/DESTINATION/text()}</Name>,<StartDate>{$c/START_DATE/text()}</StartDate>,<EndDate>{$c/RETURN_DATE/text()}</EndDate>,<Price>{$c/PRICE/text()}</Price>)</Tour>}
</Tours>'' PASSING SYSDATE AS "s" RETURNING CONTENT'
)
)
)
|