From konkodi221@rediffmail.com Thu Oct 27 06:14:08 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BE152DB02F for ; Thu, 27 Oct 2005 03:14:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86746-02 for ; Thu, 27 Oct 2005 06:14:04 +0000 (GMT) Received: from rediffmail.com (unknown [203.199.83.35]) by svr1.postgresql.org (Postfix) with SMTP id C70E2DB015 for ; Thu, 27 Oct 2005 03:14:03 -0300 (ADT) Received: (qmail 19451 invoked by uid 510); 27 Oct 2005 06:05:54 -0000 Date: 27 Oct 2005 06:05:54 -0000 Message-ID: <20051027060554.19450.qmail@webmail49.rediffmail.com> Received: from unknown (220.227.207.242) by rediffmail.com via HTTP; 27 oct 2005 06:05:54 -0000 MIME-Version: 1.0 From: "padmanabha konkodi" Reply-To: "padmanabha konkodi" To: pgsql-sql@postgresql.org Subject: handling money type Content-type: multipart/alternative; boundary="Next_1130393154---0-203.199.83.35-19400" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.888 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374, FROM_ENDS_IN_NUMS=0.516, HTML_60_70=0.027, HTML_IMAGE_ONLY_08=1.97, HTML_MESSAGE=0.001, MSGID_FROM_MTA_HEADER=0] X-Spam-Level: ** X-Archive-Number: 200510/352 X-Sequence-Number: 23205 This is a multipart mime message --Next_1130393154---0-203.199.83.35-19400 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hello developers,=0A=0Ai have facing one major problem handling sql money d= ataType in the java=0A=0Ai have tried many permutation and combination but = still i dint got correct data type to use in java to pass money data=0A --Next_1130393154---0-203.199.83.35-19400 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

=0Ahello developers,
=0A
=0Ai have facing one major problem handli= ng sql money dataType in the java
=0A
=0Ai have tried many permutatio= n and combination but still i dint got correct data type to use in java to = pass money data
=0A=0A

=0A

=0A=0A --Next_1130393154---0-203.199.83.35-19400-- From dev@archonet.com Thu Oct 27 09:15:38 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A34EDDB070 for ; Thu, 27 Oct 2005 06:15:38 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48846-04 for ; Thu, 27 Oct 2005 09:15:20 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id CAC0CD9A24 for ; Thu, 27 Oct 2005 06:15:21 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 8ED90416DBC; Thu, 27 Oct 2005 10:15:14 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 0DD3415EDA; Thu, 27 Oct 2005 10:14:24 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00759-08; Thu, 27 Oct 2005 10:14:22 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id E4F4615ED5; Thu, 27 Oct 2005 10:14:21 +0100 (BST) Message-ID: <43609A6D.8090705@archonet.com> Date: Thu, 27 Oct 2005 10:14:21 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: padmanabha konkodi Cc: pgsql-sql@postgresql.org Subject: Re: handling money type References: <20051027060554.19450.qmail@webmail49.rediffmail.com> In-Reply-To: <20051027060554.19450.qmail@webmail49.rediffmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.059 required=5 tests=[AWL=0.009, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/360 X-Sequence-Number: 23213 padmanabha konkodi wrote: > hello developers, > > i have facing one major problem handling sql money dataType in the > java > > i have tried many permutation and combination but still i dint got > correct data type to use in java to pass money data Have you tried PG's "numeric" type? What problems did you encounter with it? -- Richard Huxton Archonet Ltd From gpatnude@hotmail.com Thu Oct 27 15:32:24 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5B35DDB099 for ; Thu, 27 Oct 2005 12:32:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88814-03 for ; Thu, 27 Oct 2005 15:32:22 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id EA73EDB0A9 for ; Thu, 27 Oct 2005 12:32:21 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 2B71831059; Thu, 27 Oct 2005 17:32:21 +0200 (MET DST) From: "codeWarrior" X-Newsgroups: pgsql.sql Subject: Re: handling money type Date: Thu, 27 Oct 2005 08:34:06 -0700 Organization: Hub.Org Networking Services Lines: 39 Message-ID: References: <20051027060554.19450.qmail@webmail49.rediffmail.com> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.25 required=5 tests=[AWL=-0.014, FORGED_HOTMAIL_RCVD2=1.079, PRIORITY_NO_NAME=1.185] X-Spam-Level: ** X-Archive-Number: 200510/369 X-Sequence-Number: 23222 The SQL data type "money" in postgreSQL was deprecated several versions ago... however -- it is still available in the system. The definitions is: CREATE TYPE money (INPUT=cash_in, OUTPUT=cash_out, DEFAULT='', INTERNALLENGTH=4, ALIGNMENT=int4, STORAGE=PLAIN); ALTER TYPE money OWNER TO postgres; COMMENT ON TYPE money IS 'monetary amounts, $d,ddd.cc'; 8.2. Monetary Types Note The money type is deprecated. Use numeric or decimal instead, in combination with the to_char function. The money type stores a currency amount with a fixed fractional precision; see Table 8.3, "Monetary Types". Input is accepted in a variety of formats, including integer and floating-point literals, as well as "typical" currency formatting, such as '$1,000.00'. Output is generally in the latter form but depends on the locale. When you "SELECT money('1000');" the type cast returns: $1,000.00 HTH... ""padmanabha konkodi"" wrote in message news:20051027060554.19450.qmail@webmail49.rediffmail.com... hello developers, i have facing one major problem handling sql money dataType in the java i have tried many permutation and combination but still i dint got correct data type to use in java to pass money data