Thread View: net.database
1 messages
1 total messages
Started by Mohan Palat
Mon, 29 Sep 1986 23:07
Re.: Replace query in relational dbms
Author: Mohan Palat
Date: Mon, 29 Sep 1986 23:07
Date: Mon, 29 Sep 1986 23:07
27 lines
1488 bytes
1488 bytes
> From: vacca@burdvax.UUCP (Dave Vacca) > > 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? It is not clear as to what exactly you want this query to do - if, for example, there are 3 tuples in t2 that satisfy your qualification, which one of these three do you want to be selected in the replace operation? In other words, the variable "value" could take on 3 possible values corresponding to the "total" column of each of the 3 selected tuples and it is not clear as to which of these 3 values you want the variable "value" to contain. One way to make the selection more restrictive might be to add another qualifier to the query: replace() where t1.UKEY=t2.KEY and ... Mohan Palat AT&T Network Systems Lisle, IL
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads