Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following problem when I load a. Csv column I presented a balance '(' character which you remove with a Replace (@ 3, '(','') as balance, only now it takes me like a text and not a number and I can not use Sum (Balance) in the table simple
I believe the balance numbers use a format with a decimal separator ',' which differs from your standard decimal separator and causes the problem.
If so, change the standard format to ',' or parse the balance numbers in using num#() function:
SET ThousandSep='.';
SET DecimalSep=',';
and/ or
Directory;
LOAD @1,
@2,
@3,
num#(Replace(@3,'(',''),'#',',','.') as Balance
FROM
test.csv
(txt, codepage is 1252, no labels, delimiter is ',', msq);
I believe the balance numbers use a format with a decimal separator ',' which differs from your standard decimal separator and causes the problem.
If so, change the standard format to ',' or parse the balance numbers in using num#() function:
SET ThousandSep='.';
SET DecimalSep=',';
and/ or
Directory;
LOAD @1,
@2,
@3,
num#(Replace(@3,'(',''),'#',',','.') as Balance
FROM
test.csv
(txt, codepage is 1252, no labels, delimiter is ',', msq);
Thank you very much.