SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 15th, 2002, 05:19 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 23
single quotes problem

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

Reply With Quote
  #2  
Old June 4th, 2002, 06:06 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 23
<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 />

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > single quotes problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT