Re: Cannot Get SQL Query to Work with "LIKE"



You could try LIKE 'MS%', the like clause in SQL uses % instead of * but I
would have expected ADO to do the conversion for you.

"Chaplain Doug" <ChaplainDoug@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D9855A80-F9A1-44CE-BA92-0E47E839F075@xxxxxxxxxxxxxxxx
Excel 2003. I have a module that grabs some data from an SQL database
using
an ADODB connection. If I use the following in the SQL query, it returns
no
data:

(WHERE INVOICENUMBER LIKE 'MS*')

However, if I use the following, I get all the data I expect:

(WHERE INVOICENUMBER>='MS' AND INVOICENUMBER<='MS9999999999999')

What am I doing wrong? How may I properly use the LIKE phrase? Thanks
for
any help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


.



Relevant Pages

  • Re: SQL that performs division
    ... I have a database that has, ... The SQL query I wrote to do the conversion is here: ... -- how many cups in a hogshead? ... This to me is a very ugly SQL query and im thinking there's a better ...
    (comp.lang.java.databases)
  • SQL that performs division
    ... Teaspoon 1 ... The SQL query I wrote to do the conversion is here: ... -- how many cups in a hogshead? ... This to me is a very ugly SQL query and im thinking there's a better ...
    (comp.lang.java.databases)
  • Re: SQL that performs division
    ... the conversion rate for these measures are all ... The SQL query I wrote to do the conversion is here: ... WHERE m1.measure_name = 'hogshead') b; ... This to me is a very ugly SQL query and im thinking there's a better ...
    (comp.lang.java.databases)