Received: from mail1.panix.com (mail1.panix.com [166.84.0.212]) by hub.org (8.8.8/8.8.8) with ESMTP id KAA21985 for ; Wed, 14 Oct 1998 10:08:43 -0400 (EDT) (envelope-from tomg@admin.nrnet.org) Received: from mailhost.nrnet.org (root@mailhost.nrnet.org [166.84.192.39]) by mail1.panix.com (8.8.8/8.8.8/PanixM1.3) with ESMTP id KAA20255; Wed, 14 Oct 1998 10:08:37 -0400 (EDT) Received: from admin.nrnet.org (uucp@localhost) by mailhost.nrnet.org (8.8.7/8.8.4) with UUCP id JAA09996; Wed, 14 Oct 1998 09:05:46 -0400 Received: from localhost (tomg@localhost) by admin.nrnet.org (8.8.7/8.8.7) with SMTP id JAA05093; Wed, 14 Oct 1998 09:06:01 -0400 Date: Wed, 14 Oct 1998 09:06:01 -0400 (EDT) From: Thomas Good Reply-To: Thomas Good To: Herouth Maoz cc: PostgreSQL List Subject: Using the IN predicate in an UPDATE... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Herouth, This query takes 20 years (poetic licence invoked ;-). Do you have a smarter way to accomplish this end: UPDATE table1 SET id = 2 WHERE rec_num IN ( SELECT rec_num FROM table1 WHERE id = 1 ); This is an attempt to cleanup some user error...I have an old foxpro db that uses a char str as an index and this index has no check constraints (like, making the index unique...ouch.) The new pg db is performing nicely, now that it's live...and housing 12 years worth of data. But I am saddled with quite a bit of housekeeping - correcting anomalies that were part and parcel of the original (foxpro) design. Or absence thereof. Thanks much! Tom ---------- Sisters of Charity Medical Center ---------- Department of Psychiatry ---- Thomas Good Coordinator, North Richmond C.M.H.C. Information Systems 75 Vanderbilt Ave, Quarters 8 Phone: 718-354-5528 Staten Island, NY 10304 Fax: 718-354-5056