Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I'm having a strange situation that can't solve.
First of all, here's the code
tmpTable3:
LOAD
eMediana as bulkInsert --> Here I'm loading a single number, with decimals
Resident tmpTable2
where mes = 1;
LET vBulkInsert = Num(Peek('bulkInsert')); --> Here i'm storing that number into a variable
DROP Table tmpTable3;
tmpTable4:
NoConcatenate
LOAD *
Resident tmpTable2; --> Loading more stuff
Join
LOAD --> Adding a single line by hand, using the number stored earlier ion variable vBulkInsert
13 as mes,
$(vBulkInsert) as eMediana
AutoGenerate(1);
Now this is what I get.
If I print the data stored in the variable into a text object, I get the correct number. No problem here.
But, when I use the number stored in eMediana from mes 13 from the table tmpTable4, I get the same number, bit with no comma, so all the decimals became an integer number.
I have been trying to solve with number formatting, commas and dots as decimasl o thousands delimiter, but with no success.
Any help will be preciated
Regards
Found what I was doing wrong.
I was using variables in a wrong way. I use $(vMaxDate) instead of '$(vMaxDate)'
Adding quotes worked fine.
Thanks all fro your help!
May be load with num function
Num($(vBulkInsert), '#,##,00') as eMediana
>>with no comma, so all the decimals became an integer number.
You mean that, for example 7,12 (decimal comma) becomes 712?
Thanks for your help Anil. I tried what you said, but as a result I get zero (0.00) in table.
That's right. That's exactlly what is happening. But only when loading variable content (the number here is ok) to the table (the result is the same number but with no comma, as an integer)
Found what I was doing wrong.
I was using variables in a wrong way. I use $(vMaxDate) instead of '$(vMaxDate)'
Adding quotes worked fine.
Thanks all fro your help!