cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC receiver structure for delete

Former Member
0 Kudos

Hi all,

My requirement is sto insert the records if status =F,T,P,O,S. and delete from DB table if status is O.

Structure I used.

Please note a3 belongs to the Status fileld

MTanme->

statement1

action=UPDATE_INSERT

table=abc

access->

a1

a2

a3

a4

key

a1

statement2

action=DELETE

table=abc

key 1

a3

key 2

a3

In mapping: since I need to delete records with ststus =O,in key I am using

a3-- -


aT

concat(O)

How to delete only the records whose status is O

Thanks,

Srinivasa.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Try this in message mapping:

1.UPDATE_INSERT

IF

a3->remove context(node function)->FixValues(default:FALSE; F,T,P,S: TRUE)

THEN

const(UPDATE_INSERT)

and map this IF operator to first ACTION

2. DELETE

IF

a3 equalS(text function) const(O)

THEN

const(DELETE)

and map this IF operator to second ACTION

BR,

Dzmitry

Former Member
0 Kudos

I tried this I dint get it.

Insted of this can I proceed using dml query

delete from zaa where (f3='0' OR f3='O')--->constant->access.

Will this work?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

If status = F,T,P,S..

then pass the constant 'UPDATE_INSERT' into action. Use the same if condition for generating <access> using the nodefunction createif.

else status = O

then pass the constant 'DELETE' into action.

Regards,

Sreenivas

Former Member
0 Kudos

How do I do this?could you explain in more detailed way.