SQL syntax

  • Thread starter Thread starter Christian Dokman
  • Start date Start date
C

Christian Dokman

When I use the LIKE clause in a SQL statement in ASP.NET, it doesn't
seem to work. When I create a query in Microsoft Access and use a Like
clause in the where statement, it works just fine. When I use the same
SQL syntax in ASP.NET, it gives no results. By the way, I use something
like: WHERE (([FieldnameA] = Like ('*Value*')) OR ([FieldnameB] = Like
('*Value*')))
Does anyone know what's the problem here?
 
When using the LIKE keyword, you do not use the = sign. It is just "WHERE
MyField LIKE '%whatever%'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top