cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC SQL Search,suppress node creation

former_member271795
Participant
0 Kudos

I want to create a xml sql structure that can be used to search a database table

There are 4 key fields, which can be populated. If a outbound message key is not populated I don;t want to create the

node in the inbound message, as thiis creates a key = null entry in the sql

eg

message map

Key1 = key1

Key2 = key2

Key3 = key3

Key4= key4

outbound message

<key1> </key1>

<key2>abc </key2>

<key3> </key3>

<key4> def</key4>

inbound message

<key1> </key1>

<key2>abc </key2>

<key3> </key3>

<key4> def</key4>

which produces a sql statement

select key1 from table ghj

where key1 = null

and key2 = abc

and key3 = null

and key4 = def

What I want to procude is a inbound message of

<key2>abc </key2>

<key3> </key3>

which produces a sql statement

select key1 from table ghj

where key2 = abc

and key4 = def

If the outbound has either key1 or key2 populated then I want the corresponding nodes created

how can I map this requirement

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

What I want to procude is a inbound message of

<key2>abc </key2>

<key3> </key3>

which produces a sql statement

select key1 from table ghj

where key2 = abc

and key4 = def

You can use this mapping:

For key1


key1 -> equalsS -> not -> ifWithoutElse -> key1
Constant: -> /    key1 -> /

For key2


key2 -> equalsS -> not -> ifWithoutElse -> key2
Constant: -> /    key2 -> /

For key3


key3 -> equalsS -> not -> ifWithoutElse -> key3
Constant: -> /    key3 -> /

For key4


key4 -> equalsS -> not -> ifWithoutElse -> key4
Constant: -> /    key4 -> /

Hope this helps,

Mark

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Can, you give more information like if you are doing any mapping after the records are pulled etc etc?