split expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ace1234
    New Member
    • Oct 2006
    • 1

    #1

    split expression

    I have an address field such as "222 Avonhead Road".

    I wish to make a query? to sort on the road name ie "Avonhead" and list all entries in alphabetical order.

    is this possible??

    ace1234
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Create a new query

    SELECT Mid([AddressField], InStr([AddressField]," ")+1) As Street
    FROM TableName
    ORDER BY Street;

    This query will find the first space on the address line and create a new field starting with the next character.

    Originally posted by ace1234
    I have an address field such as "222 Avonhead Road".

    I wish to make a query? to sort on the road name ie "Avonhead" and list all entries in alphabetical order.

    is this possible??

    ace1234

    Comment

    Working...