cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Reciever <key> element

Former Member
0 Kudos

I read that the <key> element of the Defined XML documents allows me to perform verious actions as part of the constructed SQL query.

Does the <key> element can be used for non key values?

For example to perform the isNull= TRUE on a specific "non key field"

Appriciate your advise.

Nimrod.G

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>Does the <key> element can be used for non key values?

I belive so as key in XML SQL is just a specification of the where clause

and we don't have to use key fields in the where clause in SQL

Regards,

Michal Krawczyk

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

The conditions you can execute successfully with native sql syntax, same conditions can be applied with Key fields.

Thanks

Swarup

Former Member
0 Kudos

Please elaborate.

Former Member
0 Kudos

Hi,

As per my understanding, you are createing some JDBC strcutrue for select/ update query where you need the Key fields.

You can use the conditions with the key fields defined over here similar to native SQL statement. for e.g. you want to check if the key fields is empty or not ....correct me if I miss-interpreted it.

thanks

Swarup

Former Member
0 Kudos

Thank you all for the fast response...

I guess the days of XI 2.0 where you post a message in SDN and wait for 2 weeks are gone...gladly

Any way...

What I am looking for a way to make PI ignore elements in the target message where

null values exists.

This will allow me to create an INSERT Query to the Oracle DB excluding unused fields from query.

I have noticed a key attribute isNull=TRUE can be used with WHERE clauses.

Although not documented - I wonder whether it can be used for the INSERT as well.

former_member187339
Active Contributor
0 Kudos

Hi Nimrod,

>>isNull=TRUE can be used with WHERE clauses

Yes they can be used only with WHERE clause

>>A statement with the action INSERT must have at least one <access> element. It cannot have a <key> element.

As per help.sap.com. http://help.sap.com/saphelp_nw04/Helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm

So you cannot use isNull with INSERT

Regards

Suraj

Former Member
0 Kudos

New that.

Former Member
0 Kudos

hi,

try this: In your Receiver JDBC adapter, go to processing and give the value for Interpretation of Empty String Values as NULL Value.

regards,

Rahul