Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mazacini
Creator III
Creator III

Join Field2 in Table1 to Table2

I have loaded Table1. It has fields ID and VAL. ID is unique.

I have loaded Table2. It has ID and REF. There are multiple records for each ID.

Now I want to add VAL from Table1 to Table2.

I think it is LEFT JOIN, but could someone help me with the syntax?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

LEFT JOIN (Table2)

LOAD ID, VAL

RESIDENT Table1;

In some cases, it may be more efficient to turn Table1 into a map, and apply the map during the load of Table2.

View solution in original post

3 Replies
johnw
Champion III
Champion III

LEFT JOIN (Table2)

LOAD ID, VAL

RESIDENT Table1;

In some cases, it may be more efficient to turn Table1 into a map, and apply the map during the load of Table2.

mazacini
Creator III
Creator III
Author

Thanks John

Still getting the hang of the RESIDENT.

By the way, you might be interested to see how JOIN features in the documentation - pretty sparse in the help section, and non-existent in the tutorial!

Rgds

Joe

johnw
Champion III
Champion III

If you go to the main Join entry in the help text, then click through on the various prefixes (inner, outer, left, right), I think it does a pretty good job there.  But yeah, the main Join entry has almost no information.  I guess they expect you to click through.