Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you add additional data to existing data? 2

Status
Not open for further replies.

RonQA

Technical User
Joined
Jun 24, 2007
Messages
61
Location
US
How do you add additional data to existing data without wiping out the original data?

If I had 20 records and I had a field call datesm which was a list of date and wanted to add another date to all 20 records, what is the proper way to do it?

1/1/2009, 1/1/2010 so how would a create a query to add 1/1/2011? to result in 1/1/2009, 1/1/2010, 1/1/2011

Thanks,
 


Hi,

If you have a field named datesm, that contains your dates, then just add another row, which I assume would be row 21 for the new date.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip
It's not really clear but he may want to add another date column to his table (ref: "... add another date to all 20 records ...")

Probably needs some further definition.
 
Thanks for the response...

What I am trying to do is to take Column "datesm" that has 20 records and that has the text "1/1/2009, 1/1/2010" in each of the records and add ", 1/1/2011" to all 20 records which would have the final result of "1/1/2009, 1/1/2010, 1/1/2011"

Thanks again
 
OK
Code:
UPDATE SomeTable 

SET datesm = datesm & ", 1/1/2011"

Just as an aside, datesm appears to be a multi-valued field and that can cause problems when attempting to use some SQL constructs.
 
Thanks..got it now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top