?
Solved

SQL Join two tables or views problem

Posted on 2013-01-02
3
Medium Priority
?
422 Views
Last Modified: 2013-01-02
I'm having a problem that I didn't envision and need someone to help me out with this to see what I am doing wrong.

I have two views (People and Address).  The People view has a Household ID record that is NOT unique as it is referenced for each person that lives in a specific household based upon a certain criteria.  Address is a list of residential addresses where the HHID is unique to each record.

I am trying to combine the two tables into a view where each persons address is also shown.

I have tried a hhid = hhid, inner join and a right join (people to address) but each one is coming up with a problem that renders it unusable.  Please let me know if you have any suggestions.

Thanks,
0
Comment
Question by:gwarcher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
Barry62 earned 2000 total points
ID: 38737955
Is this something like you have tried (I'll assume some field names here?):

select People.Name,Address,street,Address.city,Address.ST,Address.zip inner join Address on People.hhid = Address.hhid

Select statement and we will get it figured out.
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 38737959
0
 

Author Comment

by:gwarcher
ID: 38737967
There has to be something wrong with my UID fields as everything in the select statement appears correctly.  You are right though.  I will try a couple things and get back to you if I need additional help.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question