Left Join makes data null?

Doing a simple left join of two tables, I do this all the time, but today it's turning the joining table's data null.  

SELECT ThirdTier.*, ThirdOrg.Type as Type
INTO Third
FROM ThirdTier
Left JOIN ThirdOrg
ON ThirdOrg.Location=ThirdTier.SID

The data from ThirdTier is fine, the data from ThirdOrg becomes all <NULL>.

If I switch ThirdTier and ThirdOrg, the opposite happens.  ThirdOrg data is fine, ThirdTier data is all null.  WTH?!  Please help.
H2OmikeIT ManagerAsked:
Who is Participating?
 
Dale FyeConnect With a Mentor Commented:
what happens when you do a simple SELECT, without the make table?

Are you certain that ThirdTier.SID is supposed to map to ThirdOrg.Location?  Is that supposed to be LocationID?
1
 
Dustin SaundersConnect With a Mentor Director of OperationsCommented:
It returns null if there's nothing joined, so something isn't lined up.  If you can post more info about the tables/columns that would be helpful.
0
 
H2OmikeIT ManagerAuthor Commented:
If I do a select without creating the table the same thing happens.  Yes, the columns are correct, LOcation=SID.

See the table design and data snips
ThirdOrg.PNG
ThirdTier.PNG
thirdTierData.PNG
ThirdOrgData.PNG
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
H2OmikeIT ManagerAuthor Commented:
OMG.. I figured it out....
0
 
Dale FyeCommented:
Well ???
0
 
H2OmikeIT ManagerAuthor Commented:
matching the wrong columns like an idiot.  Long day...
0
 
Dale FyeCommented:
Happens to all of us, Mike.
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.