
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Multiple spaces in field
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]
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try :
replace(Field,' ',' ')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doesn't work, then double spaces become a single space. When there are 10 double spaces it converts into 5 single spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am assuming that field value from VDBArtikel. Try the attachment using Mapping table. You can reload using the correct path

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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* ];


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ') ,' ',' ')
