Need help on an SQL Statement

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.
 
M

MacDermott

Something like this?

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

HTH
- Turtle
 
M

Mota

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top