Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: xsql and nested sql queries
On 12 Aug 2002, ksella76_at_yahoo.co.uk wrote:
> hi,
> does xsql allow for nested multiple sql queries, such as:
>
> <?xml version="1.0"?>
> <xsql:query xmlns:xsql="urn:oracle-xsql" connection="hele">
> SELECT * FROM Region
> <xsql:query xmlns:xsql="urn:oracle-xsql" connection="hele">
> SELECT * FROM Company
> </xsql:query>
> </xsql:query>
Did you try it?
I found that it didn't.
If you think about it, it wouldn't make sense. What's between the tags is text, not xml. Its an xml thing, not xsql.
> And if so, is it possible for results from an earlier query to be
> used elsewhere such as:
>
> <?xml version="1.0"?>
> <xsql:query xmlns:xsql="urn:oracle-xsql" connection="hele">
> SELECT regionname FROM Region
> <xsql:query xmlns:xsql="urn:oracle-xsql" connection="hele">
> <!-- regionname below is the regioname from above -->
> SELECT companyname FROM Company where regioname=regionname
> </xsql:query>
> </xsql:query>
You can, set-page-params or set-session-params and then bind them in the next xsql query.
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Tue Aug 13 2002 - 21:16:34 CDT