Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello and Happy New Year Experts,
I have a table like shown below:
marque:
load mid([Field0_], 5) as Désignation,
[Field1_] as Emballage,
[Field2_] as Contenu,
[Field3_] as [Nb Cols],
[Field4_] as [Nb Pals],
[Field5_] as [Nb Litres]
resident ZSD_EGF_COMLIVSAISI
There is my problem: i wanna replace all the ',' by '.' in the column 'Contenu' but i don't know how to modify the value of this field.
It should be something like this:
replace([Field2_], ',', '.')
But this obviously don't work.
Can anyone help me for this?
Thanks for your replies,
Best Regards,
Loïc
Hi,
You can do the following:
marque:
load mid([Field0_], 5) as Désignation,
[Field1_] as Emballage,
[Field2_] as Contenu,
[Field3_] as [Nb Cols],
[Field4_] as [Nb Pals],
[Field5_] as [Nb Litres]
resident ZSD_EGF_COMLIVSAISI;
Temp:
Load *,
Replace (Contenu,',','.') as Contenu_changed;
Hope this helps!
What do you mean with 'obviously' don't work.
It should work, so please post some sample data so we can see the obvious.
Hi,
replace([Field2_], ',', '.') as Contenu,
should do the work...
Thanks for your replies!
The column 'Contenu' still has values like '0,200' so the content does not updated in the table ![]()
Seems to work for me, only dots after replace:
marque:
load
replace([Field2_],',','.') as Contenu
INLINE [
Field2_
",,.."
];
Are you trying to change a number format? Then look into the default format variables and num() function.
SET ThousandSep=',';
SET DecimalSep='.';
Hi Ioic,
Please find the attachment, may it helps you.
Santhosh G
Thank you very much!
This is always easier to understand with an example ![]()