db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein Grovlen <Oystein.Grov...@Sun.COM>
Subject Re: sql query using LIKE
Date Wed, 02 Jan 2008 08:38:46 GMT
Nik wrote:
> I'm getting an SQL excpetion using LIKE to match a String.
> String query = "SELECT *" +                    
>                        " FROM "+ tableName +
>                        "WHERE DAY_OF_WEEK LIKE \""+
>                        searchTerms+"\"";
> is there some other way I should be doing this?

You need to use single quotes for the search term, not double quotes.

--
Øystein



Mime
View raw message