SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Outer Join SQL
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jmodel32345
Starting Member

2 Posts

Posted - 05/01/2013 :  18:05:23  Show Profile  Reply with Quote
uhjj

Edited by - jmodel32345 on 05/01/2013 19:01:30

bitsmed
Constraint Violating Yak Guru

364 Posts

Posted - 05/01/2013 :  18:45:20  Show Profile  Reply with Quote

select rental.compname
      ,rental.aptnum
      ,customer.custlname
      ,customer.custfname
  from apartment
       left outer join rental
                    on rental.compname=apartment.compname
                   and rental.aptnum=apartment.aptnum
       left outer join customer
                    on customer.custid=rental.custid
 order by customer.custlname
         ,customer.custfname
          rental.compname
         ,rental.aptnum
;
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000