You are right, but my intention is to avoid the Test itself.
Ravi
Chuck Fox wrote:
Ravi,
Why not try something like testing the var using Posix functions to determine if it is
a number and then sprintfing ?
Ravi Kongara wrote on 8/19/2004, 6:25 PM:
I won't be able to use sprintf( ), b'coz column type is not known. Query
includes both
numeric and character columns. I may have to check for each column
whether it's a NUMBER or not, and then apply
sprintf, which i'm not in favour of. Instead if a set number format (
like date format) at session level, number
columns are automatically rounded off .
Thanks for your quick reply though.
-Ravi
Reidy, Ron wrote:
The SQL*Plus 'set' commands are used for display purposes only to STDOUT. To get the correct formatting of variables, use 'sprintf()'.
See perldoc -d sprintf.
-----------------
Ron Reidy
Senior DBA
Array BioPharma, Inc.
-----Original Message-----
From: Ravi Kongara [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 19, 2004 2:05 PM
To: DBI-Users
Subject: how to format query results
Task: Set the number format to 16 decimal positions for Oracle DBI session.
Versions: Perl 5.6.1, DBI 1.42, DBD::Oracle 1.14, Oracle 8.1.7 on Solaris.
I guess Oracle doesn't have 'ALTER SESSION' command for setting Number
Format at session level.
Basically how can i set those SQLPLUS options ( ex : set numwidth 16 )
in DBI..?
Any clues..?
Thanks,
Ravi Kumar
This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended
to be for the use of the individual or entity named above. If you are not the
intended recipient, please be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. Please notify the
sender of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.