SQL/OPS question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL/OPS question

Alexander Žaťko
I have a XPL that creates a temp. table in SQL Server DB and  
subsequently executes a stored procedure against that table. My  
problem is that the stored procedure runs before the table is  
created. Is there a good way to avoid this in OPS?



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: SQL/OPS question

Erik Bruchez
Administrator
You mean that you are using two oxf:sql processors, right? In which case
this could be an issue of execution order in XPL. The answer depends on
your actual configuration. One way to fix this is to make the second
oxf:sql use the output of the first one. Another way is to have somebody
consume the output of the first oxf:sql first, and the output of the
oxf:sql second.

You can also have multiple sql:execute statements within a single SQL
processor configuration, in which case the sql:execute statements
execute in order.

-Erik

Alexander Zatko wrote:
> I have a XPL that creates a temp. table in SQL Server DB and
> subsequently executes a stored procedure against that table. My problem
> is that the stored procedure runs before the table is created. Is there
> a good way to avoid this in OPS?

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: SQL/OPS question

Alexander Žaťko
Erik,

Configuration of the XPL contains a xsl processor that builds a  
config XML for a single oxf:sql processor. This config XML contains 2  
sql:execute elements - the first one that builds the temp table and a  
following one that calls the stored procedure. So according to your  
last sentence:

> You can also have multiple sql:execute statements within a single  
> SQL processor configuration, in which case the sql:execute  
> statements execute in order.

...my setup should work. Here is the code that preps the sql config:

<sql:config>
     <pos-records>
         <sql:connection>
             <sql:execute>
                 <sql:query>
                     ...select top 100 percent  <column names>  
INTO... name of the temporary table...
                 </sql:query>
             </sql:execute>
             <sql:execute>
                 <sql:call>{ call StoredProcedureName('<xsl:value-of  
select="pos-model/download-format"/>','
                     ....
                     more comma-separated sp arguments
                     ...
                     ') }</sql:call>
             </sql:execute>
         </sql:connection>
     </pos-records>
</sql:config>

I will try to daisy-chain output of the first with the second and see  
if that helps.

Thank you.

A.

On Sep 26, 2006, at 7:52 PM, Erik Bruchez wrote:

> You mean that you are using two oxf:sql processors, right? In which  
> case this could be an issue of execution order in XPL. The answer  
> depends on your actual configuration. One way to fix this is to  
> make the second oxf:sql use the output of the first one. Another  
> way is to have somebody consume the output of the first oxf:sql  
> first, and the output of the oxf:sql second.
>
> You can also have multiple sql:execute statements within a single  
> SQL processor configuration, in which case the sql:execute  
> statements execute in order.
>
> -Erik
>
> Alexander Zatko wrote:
>> I have a XPL that creates a temp. table in SQL Server DB and  
>> subsequently executes a stored procedure against that table. My  
>> problem is that the stored procedure runs before the table is  
>> created. Is there a good way to avoid this in OPS?
>
> --
> Orbeon - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>
> --
> You receive this message as a subscriber of the ops-
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/ 
> wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws