sp exec
-
Wednesday, May 09, 2012 12:26 PM
if i am excuting the sp the same row displays multiple times.. there is no duplicate records ..
how can i do this?
All Replies
-
Wednesday, May 09, 2012 12:28 PMAnswererPlease post sample data + desired result
Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
-
Thursday, May 10, 2012 2:42 AMModerator
Hi Sagar,
DISTINCT: Specifies that COUNT returns the number of unique nonnull values. You could use DISTINCT in your T-SQL sentences.
DISTINCT is an optional keyword that precedes the list of columns specified in the SELECT clause. The DISTINCT keyword asks your database system to evaluate the values of all the columns as a single unit on a row-by-row basis and eliminate any redundant rows it finds.
Refer to DISTINCT:
http://msdn.microsoft.com/en-us/library/ms175997.aspx
http://searchsqlserver.techtarget.com/feature/Using-DISTINCT-in-SQL-to-eliminate-duplicate-rows.Thanks,
MaggiePlease remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- Marked As Answer by Maggie LuoMicrosoft Contingent Staff, Moderator Thursday, May 17, 2012 8:53 AM

