Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 5th, 2006, 10:52 AM
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
  #2 (permalink)  
Old September 7th, 2006, 05:38 AM
Authorized User
Join Date: Jun 2003
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts

It always bugs when I find a post on a forum by someone that has had the same problem as me and there is no answer and you dont know if there was a solution or not. so I am just writing here to say that I ended up using a cursor despite its inefficiency.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging nodes trishla XSLT 11 October 18th, 2007 03:01 PM
Grouping/Merging Jens Rudolph XSLT 2 June 6th, 2007 02:50 AM
Merging files ajindal General .NET 2 January 10th, 2007 06:42 AM
Merging Tables Charlotte89 Access 5 November 22nd, 2006 12:49 AM
Merging reports siptah Access VBA 1 May 13th, 2005 08:05 AM

All times are GMT -4. The time now is 01:49 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.