Re: How to transform pg_7.4 function 'to_number' to 8.4 equivalent? - Mailing list pgsql-novice

From Morris, Roy
Subject Re: How to transform pg_7.4 function 'to_number' to 8.4 equivalent?
Date
Msg-id 19BA112CA339EB47B0E90EBAE50D132D03542FFC@exch1.internal.priv
Whole thread Raw
In response to How to transform pg_7.4 function 'to_number' to 8.4 equivalent?  (Ennio-Sr <nasr.laili@tin.it>)
List pgsql-novice
I could be wrong (likely) but I just changed the format template to use '9999D0000' and it works fine.


-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Ennio-Sr
Sent: Friday, October 17, 2008 1:56 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] How to transform pg_7.4 function 'to_number' to 8.4
equivalent?


Hi all,

after upgrading from pg_7.4 to pg_8.3  when I run this command:

psql finanza -c "SELECT titolo, var, pr_chius, pr_aper, \
diff_aper_ch*(-1) as \"diff. ass.\", \
to_number(diff_aper_ch*(-1)/pr_aper*100::float(8),'9999.000000') as \"sc. %\" \
from ult_qq having pr_chius>pr_aper and pr_aper>0 \
order by titolo;"   | tee -a /home/ennio/.tmp/aaa

I get:

ERROR: function to_number(double precision, unknown) does not exist ...

Of course it worked very well under 7.4 ...

Can somebody suggest how to correct this?

Regards,
    Ennio

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.    \\?//
 Fa' qualche cosa di cui non sei capace!"   (diceva Henry Miller) ]    (°|°)
 Ricevo solo messaggi Content-Type: plain/text (no html o multipart).   )=(
 !!! --> e-mail a mio nome via OE (M$) sono false  e infette <-- !!!

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to transform pg_7.4 function 'to_number' to 8.4 equivalent?
Next
From: Ennio-Sr
Date:
Subject: Re: How to transform pg_7.4 function 'to_number' to 8.4 equivalent?