I have a problem, I have not found a solution yet, so I ask for your help. In my database, I have int, decimal and string that need to be converted to numeric with a certain length and precision to be included in a flat file.
Example:
integer 123 to numeric(8,0) ==> 00000123
decimal 123,123 to numeric(8,8) ==> 0000012312300000
String "22" to numeric(8,0) ==> 00000022
You cannot put a comma or period. Is there a simple solution? I try a lot of things, but no one will give me my result, except that I do foreach loops. Filed in my flat file is too dirty.
EDIT:
a flat file receives information based on the starting point and length, so all data included in the file must be cetain. And for Numeric, I have an example
database Decimal Price = 123,456
File Numeric(8,6) Price = 00000123456000
I wanted to know how you can parse any decimal or integer data based on N (,)