> Select Replace(field, '\n','') from table  but it doesn't return the
> data unchanged at all. If I take the \n out of single quotes I just
> get an error.

What made you think that SQLite will understand C-style
escape-sequences? It doesn't do that. If you're running this query
from sqlite3 command line utility then try approach that Donald showed
you (though maybe you'll need to add casts to text for both
constants). If you're running this query from you application then
things are a whole lot easier - just put into quotes real CR/LF codes
using escaping that your language supports.

Pavel

On Thu, Sep 17, 2009 at 11:43 AM, Matt Williamson <mattw1...@gmail.com> wrote:
> I'm trying to clean out a SQLite table that has a text field with
> multiple carriage returns. I can't figure out how to represent a
> carriage return in a replace function.This is on a Windows system.
> I've tried
>
> Select Replace(field, '\n','') from table  but it doesn't return the
> data unchanged at all. If I take the \n out of single quotes I just
> get an error.
>
> TIA
>
> Matt
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to