|
Home > Archive > BizTalk Server General > April 2006 > Different Sql Commands depending on an XML element
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Different Sql Commands depending on an XML element
|
|
| Luis Esteban Valencia 2005-07-14, 5:51 pm |
| Hello My XML has
<ns0:BusCard_Request xmlns:ns0="http://BTSDG_SQL">
<ns0:sync>
<ns0:after>
<ns0:BusinessCards NameOnCard="Sam Watkins"
TitleOnCard="President" Quantity="1000" />
</ns0:after>
</ns0:sync>
</ns0:BusCard_Request>
And its working and inserting rows on the table
What about if I want that when quantity is > 100000 it update a row on the
table named status="Pending for Review" for example.
What do I need to do?
Thanks
| |
| Doug Girard [MSFT] 2006-04-27, 7:26 am |
| Luis,
I'm not sure how you're invoking this call to the SQL adapter to begin
with, but you can use conditional logic in several places to make this
call. If you are implementing a pure messaging scenario or direct binding
to the message box, then promoting the quantity property into the message
context and creating a specific send port filtering on qty > 100000 would
work. You could alternatively use If ... Then logic if you are calling the
send port from orchestration.
HTH,
Doug Girard [MSFT]
Note: This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>From: "Luis Esteban Valencia" <levalencia@avansoft.com>
>Subject: Different Sql Commands depending on an XML element
>Date: Thu, 14 Jul 2005 09:29:27 -0500
>Lines: 21
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <#V2KP#HiFHA.3288@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.biztalk.general
>NNTP-Posting-Host: 200.124.170.10
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.biztalk.general:15578
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>Hello My XML has
><ns0:BusCard_Request xmlns:ns0="http://BTSDG_SQL">
> <ns0:sync>
> <ns0:after>
> <ns0:BusinessCards NameOnCard="Sam Watkins"
> TitleOnCard="President" Quantity="1000" />
> </ns0:after>
> </ns0:sync>
></ns0:BusCard_Request>
>
>
>And its working and inserting rows on the table
>
>What about if I want that when quantity is > 100000 it update a row on the
>table named status="Pending for Review" for example.
>
>What do I need to do?
>
>Thanks
>
>
>
| |
| Greg Forsythe 2006-04-27, 7:26 am |
| You could also do this in a map.
use the Logical Greater Than and Value Mapping functoid to map a fixed
string into the status attribute.
Assuming status is a nullable column in the same table - add an optional
attribute status to the BusinessCards node.
<ns0:BusCard_Request xmlns:ns0="http://BTSDG_SQL">
<ns0:sync>
<ns0:after>
<ns0:BusinessCards NameOnCard="Sam Watkins"
TitleOnCard="President" Quantity="100000" status="Pending For
Review" />
</ns0:after>
</ns0:sync>
</ns0:BusCard_Request>
Greg
"Doug Girard [MSFT]" <dogirard@online.microsoft.com> wrote in message
news:RaB3QZKaGHA.932@TK2MSFTNGXA01.phx.gbl...
> Luis,
>
> I'm not sure how you're invoking this call to the SQL adapter to begin
> with, but you can use conditional logic in several places to make this
> call. If you are implementing a pure messaging scenario or direct binding
> to the message box, then promoting the quantity property into the message
> context and creating a specific send port filtering on qty > 100000 would
> work. You could alternatively use If ... Then logic if you are calling
> the
> send port from orchestration.
>
> HTH,
> Doug Girard [MSFT]
>
> Note: This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --------------------
>
|
|
|
|
|