Solved

mySQL Query - Append Text to end of field

Posted on 2009-07-02
2
447 Views
Last Modified: 2012-08-14
Hey,
I want to update about 450 records by appending a string of text to the end of a field.

Basically; in table 'jos_jcalpro_events' where 'RTO' = '1' append "<a href='#'>Link</a> " to the bottom of the field called 'description'.

How would I go about structuring my SQL query to do this.

Thanks for any input

Regards
Mitch
0
Comment
Question by:SM17CH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 250 total points
ID: 24769670
Hope this helps:

Not sure whether RTO field is of datatype integer or string.
If it is integer, then remove single quotes for 1.
UPDATE jos_jcalpro_events
SET description = CONCAT(description, '<a href='#'>Link</a>')
WHERE RTO = '1'

Open in new window

0
 
LVL 31

Assisted Solution

by:RiteshShah
RiteshShah earned 250 total points
ID: 24770456
it seems there was a small mistake in above solution, have a look at this one.



UPDATE jos_jcalpro_events
SET description = CONCAT(description, '<a href=''#''>Link</a>')
WHERE RTO = '1'
 
 
--or
 
UPDATE jos_jcalpro_events
SET description = CONCAT(description, '<a href=''#''>Link</a>')
WHERE RTO = 1

Open in new window

0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question