Hi Doshi,

  What would You do if you have to query the table in
the query analyser of SQL Server, in your conditon?
This has to do with SQL query formation and not a
Servlet isuue.
So first try it in the Query Analyser tool of DB2
platform.
You may adopt an escape sequence for the single qoute
within the name part, which could be double quotes, or
four single qoutes in succesion, to leave a literal
single qoute in the query. Try it and see. I have no
exposure to DB2 environment and so i can't give a
definite answer.Please note that the syntax for SQL
Query is very similar for all the RDBMS's with slight
modifications/alterations.

Venkat Atluri.
--- "Doshi, Gunjan" <[EMAIL PROTECTED]> wrote:
> Friends:
>
> My Servlet queries the DB2 database table. However
> some entries in the
> column have ' as its entries. I want to search for
> all of them
>
> Example: O' Peter. I am talking of the single quote
> ' in the name.
>
> So when I say select * from name_table where name
> like '%'%'
>
> It is wrong because single quotes because %'%  is
> illegal within ' '. How do
> I do it.
>
> Gunjan
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to