comparing the last 4 characters...
Posted in 1995
My brain must be on holiday, but I can't figure out how to compare the
last 4 digits of a telephone number to a like field in my database.
something like this:
select * from table1
where table1.company = record.company
and table1.city = record.city
and table1.phone_no matches "*", record.phone_no[last 4 digits?]
Of course the above doesn't work, and to top it off record.phone_no is a
character field and may vary in length if it is a local, long distance or
international number. Hmmm... What I'd give for a BASIC RIGHT$
function!
Tips, tricks, ideas, pointers to where my brain is vacationing all
graciously accepted...
__ _ _ __ _ >>
| \\ __ ___ ___ __| | / _| __| |_ _ _ ___ _ _ __ ___ <<
| | / _' \\ ' | / _' | \\_ \\/ _| ' \\| '_/ _ \\ ' \\/ _/ -_) C|~~|
|__/\\__,_|\\_/|_\\__,_| |__/\\__|_||_|_| \\___/_||_\\__\\___| `--'