Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with String manipulation

Status
Not open for further replies.

mathu17

Technical User
Feb 2, 2012
7
CA
I'm working with a report where i have to display data from xml tags. the XML looks like the following,

<Types><Type Id="Dial" Date="01/13/2012"/><Type Id="IP" Date="01/13/2012"/></Types>

i need to display like

CommType IssDate

Dial 01/13/2012
IP 01/13/2012

Can someone please help me with this.
Working with CR11 and DB2.

thanks,
 
mathu17,

A bit busy today, so I can't work through the specific formula for you, but i *think* the most simple approach would be to use MID() where the start point is flagged with INSTR() (and an integer for adjustment). Are there only two types (Dial & IP)?

I *think* you will need a formula for each potential Type ID.
Something like:
{@IssueDate_TypeDial}
Code:
Mid({Table.Field},InStr(UpperCase({Table.Field}),"DIAL")+12,10)
This should return the string starting 12 Characters after the start of Dial and return a string of length 10.

A similar formula would be needed for IP, though the +12 would be a different offset.

Hope this helps! Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top