473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Update that does not overwrite

nathj
938 Expert 512MB
Hi,

I have a field in a table that is type longtext. When a record is created there may or may not be anything that goes in here. However, it is possible for this field to be updated in such a way that I need to add any text to the end of what ever is already there.

I am familiar with the UPDATE syntax but I can only make this overwrite the information that is there. I need to add to the information that is there.

I could get the existing info into a variable and create a new variable with the original and the new information but I just thought it has to be possible to update a field without overwriting.

I found that with a numeric field it is possible to do something like:
Expand|Select|Wrap|Line Numbers
  1. update table set table.numericfield = table.muericfield+1 
  2.  
Is it possible to achieve a similar affect with a text field?

Cheers
nathj
Dec 7 '07 #1
2 2036
code green
1,726 Expert 1GB
You can try CONCAT.
Expand|Select|Wrap|Line Numbers
  1. UPDATE `table` SET `field` = CONCAT(`field`,'newdata')
  2. WHERE condition
I think it can be used in an UPDATE query
Dec 7 '07 #2
nathj
938 Expert 512MB
You can try CONCAT.
Expand|Select|Wrap|Line Numbers
  1. UPDATE `table` SET `field` = CONCAT(`field`,'newdata')
  2. WHERE condition
I think it can be used in an UPDATE query
Hi code green,

Thanks for that I'll give it a try.

Cheers
nathj
Dec 7 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jonas Asberg | last post by:
Hi, I got a new SQL Server database and are in the process of porting my Access databases to my new SQL Server. I have worked with Access and Oracle in the past but I am new to the SQL Server...
3
by: Brandon M | last post by:
I'm trying to get an Update Query to overwrite any records that already exist. By default it appears to skip any records in which the key already exists. Is there any way to change this?
0
by: Thomas | last post by:
I`m developing a three-tier webapplication using stored procedures as my method for accessing my database. In Visual Studio I have a web project, a business logic project and a data-access project,...
0
by: Stephen Brown | last post by:
I have been running an aspnet application for over a year now and have been updating without problems. This morning, a client sent me an error message that he received at the exact moment when I...
3
by: Roy | last post by:
Hi Access gurus, I have a A2K application.The data in the database is updated daily by a excel download.I have a master n related tables keyed in by a OrderID.I have a problem in updating data.If...
6
by: John | last post by:
I have a multi-user Access database with back- and front end on the network. Problem is that the forms don't get refreshed automatically: if user A enters a record it will only become available to...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
4
by: Daniel Loose | last post by:
Hi, I am new to prototype.js and appreciate it a lot. One simple thing however seems to be impossible? I have a <tdelement which I want to fill with - an input field - text - another input...
2
by: =?Utf-8?B?U2hlbGRvbg==?= | last post by:
Hi! How do you update a project that's already installed on the user's machines? In VB6, I would just overwrite the exe (when everyone was out of the project) and it would change the program for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.