Board index » cppbuilder » Reserved chars in query string

Reserved chars in query string


2004-06-22 03:40:46 AM
cppbuilder13
I'm using Paradox tables.
I want to make a query like:
SELECT * FROM mytable WHERE myfield LIKE 'sam's bar'
Obviously the ' between m and s is a reserved character, so how do I make it
a literal charcter in the SQL statement?
Thanks!
/Kim
NB! If you also know what to do when using Oracle it would be great!
 
 

Re:Reserved chars in query string

Hello Kim,
Try this way :
SQL>select 'Sam'||chr(039)||'s Bar' from dual;
'SAM'||CH
---------
Sam's Bar
SQL>
HTH
Jayme.
"Kim Hellan" < XXXX@XXXXX.COM >wrote in message news: XXXX@XXXXX.COM ...
Quote
I'm using Paradox tables.
I want to make a query like:
SELECT * FROM mytable WHERE myfield LIKE 'sam's bar'

Obviously the ' between m and s is a reserved character, so how do I make it
a literal charcter in the SQL statement?

Thanks!
/Kim

NB! If you also know what to do when using Oracle it would be great!