I would like to be able do something like refer to data_value_I where I is a counter in a loop.
When I try to do this in ESQL with
"InputBody"."Message"."data_value_" || I
it tries to parse the "InputBody"."Message".data_value_" part first and evaluates it to null before appending the counter which I have cast as a char.
Is there any way I get get around this or I am approaching this incorrectly?
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
Yes, this is possible by using dynamic field name resolution using {}. For example,
InputBody."Message".{'data_value_' || I} will resolve into InputBody."Message".data_value_1, where 1 is value of I (char data type). _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum