Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escaping -- (double dash)

In SQL CE if I am inserting a string (includes newlines)

N'hello
--Janet' 

It is treated as an unterminated string followed by a comment Is there a way to escape the double dash? (this problem refers to cqlcecmd40 as found at http://sqlcecmd.codeplex.com)

like image 403
lostinplace Avatar asked Aug 16 '26 00:08

lostinplace


1 Answers

Being part of a string it needs no escaping.

-- is only interpreted as the start of a comment outside of strings.


Update (after question was revised):

You can do the following to achieve the same effect:

N'hello' + CHAR(13) + CHAR(10) + '--Janet' 
like image 90
Oded Avatar answered Aug 19 '26 14:08

Oded