RSS Forums RSS
Please support our MS SQL advertiser: Programming Forums

help with joins

Join Date: Jul 2005
Location: Dallas, TX
Posts: 482
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

help with joins

  #1  
Nov 28th, 2005
Situation

table1 has 2 columns: userid and requiredInfo
It will have an entry for every user

table2 has 2 columns: userid and optionalInfo
It will have entries for some users but not others

Problem:
need a statement that returns either

userid, table1.requiredInfo, table2.optionalInfo
--if table2 has an entry
OR
userid, table1.requiredInfo, null
--if table2 does not have an entry
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:13 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC