Subject | Re: [firebird-support] Saving text containing hyphens |
---|---|
Author | Paul Vinkenoog |
Post date | 2003-12-07T21:14:18Z |
Hello Rolf,
values ( 'SELECT * FROM ATABLE WHERE ADATE = ''18.10.2003'';' );
Everytime you specify a string constant in an sql statement, you
must double all the single quotes that are part of the string,
because a "single single quote" will be interpreted as the
end-of-string marker.
By the way, a hyphen is this: - (Bindestrich). Hyphens can be
left as they are in a string constant.
Hope this helps,
Paul Vinkenoog
> I'm trying to save a sql statement in a VARCHAR column. Theinsert into stmttable ( stmtfield )
> statement looks something like
> SELECT * FROM ATABLE WHERE ADATE = '18.10.2003';
> How do I save this statement using an INSERT statement?
values ( 'SELECT * FROM ATABLE WHERE ADATE = ''18.10.2003'';' );
Everytime you specify a string constant in an sql statement, you
must double all the single quotes that are part of the string,
because a "single single quote" will be interpreted as the
end-of-string marker.
By the way, a hyphen is this: - (Bindestrich). Hyphens can be
left as they are in a string constant.
Hope this helps,
Paul Vinkenoog