cancel
Showing results for 
Search instead for 
Did you mean: 

How to simulate a Between with XML SQL document format

Former Member
0 Kudos

Hi I have an interface form Proxy to JDBC and i am using XML SQL document format to send de SELECT sentence, but my SELECT has to be something like this

SELECT field1 field2 FROM dbTable WHERE field2 BETWEEN value1 AND value2.

The "where" part of the xml should be something like...

<key1>

<field2 compareOperation=u201DGTEQu201D>value1</field2>

<field2 compareOperation=u201DLTEQu201D>value2</field2>

</key1>

But i cant define twice the "field2" tag in the data type

It is a way solve this??

Thanks!

Mariano.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mariano,

you can try this with an SQL Query (Action=SQL_QUERY).

see this link: http://help.sap.com/saphelp_erp2005/helpdata/de/2e/96fd3f2d14e869e10000000a155106/content.htm

Hope this helps.

Regards,

Björn

udo_martens
Active Contributor
0 Kudos

Yes, you are right,

see Sudhirs blog [Performing SQL Joins in XI u2026 (for newbies)|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1725.] [original link is broken] [original link is broken] [original link is broken];

For creating the statement dynamicly XSL could be used.

Regards,

Udo

Former Member
0 Kudos

I did it, it was really simple, all I have to do is to configure the subelement of KEY i want to repeat as 0..unbounded, that way the tag can be more than once and I can use one for LT and other for GT.

Regards.

Mariano.

udo_martens
Active Contributor
0 Kudos

Hi Mariano,

as far as i know is that not possible in the standard. You could write a stored procedure and call it via jdbc.

Regards,

Udo