Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to display all columns of distinct rows

Author  Topic 

madhan
Yak Posting Veteran

59 Posts

Posted - 2014-04-17 : 21:54:16
I have the below working query


select distinct OrderNum from invoiceHistory where orderNum in (56387,57930,57933,57935)


I need to get all columns of the distinct ordernum as resultset. I am working to get the resultset of below.


select invoiceID,distinct orderNum,invoiceDate from invoiceHistory where orderNum in (56387,57930,57933,57935)


Please help on this query.

waterduck
Aged Yak Warrior

982 Posts

Posted - 2014-04-18 : 05:12:08
select distinct OrderNum,invoiceID,invoiceDate from invoiceHistory where orderNum in (56387,57930,57933,57935)
Go to Top of Page
   

- Advertisement -