Re: how to format query results

2004-08-20 Thread Tim Bunce
On Thu, Aug 19, 2004 at 01:04:36PM -0700, Ravi Kongara wrote: 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

RE: how to format query results

2004-08-20 Thread Reidy, Ron
: Friday, August 20, 2004 10:34 AM To: Ravi Kongara Cc: DBI-Users Subject: Re: how to format query results On Thu, Aug 19, 2004 at 01:04:36PM -0700, Ravi Kongara wrote: 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

Re: how to format query results

2004-08-20 Thread Tim Bunce
/oracle-docs/server.920/a96529/ch3.htm#50693 Tim. - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:34 AM To: Ravi Kongara Cc: DBI-Users Subject: Re: how to format query

Re: how to format query results

2004-08-20 Thread Ravi Kongara
: DBI-Users Subject: Re: how to format query results On Thu, Aug 19, 2004 at 01:04:36PM -0700, Ravi Kongara wrote: 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

RE: how to format query results

2004-08-20 Thread Reidy, Ron
[mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 11:40 AM To: Reidy, Ron Cc: Tim Bunce; Ravi Kongara; DBI-Users Subject: Re: how to format query results On Fri, Aug 20, 2004 at 10:34:07AM -0600, Reidy, Ron wrote: I looked in NLS*PARAMETERS (NLS_DATABASE, NLS_INSTANCE, and NLS_SESSION

Re: how to format query results

2004-08-20 Thread Tim Bunce
To: Ravi Kongara Cc: DBI-Users Subject: Re: how to format query results On Thu, Aug 19, 2004 at 01:04:36PM -0700, Ravi Kongara wrote: 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

RE: how to format query results

2004-08-19 Thread Reidy, Ron
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]

Re: how to format query results

2004-08-19 Thread Ravi Kongara
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

Re: how to format query results

2004-08-19 Thread Chuck Fox
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

Re: how to format query results

2004-08-19 Thread Ravi Kongara
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

RE: how to format query results

2004-08-19 Thread Reidy, Ron
Look at the type_info() sub routine. - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Ravi Kongara [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 4:53 PM To: Chuck Fox Cc: DBI-Users Subject: Re: how to format query results You are right