AnsweredAssumed Answered

Auto-enter calculated value

Question asked by leesan on Aug 21, 2009
Latest reply on Aug 21, 2009 by comment_1

Title

Auto-enter calculated value

Post

I have 2 table;

    1. Clients [client_id(PK), client_name]

    2. ClientPIC [pic_ic(PK), pic_name, client_id(FK)]

 

In Clients table, client_id is serial number.

In ClientPIC, pic_id is calculated value.

 

Let say I have 2 records in Clients table:

    1. C001, Yamagata

    2. C002, Printelligence

 

And, 3 records in ClientPIC table:

    1. C001-01, Jessica, C001

    2. C001-02, Rachael, C001

    3. C002-01, John, C002

 

If I have a new client PIC to register with details as below:

    Name: Michael

    Client: C002 

 

How do I code the calculated value so that when the record is inserted to ClientPIC,

it will give pic_id=C002.

 

What commans to use?

 

 

 

 

   

Outcomes