Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

"Like"

Discussion in 'Information Technology' started by Steve Zabriski, Nov 15, 2005.

Tags:
  1. Steve Zabriski

    Steve Zabriski
    Expand Collapse
    Guest

    When I enter the keyword "Like" in the criteria row of a query the
    application changes the word to "ALike" when I run the query or move off the
    field. It returns zero records.

    The SQL window shows "ALike". When I try to correct it in the SQL window to
    "Like" and run the query the application changes it back to "ALike".

    I scanned for viruses and checked autospeller.
     
  2. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Steve Zabriski" <SteveZabriski@discussions.microsoft.com> wrote in
    message news:DF140380-2051-4AAF-9D59-CA9C51052165@microsoft.com
    > When I enter the keyword "Like" in the criteria row of a query the
    > application changes the word to "ALike" when I run the query or move
    > off the field. It returns zero records.
    >
    > The SQL window shows "ALike". When I try to correct it in the SQL
    > window to "Like" and run the query the application changes it back to
    > "ALike".
    >
    > I scanned for viruses and checked autospeller.


    Do you have the "SQL Server Compatible Syntax (ANSI 92)" option checked,
    on the Tables/Queries tab of the Tools -> Options... dialog?

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  3. Steve Zabriski

    Steve Zabriski
    Expand Collapse
    Guest

    Yes, this database and as the default.

    "Dirk Goldgar" wrote:

    > "Steve Zabriski" <SteveZabriski@discussions.microsoft.com> wrote in
    > message news:DF140380-2051-4AAF-9D59-CA9C51052165@microsoft.com
    > > When I enter the keyword "Like" in the criteria row of a query the
    > > application changes the word to "ALike" when I run the query or move
    > > off the field. It returns zero records.
    > >
    > > The SQL window shows "ALike". When I try to correct it in the SQL
    > > window to "Like" and run the query the application changes it back to
    > > "ALike".
    > >
    > > I scanned for viruses and checked autospeller.

    >
    > Do you have the "SQL Server Compatible Syntax (ANSI 92)" option checked,
    > on the Tables/Queries tab of the Tools -> Options... dialog?
    >
    > --
    > Dirk Goldgar, MS Access MVP
    > www.datagnostics.com
    >
    > (please reply to the newsgroup)
    >
    >
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Mon, 14 Nov 2005 17:03:06 -0800, "Steve Zabriski"
    <SteveZabriski@discussions.microsoft.com> wrote:

    >When I enter the keyword "Like" in the criteria row of a query the
    >application changes the word to "ALike" when I run the query or move off the
    >field. It returns zero records.
    >
    >The SQL window shows "ALike". When I try to correct it in the SQL window to
    >"Like" and run the query the application changes it back to "ALike".
    >
    >I scanned for viruses and checked autospeller.


    Check - and turn off - Name Autocorrect. Also take a look at Tools...
    Options... Spelling... Autocorrect Options; turn off "correct spelling
    as you type".

    John W. Vinson[MVP]
     
  5. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Steve Zabriski" <SteveZabriski@discussions.microsoft.com> wrote in
    message news:5F7048E4-6810-4208-AF01-A20178BACF11@microsoft.com
    > Yes, this database and as the default.
    >
    > "Dirk Goldgar" wrote:
    >
    >> "Steve Zabriski" <SteveZabriski@discussions.microsoft.com> wrote in
    >> message news:DF140380-2051-4AAF-9D59-CA9C51052165@microsoft.com
    >>> When I enter the keyword "Like" in the criteria row of a query the
    >>> application changes the word to "ALike" when I run the query or
    >>> move off the field. It returns zero records.
    >>>
    >>> The SQL window shows "ALike". When I try to correct it in the SQL
    >>> window to "Like" and run the query the application changes it back
    >>> to "ALike".
    >>>
    >>> I scanned for viruses and checked autospeller.

    >>
    >> Do you have the "SQL Server Compatible Syntax (ANSI 92)" option
    >> checked, on the Tables/Queries tab of the Tools -> Options... dialog?


    Although I haven't seen documentation of this behavior, I've observed
    that, whenever you have ANSI 92 query syntax turned on, Access
    automatically transforms Like to ALike. In ANSI 92 syntax, the common
    Jet wildcard characters '*' and '?', as used by the Like operator, are
    replaced by '%' and '_'. The ALike operator enforces this replacement:
    it always uses the ANSI 92 wildcard characters, regardless of whether
    you have ANSI 92 syntax turned on or not. I think Access probably
    forces Like to ALike with the intention of increasing the portability of
    the queries written using these wildcard characters (since the pattern
    matching will be the same even if you later change back to the older,
    standard Jet syntax).

    If you want to use Like, with the '*' and '?' wildcards, you'll find it
    easiest to uncheck the ANSI 92 Syntax option. Otherwise, you may as
    well get used to using ALike and the ANSI 92 wildcards.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     

Share This Page