Skip to Content
0
Nov 14, 2012 at 09:46 AM

Top 10 Vendors Query

930 Views

Hi all,

SELECT TOP 10 T0.[CardCode], T0.[Balance],ISNULL(CONVERT(NVARCHAR(100),T0.[AliasName]),T0.[CardName]) 'Name' FROM OCRD T0

WHERE T0.[CardType] = 'S'

ORDER BY T0.[Balance] DESC

This the query i have used for Top 10 Vendors.i have a doubt whether it is correct ?

Please clarify my doubt Top 10 Vendor is based credit balance? The vendor having balance in negative value in that case ORDER BY T0.[Balance] DESC is correct or ORDER BY T0.[Balance] ASC is correct?