Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!qantel!lll-lcc!lll-crg!caip!cbmvax!bpa!burdvax!vacca From: vacca@burdvax.UUCP (Dave Vacca) Newsgroups: net.database Subject: relational query problem Message-ID: <2709@burdvax.UUCP> Date: Thu, 25-Sep-86 20:13:14 EDT Article-I.D.: burdvax.2709 Posted: Thu Sep 25 20:13:14 1986 Date-Received: Tue, 30-Sep-86 04:15:03 EDT Organization: System Development Corp., Paoli, PA Lines: 23 Keywords: one-to-many join replace I tried the following query on a relational DBMS. It resulted in an "ambiguous replace - more than one update on same row" error. I presume I am doing this incorrectly. What I need is the proper method for doing the following: I have two tables: t1 and t2. t1 has a unique key. t2 also has a key, but not a unique one. I am joining the two tables with each table's key, i.e., where t1.UKEY = t2.KEY . Actually, the complete operation looks like the following: replace t1 ( value = t2.total ) where t1.UKEY = t2.KEY The join is one-to-many (t1-to-t2). Thus, there may be 3 rows in t2 which have the same key value as just 1 row in t1. There will never be 2 or more rows in t1 which have the same key value as 1 row in t2. Do I have to normalize t2? --------------------------------------- Dave Vacca Burroughs Corporation ..!burdvax!asgdtn!vacca