[sqlite] INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
Hello everyone! Could someone please assist me with the following: how do I insert a string into an SQLite database that contains a CR or LF character? C-style escapes (like \r and \n) are not working with SQLite, so how can I do this? Thanks in advance! With best regards, J.R.

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
VALUES ('blablabla'||x'0A'||'yadayadayada'); I'm getting "Expression tree is too large (maximum depth 1000)" error... Any ideas on how to cope with this? Thanks again! With best regards, J.R. On Nov 14, 2007 3:19 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Jevgenijs Rogov

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
am I doing wrong? With best regards, J.R. On Nov 14, 2007 3:38 PM, Jevgenijs Rogovs <[EMAIL PROTECTED]> wrote: > Thanks, but how do I use those? > See, I have a huge file of INSERT statements, which look like this: > > INSERT INTO sometable VALUES ('blablabla\r\nyadayadaya

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
AIL PROTECTED]> wrote: > On Wed, 2007-11-14 at 15:38 +0200, Jevgenijs Rogovs wrote: > > Thanks, but how do I use those? > > See, I have a huge file of INSERT statements, which look like this: > > > > INSERT INTO sometable VALUES ('blablabla\r\nyadayadayada'); > >

Re: [sqlite] Re: Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
Sounds too complicated for this simple situation... Can anything be done w/o coding? On Nov 14, 2007 3:53 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Jevgenijs Rogovs <[EMAIL PROTECTED]> > wrote: > > Thanks, but how do I use those? > > See, I have a huge file of

Re: [sqlite] INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
Thanks! Simplest solutions tend to be forgotten, unfortunately... What I did was to simply replace every occurence of \r\n in my script with LF character... And it worked like a charm! Thanks again! With best regards, J.R. On Nov 14, 2007 4:46 PM, <[EMAIL PROTECTED]> wrote: > &

[sqlite] .dump returns error 32512... sometimes

2007-11-21 Thread Jevgenijs Rogovs
Hi everyone, I have a script that does some backup. Amongst other things, it dumps certain SQLite database, like sqlite3 /path/to/db/dname.db .dump > somefile. When I run the script manually from the command line, it works like a charm. If, however, I launch it via crontab - it fails. sqlite3