I am trying to write an SQL statement using a wildcard in the search criteria without using LIKE. Here's my dilemma:
The table structure (which is NOT MY DESIGN) has the Defendant's Name as ONE field (LAST FIRST M) - BAD CALL from my point of view, but that's what I have to deal with. So, now I am trying to do a search by name and I'd like to be able to do something like:
WHERE DEFNAM = 'SMIT*'
which would return only those rows that start with SMIT instead of using LIKE, which would also return
JONES SMITTY
Is there a way to do this? I am using an AS400 backend, programming in Delphi, but figured this was the best forum to get SQL syntax information.
Thanks for any insight!
Leslie
landrews@metrocourt.state.nm.us
There are 10 types of people in the world -
those who understand binary
and
those who don't!
The table structure (which is NOT MY DESIGN) has the Defendant's Name as ONE field (LAST FIRST M) - BAD CALL from my point of view, but that's what I have to deal with. So, now I am trying to do a search by name and I'd like to be able to do something like:
WHERE DEFNAM = 'SMIT*'
which would return only those rows that start with SMIT instead of using LIKE, which would also return
JONES SMITTY
Is there a way to do this? I am using an AS400 backend, programming in Delphi, but figured this was the best forum to get SQL syntax information.
Thanks for any insight!
Leslie
landrews@metrocourt.state.nm.us
There are 10 types of people in the world -
those who understand binary
and
those who don't!