when performing a string match with wildcards in an sql WHERE statement you
must use the SQL word LIKE

SELECT * FROM tickets WHERE LIKE %fr.Airline%


Hope this helps

Nic
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Panayiotis Periorellis
Sent: 30 March 2002 11:43
To: [EMAIL PROTECTED]
Subject: SQL syntax


Hello All,

This is a rather simple question. Can someone help me with the syntax of
this SQL?

String sql= "SELECT * FROM tickets Where Name=%fr.Airline%"

I want Name to be equal to the variable fr.Airline which is a
string....but I get syntax error ..can some help?

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to