Posted: Mon Aug 28, 2006 2:53 pm Post subject: Way to change for every row a columns value without loop...
Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
I have an xml message whereby a certain section is repeating. For a particular column in each row I would like to change the value for to a constant. Is there a way to do this without looping through the list....
Currently I am doing...
Code:
DECLARE intCharges INTEGER CARDINALITY(OutputRoot.XML.cjs_Report.Booking.Suspect.SuspectCharge[]);
WHILE intCntr <= intCharges DO
SET OutputRoot.XML.cjs_Report.Booking.Suspect.SuspectCharge[intCntr].ChargeClassification."j:ChargeSeverityText" = 'M';
SET intCntr = intCntr + 1;
END WHILE;
You can improve the performance quite a bit by using a reference instead of a counter. _________________ I am *not* the model of the modern major general.
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