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

Joins

Join Date: Sep 2007
Posts: 13
Reputation: bhakti.thakkar is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
bhakti.thakkar bhakti.thakkar is offline Offline
Newbie Poster

Re: Joins

  #6  
Jan 28th, 2008
Originally Posted by campkev View Post
ok, i am assuming that you want a name for all id's. if a has an entry use that, otherwise use the name from b. also assuming that B has an entry for every id. if those assumptions are correct, then this should work
select b.id, isnull(a.name,b.name) as [Name] from b
left join a on b.id = a.id



Thanks to reply my query. It worked.
Last edited by bhakti.thakkar : Jan 28th, 2008 at 12:36 am.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 9:24 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC