Hi Xavier,
Access has its own SQL syntax:

Like ' * Mariah * '

"Real" syntax (by SQL standard) is

Like ' %Mariah%'

That should work in both cases (even though I've occasionally had problems
running it inside Access).

Petr



        ----------
        From:  Xavier [SMTP:[EMAIL PROTECTED]]
        Sent:  Thursday, 04 March, 1999 1:04 PM
        To:  [EMAIL PROTECTED]
        Subject:  Problem with "Like" and Access

        Hello everybody !
        I have a problem using the SQL operator "Like" from a servlet,
        If I use for example something like
        "SELECT * FROM cds WHERE singer Like ' * Mariah * ' ; "
        I want to see all the singers which name has the word 'Mariah'
        it works well if I execute it inside the Access, but it doesn't
        works when I try to do it from a servlet.
        If I use
        "SELECT * FROM cds WHERE singer Like 'Mariah';"
        I only see the singers which name is exactly 'Mariah' but
        I want to see "Mariah Carey" and "A. Mariah Smith" and ...

        (I'm using Microsoft Access and JDBC-ODBC Bridge.)

         Does anyone know how can I do it ???

        Thanks in advance !
        Xavier.


___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to