Numeric value issue
Moderators: chulett, rschirm, roy
Numeric value issue
Hi,
I am trying to generate a unique sequence number and appending that value to a string and the data type of that column is varchar.
For example the value would be 'ABC_123', but for my scenario the value is populating as 'abc_7.61778e+06' instead of 'abc_7617780'
Can you please help me to get the solution as i tried using stringToDecimal but didnt work.
I am trying to generate a unique sequence number and appending that value to a string and the data type of that column is varchar.
For example the value would be 'ABC_123', but for my scenario the value is populating as 'abc_7.61778e+06' instead of 'abc_7617780'
Can you please help me to get the solution as i tried using stringToDecimal but didnt work.
Hi craig,
I did a search on "scientific notation" but couldnt able to find a solution.
One solution i have in my mind is for example if i am getting the value as 7.61778e+06 then i can take the number before 'e' and multiply by 10 and the number after + which is '6' i.e 7.61778*10*06.
Can you please provide me a better solution if there is any other alternative solution.
And what would be the reason of getting a value as abc_7.61778e+06 of datatype as Varchar.
Is it because before the number there is a string , so it converts the value into abc_7.61778e+06 instead of 'abc_7617780'
I did a search on "scientific notation" but couldnt able to find a solution.
One solution i have in my mind is for example if i am getting the value as 7.61778e+06 then i can take the number before 'e' and multiply by 10 and the number after + which is '6' i.e 7.61778*10*06.
Can you please provide me a better solution if there is any other alternative solution.
And what would be the reason of getting a value as abc_7.61778e+06 of datatype as Varchar.
Is it because before the number there is a string , so it converts the value into abc_7.61778e+06 instead of 'abc_7617780'
-
- Participant
- Posts: 91
- Joined: Wed Apr 20, 2005 7:59 pm
- Location: U.S.