Sort by criteria

B

Björn

Is it possible to have a query to sort all dates before a
specific date in on way (col1 asc.) and after the same
date in an other way (col2 asc.)

Col0 | Date | Col1 | Col2 |

I hope that somebody can give me a hint of how do do this
// Björn
 
M

Michel Walsh

Hi,


Sure. ORDER BY allows computed expressions. If I understand your
requirements, that may look like


ORDER BY iif( [date] <= specificDate, col1, col2) ASC




Hoping it may help,
Vanderghast, Access MVP



Is it possible to have a query to sort all dates before a
specific date in on way (col1 asc.) and after the same
date in an other way (col2 asc.)

Col0 | Date | Col1 | Col2 |

I hope that somebody can give me a hint of how do do this
// Björn
 

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