RE: Select names from Field data containing Hyphen
- From: "Lhunt" <Lhunt@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 May 2005 22:11:02 -0700
Problem solved, my bad,
Sorry for the post, but I was pulling my hair out and had searched all over
the net. It turns out, way down in my code, another temporary SQL statement
I thought I had rem'd out was still firing.
"Lhunt" wrote:
> I have an MS ACCESS 2000 database with 9000 lastnames and some are hyphenated.
>
> I want to pull 250 records for lastname "SMITH" andahigher, the first
> record it pulls is "SMITH-JAMES" (with the hyphen) then skips the other
> SMITH and goes on to SMOOT. I found double quotes work with apostrophies and
> confirmed that works, but the Hyphen does not and with some many people
> having hyphenated names it seems this is generally a problem.
>
> How can I select this. I have tried
>
> Select top 250 lastname, firstname from PNames where lastname >= '" &
> "SMITH" & "'"
> Select top 250 lastname, firstname from PNames where lastname like '" &
> "SMITH" & "*'"
> Select top 250 lastname, firstname from PNames where lastname like '" &
> "SMITH" & "%'"
>
> It totaly skips all of the Plain Smiths, returns my first record is
> SMITH-JAMES then the next one is SMOOT.
.
- References:
- Select names from Field data containing Hyphen
- From: Lhunt
- Select names from Field data containing Hyphen
- Prev by Date: ADO from DAO
- Next by Date: Re: Best practices in ADO
- Previous by thread: Select names from Field data containing Hyphen
- Next by thread: ADO from DAO
- Index(es):
Relevant Pages
|
|