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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 distinct records
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

desikankannan
Posting Yak Master

India
152 Posts

Posted - 11/11/2013 :  01:51:50  Show Profile  Send desikankannan a Yahoo! Message  Reply with Quote
Hi,
i try to get distinct records from a table

select distinct FuneralSite from deathdata

fetching records 259

i want to get address,state ,zip from the above record

i tried blow query but its wrong

select distinct FuneralSite,adress from deathdata
fetching reocrds 400


pls help me to

Desikankannan

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 11/11/2013 :  02:42:41  Show Profile  Reply with Quote
then you need to decide which address you need to return with each of the site
The reason why count goes over 259 is because you've multiple addresses associated with each of the FuneralSite.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
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.05 seconds. Powered By: Snitz Forums 2000