Thread: merging feilds?
View Single Post
  #1 (permalink)  
Old September 5th, 2006, 10:52 AM
dazednconfused dazednconfused is offline
Authorized User
Join Date: Jun 2003
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default merging feilds?


I am trying to move two fields that will be stored in different records into on field in another table, but I am unsure how to do it. To explain I have two tables one called codes and the other called event

eg codes table may look like this
codeguid |desc1
{1B8113D9-4A19-4F95-8E4D-029F55D65A0D}| testa
{1B8113D9-4A19-4F95-8E4D-029F55D65A0D}| testb

and I want to move the desc1 values into the table called event where the codeguid is matched
eventguid |merged_descriptions
{1B8113D9-4A19-4F95-8E4D-029F55D65A0D}| testa, testb

I hope that makes sense?
I was hoping to do it without having to use an ineficient cursor as there are many records in the table. Is it possible to to run an update query that will return possibly more than 1 value from the codes table and put them into one field on the event table where a match is found on codeguid and eventguid?

Any help would be appreciated. I can try to explain this better if it would help


P.S. I forgot to mention that this is how the event table stands at the monent

eventguid |merged_descriptions
{1B8113D9-4A19-4F95-8E4D-029F55D65A0D}| NULL

So it is an update I am trying to do
Reply With Quote