Re: [sqlite] Appending Text to a Column

2009-04-14 Thread Griggs, Donald
Text concatenation is done with 
  ||
Two vertical bars (virgules).

update tblEntry set Tags = Tags || ' new text' where RowID = 13
 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Appending Text to a Column

2009-04-14 Thread Martin Engelschalk
Hi,

use the || - Operator to concatenate text. + adds to numbers.

update tblEntry set Tags = Tags || ' new text' where RowID = 13

martin

centipede moto wrote:
> I am trying to append text to a field within my database - sothat if a user 
> has stored 'search, tools' into the Tags column of tblEntry, they can add 
> more tags later like:
>
> update tblEntry set Tags = Tags + ' new text' where RowID = 13
>
> But whenever I try to do this I end up with 0 in the column. I've done 
> searches and found discussions on
>
> concat(..) or append(..)
>
> but when I try to use these sqlite doesn't recognize them. How do I go about 
> adding a value to the end of an existing value? Do I need to retrieve it and 
> append it in my Java code as opposed to in the sql statement?
>
> Thanks!
>
> _
> Windows Live™: Keep your life in sync.
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
> ___
> 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


[sqlite] Appending Text to a Column

2009-04-14 Thread centipede moto

I am trying to append text to a field within my database - sothat if a user has 
stored 'search, tools' into the Tags column of tblEntry, they can add more tags 
later like:

update tblEntry set Tags = Tags + ' new text' where RowID = 13

But whenever I try to do this I end up with 0 in the column. I've done searches 
and found discussions on

concat(..) or append(..)

but when I try to use these sqlite doesn't recognize them. How do I go about 
adding a value to the end of an existing value? Do I need to retrieve it and 
append it in my Java code as opposed to in the sql statement?

Thanks!

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users