Need help on an SQL Statement

  • Thread starter Thread starter Mota
  • Start date Start date
M

Mota

Hello;
I want an SQL statement that return all fields,all records of
[InvoicesTABLE],but sort all records having [InvCost]>4000 at the end of
returned query.The second ordering rule is [InvDate].In fact i want to sort
all records by field [InvDate] exept for invoices with cost more than
4000,that put at the end of the returned query.
Can anyone please help me to write this SQL statement?Thank you in advance.
 
Something like this?

SELECT * FROM [InvoicesTable] ORDER BY [InvCost]>4000 DESC, [InvDate]

HTH
- Turtle
 
Thank you,Will try it.

MacDermott said:
Something like this?

SELECT * FROM [InvoicesTable] ORDER BY [InvCost]>4000 DESC, [InvDate]

HTH
- Turtle

Mota said:
Hello;
I want an SQL statement that return all fields,all records of
[InvoicesTABLE],but sort all records having [InvCost]>4000 at the end of
returned query.The second ordering rule is [InvDate].In fact i want to sort
all records by field [InvDate] exept for invoices with cost more than
4000,that put at the end of the returned query.
Can anyone please help me to write this SQL statement?Thank you in advance.
 
Back
Top