Received: from binarna.schizofrenia.sk (IDENT:root@binarna.schizofrenia.sk [195.98.10.23]) by hub.org (8.10.1/8.10.1) with ESMTP id e6ABgfW23720 for ; Mon, 10 Jul 2000 07:42:41 -0400 (EDT) Received: from adiemus ([195.28.79.5]) by binarna.schizofrenia.sk (8.9.0/8.9.0) with SMTP id NAA08461 for ; Mon, 10 Jul 2000 13:47:25 +0200 Message-Id: Date: Mon, 10 Jul 2000 13:40:44 +0200 X-Priority: 3 From: Ice Planet X-Mailer: Mail Warrior To: pgsql-sql@postgresql.org MIME-Version: 1.0 Subject: Type conversion Content-Type: Text/Plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8Bit X-Mailer-Version: v3.55 X-Archive-Number: 200007/95 Hello I have one big select that computes some value. The value is in format numeric (40,4). Then is this value send to console and when someone on console agree with the number then is the number send to database where i need to do something like this select TheNumberFromConsole/(select max(division_point) from table1) Division_point is in format numeric (40,4). But the number is sometimes small and sometimes big, when the number is big, then is all OK, but when the number is small i got error message that / for float8 (!) and numeric is not possible and i must use explicit typecast, but i dont know how! I have look in manual, but there are informations about float8 only and at the bottom is written that most of functions for float8 works for numeric so i try: select numeric (TheNumberFromConsole)/(select max(division_point) from table1) But this don't work too... Please help how should i written the statement correct. Thanks for help and sorry for my bad english. Best regards Ice Planet e-mail: ice@adiemus.sk ICQ#: 67765483