Hi PP, You need to figure out what u want to do ? if u want to get all records from "tickets" where name is "fr.Airline" then here is the correct syntax :
String sql = "SELECT * FROM tickets Where Name = 'fr.Airline'"; and if you want to get all records from the "tickets" where name contains a string "fr.Airline" then Nic's code is fine. Remeber i didnt saw any semicolon at the end of your code line. You need to be care full about the basic coding syntax of java. I mention this only cuz u wrote that u got "Syntax Error". Good Luck ! Regards, Humayun. ----- Original Message ----- From: "Panayiotis Periorellis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 30, 2002 4:42 PM Subject: [JSP-INTEREST] 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? Regards pp ========================= 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 =========================================================================== 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
