Hi
I've the SQL below and it gives me Top 11 but not Top10, please advise how to fix. Also, I would like to give them the no. of each record from 1 to 10.
QUOTE
SELECT TOP 10 tblSalesPayments.InvoiceNumber, tblSalesPayments.PaymentType, tblSalesPayments.PaymentAmount
FROM tblSalesPayments
ORDER BY tblSalesPayments.PaymentAmount DESC;
UNQUOTE
and I expect the result as follows:
Order InvoiceNumber PaymentType PaymentAmount
1 7 American Express $650.00
2 53 American Express $297.50
3 34 Check $250.00
4 7 American Express $200.00
5 42 Check $185.00
6 27 MasterCard $178.50
7 50 Check $171.80
8 34 American Express $160.25
9 45 Check $150.00
10 12 Check $150.00
44 Check $150.00 (this additional line should be removed from the Top 10)
Regards
Bill
I've the SQL below and it gives me Top 11 but not Top10, please advise how to fix. Also, I would like to give them the no. of each record from 1 to 10.
QUOTE
SELECT TOP 10 tblSalesPayments.InvoiceNumber, tblSalesPayments.PaymentType, tblSalesPayments.PaymentAmount
FROM tblSalesPayments
ORDER BY tblSalesPayments.PaymentAmount DESC;
UNQUOTE
and I expect the result as follows:
Order InvoiceNumber PaymentType PaymentAmount
1 7 American Express $650.00
2 53 American Express $297.50
3 34 Check $250.00
4 7 American Express $200.00
5 42 Check $185.00
6 27 MasterCard $178.50
7 50 Check $171.80
8 34 American Express $160.25
9 45 Check $150.00
10 12 Check $150.00
44 Check $150.00 (this additional line should be removed from the Top 10)
Regards
Bill