Subject | Re: [Firebird-Architect] Literal strings and quotes |
---|---|
Author | Martijn Tonies |
Post date | 2009-05-20T07:33:39Z |
>> Oracle has a feature where you can use quotes inside strings withoutNo, you have to prefix the string with a q
>> need to double them.
>>
>> Here is a example:
>> select q'!where name = 'xyz'!' from dual;
>> Result: where name = 'xyz'
>>
>> And another one:
>> select q'{where name = 'xyz'}' from dual;
>> Result: where name = 'xyz'
>>
>> When the opening character is "[", "{", "(" or "<", the closing one is
>> respectively "]", "}", ")" and ">". In other cases, the opening and
>> closing shall be identical.
>>
>> The strings really terminates in <close char><quote>, so you can even
>> use that character inside it.
>>
>> I propose the same thing for Firebird.
>
> Does it mean that in the old program literal '{ABC}' will actually
> become 'ABC'?
q'{ABC}'
Now it uses { as the quote char inside the string so you can safely
use ' inside the {..}.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com