Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can i reduce multiple spaces in a field in the loading script?
Field value from the data is: 165/70TR13 APLUS TL A606 (NEU) 79T *E*
I would like it to be: 165/70TR13 APLUS TL A606 (NEU) 79T *E*
Directory;
LOAD [VDB Articlenr.] as VDBArtikel,
[EAN code] as EAN,
Brand as Merk,
Measurecode as Maat,
Vehicle,
Season,
num([KB price]) as BrutovdBan,
num([Netto Price]) as Netto,
num([Netto Price])*2 as BrutoDubbel,
[Article description] as Omschrijving,
Upper(Brand & Season) as Match
FROM
[..\..\Temp\266032_1.csv]
You can nest multiple replace statements so if the result of the first replace is two spaces, they are replaced again.
replace(replace(replace(replace(replace(Field,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ')
try :
replace(Field,' ',' ')
Doesn't work, then double spaces become a single space. When there are 10 double spaces it converts into 5 single spaces.
I am assuming that field value from VDBArtikel. Try the attachment using Mapping table. You can reload using the correct path
One way could be to use something like this
Table: LOAD Concat(Field, ' ', Num) as Field; LOAD Field, RecNo() as Num Where Len(Trim(Field)) > 0; LOAD SubField(Field, ' ') as Field; LOAD * INLINE [ Field 165/70TR13 APLUS TL A606 (NEU) 79T *E* ];
You can nest multiple replace statements so if the result of the first replace is two spaces, they are replaced again.
replace(replace(replace(replace(replace(Field,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ')