How do I do a partial index of a database field in Delphi?

I want to sort the street name field of an MS access database using deplhi.  The problem I am having is that each street name is preceeded with either an N, S, E, or W.  I want the program to sort the field without taking that first letter into consideration for the sort.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi, what about:

select * from Table order by SUBSTR(NameField,2,LEN(NameField)-2)


* - all fields you want to select
Table - is Your table
NameField - is the field representing the street name
ilhabiaAuthor Commented:
Tried that, kept giving me an invalid use of keyword error.
Ok, SUBSTR is meta-word for MS Access it's:

select * from Table order by MID(NameField,2,LEN(NameField)-2)

CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

ilhabiaAuthor Commented:
I tried that as well and it is still giving the same "invalid use of keyword" error.  This is exactly what I have typed in, where Property is the table name and ParcelLocationStreetName is the name field.

select * from PROPERTY order by MID(ParcelLocationStreetName, 2, LEN(ParcelLocationStreetName)-2)

SELECT * FROM table ORDER BY MID(field, 2, 100)
Alternatively you can try MID$ that should function as well..


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.