Selasa, 21 Mei 2013

Re: [MS_AccessPros] Using ALIKE in a query

 

John-

I found it in the 2003 Access help. It's under field validation rules. Very strange. If you go into the query design view and type it in the help box you can find it.

The help also comes up with a bunch of links to forums where people explain it totally wrong saying it's the ANSI version of LIKE. I've been using LIKE in SQL Server for 12 years and never even heard of ALIKE. But, hey it's on the Internet and you can't put anything on the Internet that isn't true. :)

Bill

--- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...> wrote:
>
> Bill-
>
> I very very vaguely recall running across ALIKE before, but can't remember
> why. It's not even in Help, so I have no clue what it's supposed to do
> (other than screw up your queries). Thanks for the heads up.
>
> John Viescas, Author
> Microsoft Access 2010 Inside Out
> Microsoft Access 2007 Inside Out
> Microsoft Access 2003 Inside Out
> Building Microsoft Access Applications
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Bill Mosca
> Sent: Monday, May 20, 2013 3:27 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Using ALIKE in a query
>
> Well, gang, this old dog just stumbled onto a new trick. In the sample
> database Northwind.mdb, the Customers table has a primary key named
> CustomerID. This field has an input mask of >LLLLL which apparently acts
> as a validation rule that says it has to be 5 characters long.
>
> If you create a query in design view and put this in the criteria line for
> the CustomerID field:
> LIKE "A*"
>
> it gets changed to:
> ALIKE "A*"
>
> That returns nothing. It seems that the validation rule is preventing the
> wildcard. You have to do it this way:
> ALIKE "A____"
>
> That's A and 4 underscores. In all my years of working with Access I had
> never heard of ALIKE
>
> Do yourselves a favor and use input masks at the form level, not at the
> table level. Users shouldn't be doing anything at table level anyways.
>
> Regards,
> Bill Mosca, Founder - MS_Access_Professionals http://www.thatlldoit.com
> Microsoft Office Access MVP
> https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-6427073088
> 1E
> My nothing-to-do-with-Access blog
> http://wrmosca.wordpress.com
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar