Using Microsoft Access wildcards

Results 1 to 2 of 2

Thread: Using Microsoft Access wildcards

  1. #1
    Mike Greene Guest

    Default Using Microsoft Access wildcards

    Hi all,<BR><BR><BR><BR>When I use an * in a SQL statement, it is being translated as a literal. For example if I have a book title called "The disaster of mikes computer" in the &#039titles&#039 field and I want to create a recordset of all records with the name like &#039*mike*&#039 is it supposed to be done this way. <BR><BR>myselection= request.form("Title")<BR>myselection = "*" & myselection &"*"<BR>mysql = "Select * from files where title like &#039 " & myselection & " &#039 ;"<BR><BR>Even if I hard code the criteria so it looks like this &#039 *mike* &#039 what happens is it takes the asterisk as a literal.<BR><BR>Help me!! My headache is getting larger and my bottle of Tylenol is running out.

  2. #2
    Brett Simpson Guest

    Default RE: Using Microsoft Access wildcards

    Hi Mike,<BR><BR>I just saw something referring to this, and fixed some of <BR>my own troubles, you need to use the % character since <BR>the ASP SQL is different than Access SQL, for example <BR>like "%sometext%".<BR><BR>Put your Tylenol away : )<BR><BR>-Brett

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts