×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Copying all of the data from related tables

Copying all of the data from related tables

Copying all of the data from related tables

(OP)
My db consists of some of these tables and fields:

Purch_Ord_Hdr table   Purch_Ord_Line table
Purch_Ord_No          Purch_Ord_Line_No
Revision_No           Purch_Ord_No
Status                Revision_No

FOB table
FOB_No
Purch_Ord_Line_No
FOB_Date

What I would like to do is select all of the data from all of these tables that relates to a specific Purch_Ord_No and Revision_No and insert the data into all of the tables.

I can do this for Purch_Ord_Hdr and Purch_Ord_Line using INSERT INTO SELECT statement and replacing the Revision_No, but I can not do this for the FOB as this is related at Purch_Ord_Line level. If I use the same technique for the FOB table what actual happens is that new records are added to the FOB table, but they relate to the old Purch_Ord_Line_No 's as oppossed to the new Purch_Ord_Line_No. Any suggestions would be appreciated

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close