SQL structure Help

Frank Bitterlich bitterlich at gsco.de
Tue Jan 21 13:57:00 CST 2003


These two problems are related to each other.

To insert a single quote ( ' ) in a field, you must escape it with a backslash:

   insert into T0 (Lastname) values ('O\'Connor');

So the backslash has a special meaning. To use it literally, you need to
escape it too:

   insert into T0 (Filename) values ('C:\\Windows\\Notepad.exe');

Hope that helps...

Cheers,
   Frank+++

Wonder Fef wrote:
> 
> Hello,
> 
> I'm importing a text file into a vdb database.
> I use a SQL statement like :
> 
> INSERT INTO myTable (Field1, Field2, Field3) VALUES ('Value1', 'Value2',
> 'Value3')
> 
> It runs great excepting that Valentina refuses to insert a record if one of
> its value contains a "\" character.
> 
> Moreover, how can I insert a field which contains a ' ?
> 
> I think that some characters are used for the SQL syntax, so that a bad use
> of them leads to errors, but there must be a workaround...



--
Günter Schmidt & Co. oHG         
Frank Bitterlich             eMail: bitterlich at gsco.de
Schlosserstr. 4              WWW:   http://www.gsco.de/gsco
D-60322 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28


More information about the Valentina mailing list