Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Update field - add data after last character

Posted on 2012-09-09
3
Medium Priority
?
526 Views
Last Modified: 2012-09-10
I know how to use the Update command to update a field with new information, but what if I want to add info to the field after the last character.

For Example, I have a string field were we store email addresses.  I want to update a this field for a bunch of records, but I don't want to overwrite the data, instead I need to add to it at the end of the field.  The existing data for each record will be different, so is important to leave the existing data alone and just add to it.

modifiy the current email field from this:
investor.i_email = me@email.com

to this:
investor.i_email = me@email.com; you@email.com



I know that for updating this field I would use the following command line argument:
UPDATE investor set i_email="you@email.com" WHERE taxid='11-1111111'

My guess is that to add to this field it would be just as simple but with a different command??


Thanks,
Brian
0
Comment
Question by:IO_Dork
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Kent Dyer earned 2000 total points
ID: 38381711
Should be a simple matter of running a SQL Update..
UPDATE YOUR_TABLE
SET investor.i_email = investor.i_email + ';tom_jones@company.com'
WHERE USER=USER

Open in new window


HTH,

Kent
0
 

Author Closing Comment

by:IO_Dork
ID: 38381717
Thanks, looks nice and easy.
0
 

Author Comment

by:IO_Dork
ID: 38381774
are you sure about that command line...it did not work for me.  Here is what I used:

UPDATE investor set i_email = i_email + ';info@mycompany.com' WHERE taxid='11-1111111'
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
How do you create a user-centered user experience on your website? And what are some things you should consider in the process?
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

577 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