Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to combine to tables as follows:
Table1 Contains:
geoid Distance Institution
01 1 a
02 3 a
03 6 a
01 4 b
03 7 b
Table2 Contains:
Institution Company Program Degree
a aa 51 1
a aa 47 1
a aa 47 2
b bb 13 3
b bb 13 5
I Need the final table to look like this:
Institution Company Program Degree Geoid Distance
a aa 51 1 01 1
a aa 51 1 02 3
a aa 51 1 03 6
a aa 47 1 01 1
a aa 47 1 02 3
a aa 47 1 03 6
a aa 47 2 01 1
a aa 47 2 02 3
a aa 47 2 03 6
b bb 13 3 01 4
b bb 13 3 03 7
b bb 13 5 01 4
b bb 13 5 03 7
This is the Load Script I have right now:
Table1:
LOAD geoid,
Distance,
Institution
FROM
outer join
Table2:
LOAD Institution,
Company,
Program,
Degree
FROM
Thanks in advance!
That means that there is not a single value in common in Institution field in both tables. Otherwise the original script should work.
It would really help if you post either your input data or a more complete description of what you get (..not the table that I am looking for - is not really helpful, too).
If you don't get data for Company, Program, Degree when doing the left join, I assume your Instituion values are not matching.
What is your Primary Key? You have different fields in each table... You must have something similar to:
T1:
LOAD geoid,
Distance,
Institution
FROM
C:\yourdoc.xlsx
(ooxml, embedded labels, table is Sheet2);
outer join (T1)
LOAD geoid,
Institution,
Company,
Program,
Degree
FROM
C:\yourdoc.xlsx
(ooxml, embedded labels, table is Sheet1);
Thank you everyone.
It turns out that swuehl had the adjustment I needed.. The error I was getting after I made the adjustment was because of a header typo in one of my table files.
I would not survive without QV Community!
Thanks again!