Importing mainframe woes

S

SirPoonga

I thought I posted this already, might get a double post.

I am importing data from a mainframe into tables based on record layout
info from the mainframe.

I have two tables, "operation" and "notes". They have the keys ID_ITEM
and ID_OPER. Not all operations have notes. So I need to left join
the operations table with the notes table. How do I do that with two
fields/keys?
 
A

Albert D. Kallal

Assuming you have been able to import the tables. And both tables have a
common key, then just fire up the query builder.

To make a left join, you drop in the tables (in the query builder, or the
relationship designer), and draw the join line to the appropriate filed
between each table. You then double click on the join line. You then click
on the join type button

You get three options:

Only include rows where the joined fields from both tables are equal
(this standard default inner join)

Include ALL records from "Customers" and only those records from
"Invoices" where the joined fields are equal

(this is our left join. So, our main table Customers will be returned in
this query, REGARDLESS if the child records (invoices in this example)
exist, or not!. This is left join

Include ALL records from "Invoices" and only those records from
"Customers" where the joined fields are equal
This sis obviously a right join....

In my example, I used customers for the "parent" table, and invoices for the
child table..but you get the idea....
 
S

SirPoonga

But that's my problem. I don't have a common key. The identifier for
the record is the combination of the ID_ITEM and ID_OPER fields.
 
D

Dirk Goldgar

SirPoonga said:
But that's my problem. I don't have a common key. The identifier for
the record is the combination of the ID_ITEM and ID_OPER fields.

Did you know that you can join on multiple fields?
 
S

SirPoonga

Wow. I guess I don't know what I did wrong. I just redid the query
from scratch and it works now. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top