Re: Money Data

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Sat, 29 Nov 2008 14:12:27 -0800 (PST)
Message-ID: <c1cb9b0b-388d-4a36-b6bd-1da7533d5510@f13g2000yqj.googlegroups.com>


On Nov 28, 11:34 am, "gym dot scuba dot kennedy at gmail" <kenned..._at_verizon.net> wrote:
> "Laurence" <i.l.bre..._at_open.ac.uk> wrote in message
>
> news:d5d414a8-2dd6-4efc-b8e7-09eb9874e24c_at_x14g2000yqk.googlegroups.com...
>
>
>
> > Hi ,
>
> > I'm in the process of migrating a SQLServer database to Oracle.  This
> > is the first Oracle database I've been involved with and I'm aware
> > that there is no money data type in Oracle.  I appreciate that the
> > columns that need to hold money will need to be number datatypes, and
> > I notice that number(19,4) seems to crop up frequently in gateway
> > documents.
>
> > My question is, is there any way in which the currency symbol can be
> > retrieved with the data without needing to alter the SQL that exists
> > now ?  This will need to work irrespective of the type of program that
> > connects to the database - UNIX/C/COBOL and VB/ASP/.NET.  If it's not
> > possible, how is the SQL altered to achieve this ?
>
> > Thanks in advance.
>
> > Laurence
>
> It sounds like you want to alter a number to look like $xxx.xx or whatever
> the currency is that you desire.  You can set the nls_currency for the
> particular connection and request the number be converted to a string
> to_char(field, format string)  see the docs.
> Jim- Hide quoted text -
>
> - Show quoted text -

I agree with Jim. The specific document in question that explains the to_char function and format masks is the SQL manual.

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions181.htm#SQLRF06130

HTH -- Mark D Powell -- Received on Sat Nov 29 2008 - 16:12:27 CST

Original text of this message