Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f06KdO704270 for ; Sat, 6 Jan 2001 15:39:24 -0500 (EST) (envelope-from pgsql-novice-owner@postgresql.org) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f05IZH722539; Fri, 5 Jan 2001 13:35:17 -0500 (EST) (envelope-from peter_e@gmx.net) Received: from fwd03.sul.t-online.com by mailout01.sul.t-online.com with smtp id 14Ebi5-0003gm-01; Fri, 05 Jan 2001 19:35:29 +0100 Received: from peter.localdomain (520083510237-0001@[217.80.146.95]) by fmrl03.sul.t-online.com with esmtp id 14Ebhu-07pcMyC; Fri, 5 Jan 2001 19:35:18 +0100 Date: Fri, 5 Jan 2001 19:42:38 +0100 (CET) From: Peter Eisentraut To: Thomas SMETS cc: psql novice , psql sql Subject: Re: [SQL] Casting In-Reply-To: <3A5515DE.52F2DB7B@altern.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 520083510237-0001@t-dialin.net X-Archive-Number: 200101/54 X-Sequence-Number: 518 Thomas SMETS writes: > I'm removing charaters from a String which should be numbers. > I then want to make calculations on these numbers (calculate the ISBN > number). (You might want to look into contrib/isbn_issn for an isbn type.) > Do I have to cast the char into int's before I can do the calulations. Depends on the calculation. I'd just try to see if it works. When in doubt add casts. > Also I looked in the User manual but could not find the modulo function > where is it ? 5 % 4 mod(5, 4) -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/