Re: sort numbers in a query
- From: jahoobob <jahoobob.1x5o5u@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Oct 2005 13:53:20 +0000
Numbers and text are sorted differently. Numbers sort reading right to
left and text sorts from left to right. Look at the way each aligns
when you view the table/query; text aligns left justified and numbers
align right justified.
I don't have time right now to determine how to do this but I would
start by using the Instr() function to determine the the first
occurence of a space in the address and then extracting the number part
(that ends at the space-1) into another column in a query. The "/" in
10/12 is another matter that can be resolved using Instr() also.
If I get a chance, I'll work on this. Good luck.
Bob
emc Wrote:
> I am using a text field in a table for an address number, ie 4 Brown
> Street,
> 8 Brown Street, 10/12 Brown Street and so on up to 40 Brown Street.
>
> When I try to sort in a query (which runs a form) 10/12 Brown Street
> is
> first and 4 and 8 are last. I have tried the Val function but it
> doesn't
> appear to work. I can't use a number field in the table as a lot of
> the
> addresses have obliques or dashes.
>
> Please help.
--
jahoobob
.
- Prev by Date: Re: ORDER BY causing me fits. Help Please????
- Next by Date: Re: Displaying Results From A Search Query
- Previous by thread: Re: sort numbers in a query
- Next by thread: Group 2 date fields
- Index(es):
Relevant Pages
|