db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nik <nicholas.tr...@gmail.com>
Subject Re: sql query using LIKE
Date Wed, 02 Jan 2008 09:03:32 GMT
sweet, that fixed my next problem.. now i just have to get set the JTable  
properly...
On Wed, 02 Jan 2008 17:38:46 +0900, Oystein Grovlen  
<Oystein.Grovlen@sun.com> wrote:

> 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
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Mime
View raw message