X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 937B5D1B1C9 for ; Sun, 11 Jul 2004 13:22:55 -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 66392-09 for ; Sun, 11 Jul 2004 16:22:48 +0000 (GMT) Received: from web41004.mail.yahoo.com (web41004.mail.yahoo.com [66.218.93.3]) by svr1.postgresql.org (Postfix) with SMTP id A28DBD1B1C8 for ; Sun, 11 Jul 2004 13:22:46 -0300 (ADT) Message-ID: <20040711162246.34618.qmail@web41004.mail.yahoo.com> Received: from [151.204.106.102] by web41004.mail.yahoo.com via HTTP; Sun, 11 Jul 2004 09:22:46 PDT Date: Sun, 11 Jul 2004 09:22:46 -0700 (PDT) From: Theodore Petrosky Subject: please help me with text cast to int .... To: postgres SQL MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/59 X-Sequence-Number: 18311 I give up.. what don't I understand about casting and ints and text.. i have a table jobinfo with: acode text, jobnumber text default nextval('public.jobinfo_seq'::text), jobtitle text I have about 3000 rows starting with jobnumber = 1000. SELECT jobnumber, jobtitle FROM jobinfo WHERE jobnumber >= 999 ORDER BY jobnumber ASC; The above SQL produces no rows. however... SELECT jobnumber, jobtitle FROM jobinfo WHERE jobnumber >= 200 ORDER BY jobnumber ASC; produces rows with jobnumber >= 2000 if I change the query with jobnumber >= 201, I get rows >= 2010. it is as if there was a silent zero being appended to the end of my int in the query. What am I missing, please. select version(); version ------------------------------------------------------------------------------------------------------------------------- PostgreSQL 7.4.2 on powerpc-apple-darwin7.3.0, compiled by GCC gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495) (1 row) Ted __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail