Home » Developer & Programmer » Forms » Mirror form item
Mirror form item [message #144811] Fri, 28 October 2005 08:12 Go to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
Please I have three tables namely, BOOK, BK_copy and LOAN.

my BOOK table has it foreign key in BKCOPY and BKCOPY has it foreign key in LOAN.

there is no direct link between the BOOK and LOAN table.

I want to copy and display my TITLE item from my BOOK table to my LOAN table on the form.

My tables are described below.

BOOK

Name Type
BOOK_ID VARCHAR2(10)
TITLE VARCHAR2(100)
CATEGORY VARCHAR2(20)
COPIES NUMBER(2)


BK_COPY

Name Type
BK_COPY_ID VARCHAR2(10)
BOOK_ID VARCHAR2(10)
SHELFMARK VARCHAR2(5)
NOTES VARCHAR2(50)
DATE_PUBLISHED DATE
ISBN VARCHAR2(10)

LOAN

Name Type
LOAN_ID VARCHAR2(10)
PATRON_ID VARCHAR2(10)
BK_COPY_ID VARCHAR2(10)
STARTDATE DATE
ENDDATE DATE
RETURNDATE DATE
DAYS_OVERDUE NUMBER(2)


Thanks
Re: Mirror form item [message #144991 is a reply to message #144811] Sun, 30 October 2005 21:53 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Create a Post-Query trigger on LOAN.
begin
  select b.title
    into :loan_blk.title -- non-database field
    from book b,
         bk_copy c
   where b.book_id = c.book_id
     and c.bk_copy_id = :loan_blk.bk_copy_id;
end;

David
Previous Topic: LOV does not display
Next Topic: connecting database manually ( programmically )
Goto Forum:
  


Current Time: Fri Sep 20 03:25:12 CDT 2024