master detail query [message #344102] |
Thu, 28 August 2008 15:10 |
dstomcat
Messages: 5 Registered: June 2005
|
Junior Member |
|
|
I have a program where an instruction letter is created for a customer. The master db record is created when the letter is created and the detail record is created when the letter is modified/changed, usually sometime later by another person.
the pk for both tables is a field called 'control' and is integer type.
I want to be able to display the fname, lname and create date from the master table and the message date and message from the detail table if any changes have been made to the letter.
I think I want to use the 'IN' operator.
Could I see some sample code of what this might look like.
thanks,
David
|
|
|
|
Re: master detail query [message #344108 is a reply to message #344103] |
Thu, 28 August 2008 15:36 |
dstomcat
Messages: 5 Registered: June 2005
|
Junior Member |
|
|
CREATE TABLE MANA.ECTCINSTMEMODET (detail table)
CONTROL NUMBER(8),
MESSAGE_DATE DATE,
AGENT VARCHAR2(15 BYTE),
MESSAGE VARCHAR2(60 BYTE)
CREATE TABLE MANA.ECTCINSTMEMOMAS (master table)
CONTROL NUMBER(8),
FNAME VARCHAR2(15 BYTE),
MNAME VARCHAR2(1 BYTE),
LNAME VARCHAR2(25 BYTE),
CUST_NUMBER VARCHAR2(20 BYTE),
AGENT_CREATED VARCHAR2(40 BYTE),
CREATEDATE DATE,
AGENT_COMPLETE VARCHAR2(40 BYTE),
COMPLETEDATE DATE,
COMPLETED VARCHAR2(1 BYTE),
MEMO_TYPE VARCHAR2(2 BYTE)
Display:
FName, LName, CreateDate, Message_date, Message.
could not see a quick way to copy the constraints info in this posting.
thanks for the guidance
David
[EDITED by LF: added [code] tags]
[Updated on: Sun, 31 August 2008 05:27] by Moderator Report message to a moderator
|
|
|
|
|
|