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!

Splitting multi value field in CSV-table

Status
Not open for further replies.

BerryBots

MIS
Mar 6, 2015
1
NL
Hi There,

I have not used Crystal (XI) for a long long long time, so please be kind.
I have to produce a CSV export file.
My original CSV table looks like this:

AVRdtmvg,AVRtkt,AVRid,AVRlkt,AVRpdrgv,dat_bew,BVopenb,dossier_id
21/02/1906,XX 1905-06/023,7196,Burgemeester v Mierlostr 10,Kind. C. van Zon,06/02/2015,Openbaar,BV000000017
05/07/1905,XX 1905-06/024,2959,Rijksweg 115,G.F. Heijne,06/02/2015,Openbaar,BV000000018
05/09/1905,XX 1905-06/025,"11034, 6996",Nieuwstraat 25,A.L. Botermans,06/02/2015,Openbaar,BV000000019

The problem is the AVRid field, which can contain several values. From 1 to X.

What I need to produce is this:

AVRid,dossier_id
7196,BV000000017
2959,BV000000018
11034,BV000000018
6996,BV000000019

How can I achieve this? I have no experience with splitting such a multi value field and am grateful for each hint or tip which can put me on the right direction.

Greetings from the Netherlands

Berry

 
The split function will do this for you, then you can reference the individual elements by position:

split({YourField},",")[3] + "," + split({YourField},",")[8]

This will only work if all your records have the same number of elements.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top