X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id C6F01D1B4F5 for ; Thu, 25 Sep 2003 18:52:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 47605-01 for ; Thu, 25 Sep 2003 15:51:40 -0300 (ADT) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by svr1.postgresql.org (Postfix) with ESMTP id 03D5AD1B523 for ; Thu, 25 Sep 2003 15:51:38 -0300 (ADT) Received: from lerlaptop-red.iadfw.net (lerlaptop-red.iadfw.net [207.136.3.72]) (authenticated bits=0) by lerami.lerctr.org (8.12.10/8.12.10/20030923) with ESMTP id h8PIpUQa008995 for ; Thu, 25 Sep 2003 13:51:30 -0500 (CDT) Date: Thu, 25 Sep 2003 13:51:28 -0500 From: Larry Rosenman To: pgsql-sql@postgresql.org Subject: weird(to me) request Message-ID: <294260000.1064515888@lerlaptop-red.iadfw.net> X-Mailer: Mulberry/3.1.0b7 (Linux/x86) X-PGP-Info: All other keys are old/dead. X-PGP-Key: 0x3c49bdd6 X-PGP-Fingerprint: D0D1 3C11 F42F 6B29 FA67 6BF3 AD13 4685 3C49 BDD6 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========939D06B5F8168CC168A8==========" X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/311 X-Sequence-Number: 15289 --==========939D06B5F8168CC168A8========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enforce is that if the master_acct_num field is NOT NULL (it= =20 can be NULL, and that's fine), that the value appears in some row as acct_num. acct_num has= =20 a unique index on it, so that's fine. I'm not sure how to do this.... Thanks! LER --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 --==========939D06B5F8168CC168A8========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/czkxrRNGhTxJvdYRApxiAKCTKY4IGNXDn6/Je2cINrJKyk6xeACgqVC9 rnTv6yaMHKCvfaC8QfFL2ho= =fQeJ -----END PGP SIGNATURE----- --==========939D06B5F8168CC168A8==========--