Re: Adding a ' in a sql statment
Posted in 2000
--- Richard Krenek <rkrenek@ihs.com> > wrote: >I am trying to add the line "Rich's test" in a varchar field but I >cannot add the '. How would I do this? I've tried >"INSERT INTO testtable VALUES ('Rich\\'s test');" but that does not work. >Ive even tried \\\\' and \\\\\\'. Any ideas? > >thanks, >Richard Krenek There are three ways to do this: 'Rich''s test' When you double them up you tell Informix not to match to opening quote. "Rich's test" By using double quotes around your string, a single quote will not be matched as a close quote. 'This is my test and my name is Rich' You can avoid using quotes in your string. == Maintainer of the procrastinator's FAQ. Well, maybe tomorrow I will be. _____________________________________________________________ Want a new web-based email account ? ---> http://www.firstlinux.net