× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
CREATE TABLE ROB/JAMES1 (MYKEY1 CHAR (5 ) NOT NULL WITH DEFAULT,
MYKEY2 CHAR (5 ) NOT NULL WITH DEFAULT, MYDATA1 CHAR (5 ) NOT NULL
WITH DEFAULT)
CREATE TABLE ROB/JAMES2 (MYKEY1 CHAR (5 ) NOT NULL WITH DEFAULT,
MYKEY2 CHAR (5 ) NOT NULL WITH DEFAULT, MYDATA1 CHAR (5 ) NOT NULL
WITH DEFAULT)

INSERT INTO ROB/JAMES1 VALUES('A', 'A', 'A')
INSERT INTO ROB/JAMES1 VALUES('B', 'B', 'B')
INSERT INTO ROB/JAMES1 VALUES('C', 'C', 'C')

SELECT * FROM ROB/JAMES1
MYKEY1  MYKEY2  MYDATA1
A       A        A
B       B        B
C       C        C

INSERT INTO ROB/JAMES2 VALUES('B', 'B', '1')
INSERT INTO ROB/JAMES2 VALUES('D', 'D', '4')

SELECT * FROM ROB/JAMES2
MYKEY1  MYKEY2  MYDATA1
B       B        1
D       D        4

UPDATE ROB/JAMES1
 SET JAMES1.MYDATA1=
 ( Select james2.mydata1
   from rob/james2
   where james1.mykey1=james2.mykey1
    and  james1.mykey2=james2.mykey2 )
 WHERE james1.mykey1 concat james1.mykey2 in
  ( select james1.mykey1 concat james1.mykey2 from rob/james1
     inner join rob/james2
    on james1.mykey1=james2.mykey1 and james1.mykey2=james2.mykey2)

SELECT * FROM ROB/JAMES1
MYKEY1  MYKEY2  MYDATA1
A       A        A
B       B        1
C       C        C




Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.