<i><b>Originally posted by : joe (jhandle3@ford.com)</b></i><br />Can anybody assist my sql statement is:<br />myFunction = "FAQ's"<br /><br />'SQL to open records and sort:<br />strSql = "SELECT tblInventory.URL, tblInventory.BrandNameID, tblInventory.Description, tblInventory.Market, tblInventory.AppDevelopPartner, tblInventory.CreativePartner, tblFunction.FunctionType FROM tblInventory INNER JOIN tblFunction ON tblInventory.[FAQ''s] = tblFunction.FunctionType WHERE (((tblInventory.[FAQ''s])='"& myFunction &"'));"<br /> ... its in one long line of code on my asp page so there are no end of line problems. The problem I have is that I want my variable which contains the string -FAQ's- to find the data FAQ's in my table and it won't with the quote in it???? I know its a common problem and have tried the double single quotes but to no avail. Ideas?<br /><br />Regards<br />Joe<br />
<i><b>Originally posted by : </b></i><br />joe,<br /><br />simply replace any instance of a single quote "'" with a pair of single quotes "''". this should take care of it.<br /><br />ryan<br /><br /><br />------------<br />joe at 5/15/2002 2:19:32 AM<br /><br />Can anybody assist my sql statement is:<br />myFunction = "FAQ's"<br /><br />'SQL to open records and sort:<br />strSql = "SELECT tblInventory.URL, tblInventory.BrandNameID, tblInventory.Description, tblInventory.Market, tblInventory.AppDevelopPartner, tblInventory.CreativePartner, tblFunction.FunctionType FROM tblInventory INNER JOIN tblFunction ON tblInventory.[FAQ''s] = tblFunction.FunctionType WHERE (((tblInventory.[FAQ''s])='"& myFunction &"'));"<br /> ... its in one long line of code on my asp page so there are no end of line problems. The problem I have is that I want my variable which contains the string -FAQ's- to find the data FAQ's in my table and it won't with the quote in it???? I know its a common problem and have tried the double single quotes but to no avail. Ideas?<br /><br />Regards<br />Joe<br />
Was this answer helpful ?
Yes No