On Fri, Aug 20, 2004 at 12:39:39PM -0600, Reidy, Ron wrote:
> Right, but this defines group separators for thousands, millions, etc., and decimal
> characters. I am under the impression the OP wants to set the precision/scale of
> numeric columns.
D'oh. You can tell I'm still on holiday.
As far as I know that can't be done except by changing the SQL to
add a function around the fields (to_char(), round(), trunc() etc),
or defining a view that does that and then query the view.
Doing it client-sides might be easier. e.g. use type_info() or $sth->{TYPE} etc
to create a sprintf() format string that performs the required formatting.
Tim.
> 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) in the
> > data dictionary and saw nothing. That is why I suggested using type_info().
>
> Found it: NLS_NUMERIC_CHARACTERS
>
> e.g.
> http://www.cise.ufl.edu/help/database/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 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 'ALTER SESSION' command for setting Number
> > > Format at session level.
> >
> > I'm sure there's an NLS setting for this you can alter for the session.
> > But I can't remember the name or find it in the quick ref guide I have handy.
> > Read the Oracle docs.
> >
> > Tim.
> >
> > 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.
> >
> >
>
> 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.
>
>