Unloading a DECIMAL with no period
Posted in 2007
Topics: Migration, Import/Export & Data Conversion, Internationalization & Character Sets
Hi. I have to deliver an unload-like file from a query with many DECIMAL data, but they require that numbers be rounded and be shown with no period. But when I use unload the final file shows "250.0" instead of "250", which is what they want. I didn't find anything about this issue in the SQL Reference (It just mentions that DECIMAL uses format #.# and INT uses #, but I'm afraid of getting overflow error if I convert query results in integer) or in que GLS Reference. I wonder if somebody can help me on this. thanks in advance Omar Mu'oz. P. By the way, I'm working with Informix 9.4 FC7. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Omar Mu'oz wrote:
> Hi.
> I have to deliver an unload-like file from a query
> with many DECIMAL data, but they require that numbers
> be rounded and be shown with no period. But when I use
> unload the final file shows "250.0" instead of "250",
> which is what they want.
> I didn't find anything about this issue in the SQL
> Reference (It just mentions that DECIMAL uses format
> #.# and INT uses #, but I'm afraid of getting overflow
> error if I convert query results in integer) or in que
> GLS Reference. I wonder if somebody can help me on
> this.
>
> thanks in advance
> Omar Mu'oz.
>
> P. By the way, I'm working with Informix 9.4 FC7.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
unload to temp_file.unlselect trunc(20.01)||"" from systables where tabid = 1;
It stinks, but for a one time job it will work on any version...
Regards.
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...