Jump to content

Related records in same table


MJH

This topic is 2663 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello

I am trying to relate multiply records in the same table.

I have a table called Jobs with each record having a unique serial id as well as a job number.   Often a new jobs comes in that is a revision of a previous job (or jobs) that has been billed and closed.  My database users would like to link the new jobs to the old ones.   I have created a second instance called Jobs_related and also tried putting a join table in between, but nothing I do to join them works.  

Thanks

Link to comment
Share on other sites

  • Newbies

Create a new table to store all related jobs for a job.

That table will have 2 main field the Job id and related job id.

ex. if job with 4 is related to jobs with id 1 & 3 respectively. then this new table will have 2 records:

Job ID           Related Job ID

4

Create a new table to store all related jobs for a job.

That table will have 2 main field the Job id and related job id.

ex. if job with 4 is related to jobs with id 1 & 3 respectively. then this new table will have 2 records:

Job ID           Related Job ID

4                      1

4                      3

 

Then create a relationship of Job table with this new table based on Job ID. On jobs layout you can place a portal of this new table. 

Hope this helps.

Link to comment
Share on other sites

You do not need a new table for related jobs. You just need to store the ID of the related job in the same table. Read about normalization. Whatever you can store in one place you do not store in a different place.


Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

This topic is 2663 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.