Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have Two table First have UserName and second is address,
in address table more than value relegated to UserName
table, i want to fetch 2nd address if exist other wise 1st
address access

Answer Posted / sayali

Select u.name,coalesce(a.address2, a.address1)as Address
from Username u left join address a
on u.userid = a.userid

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

1091


What are the essential components of sql server service broker?

1003


What is sparse columns of sql server 2008?

1030


How do I find the sql server instance name?

955


How to use subqueries in the from clause in ms sql server?

1145


how would you troubleshoot blocking? : Sql server database administration

968


do views contain data ?

940


Do you know what guidelines should be followed to help minimize deadlocks?

957


What is the full meaning of dml?

939


What is the process of normalization?

1105


How to delete a login name in ms sql server?

1047


What are database states in ms sql server?

1162


What the different topologies in which replication can be configured?

1070


How can we improve performance by using SQL Server profiler?

1036


How do I find the query plan in sql server?

941