[comp.databases] informix nonsense

sccm@tcistl2.UUCP (Mason) (05/31/89)

I am not sure if it is just because of the three-day weekend, or if I am
suffering from some mental malady, but I am not able to find an 
"elegant" solution to the INFORMIX ISQL problem explained below:

1. There are two TABLES, exactly alike in the defination, in the same
data base.

2. One TABLE, henceforth known as "tablea" has FEWER entries than the
other TABLE, now known as "tableb".

3. There is one COLUMN in tablea that must be UPDATED with data in the 
corresponding COLUMN in tableb.

4. A "match" between the entry in tablea and tableb can only be achieved
(at least in my mind) by comparing eight COLUMNs.  (The plot thickens,
right ?)

5. My current effort (which fails, since tableb has fewer entries than 
tablea) is as follows:

	update tablea 
		set tablea.column_to_update =
		(select tableb.column_to_get_data from tablea
	where
		tablea.column1 = tableb.column1
	and
		tablea.column2 = tableb.column2
	and
			.
			.
			.
			.
		tablea.column8 = tableb.column8);

One would think this issue should be as easy as falling off a log,
but it doesn't seem so simple after working on it for about six hours.
No doubt the "Oh Yea! syndrome" will apply here.

I would appreciate any insights you might care to E-MAIL, not post, as
we do not subscribe to comp.databases.  I will digest and post 
solution(s)...

Thanks for the help !


Stephen Comfort-Mason
uunet!tcistl2!sccm