sgifford has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to append some text to a column in a database table, in a way that's straightforward and atomic. Basically I want to say:
The database is currently Microsoft SQL Server, and the data type of this column is Text (basically a BLOB of text, as compared to a string). Ideally I'd like something portable, but I'll take what I can get.UPDATE table SET item = append(item,'new text\r\n')
We're writing into a database used by a proprietary application, so I can't make any changes to the table structure.
Currently I'm reading the column, appending the text, then writing it back out. This works, but is ugly, and prone to race conditions.
Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Appending text to a column in SQL
by grep (Monsignor) on Oct 17, 2006 at 23:25 UTC | |
by sgifford (Prior) on Oct 18, 2006 at 00:30 UTC | |
by grep (Monsignor) on Oct 18, 2006 at 00:59 UTC | |
by sgifford (Prior) on Oct 18, 2006 at 03:06 UTC | |
by grep (Monsignor) on Oct 18, 2006 at 03:59 UTC | |
|
Re: Appending text to a column in SQL
by imp (Priest) on Oct 18, 2006 at 02:42 UTC | |
by sgifford (Prior) on Oct 18, 2006 at 03:17 UTC | |
by imp (Priest) on Oct 18, 2006 at 03:26 UTC | |
by sgifford (Prior) on Nov 01, 2006 at 17:42 UTC | |
by Anonymous Monk on May 27, 2008 at 17:14 UTC |