PC Review


Reply
Thread Tools Rate Thread

Concatenate fields without duplicating data

 
 
Rachel
Guest
Posts: n/a
 
      18th May 2010
I have two tables that I'm creating a query with.

Table 1 has Agent field and Table 2 has product field. I'm linking the
tables by a primary key.

Table 1 has some product names in the Agent field (Commercial, Residential,
Commercial & Residential). I would like to concatenate all of the three
product names from the Agent field in Table 1 to the product field in Table
2. Table 2 may already have that particular product name in the product
field, in this case I should not concatenate it. In any case, I will need to
delete these three product names from the Agent name in Table 1.

I also need to change the word "Residential" to "Personal".

Example:

Rec # SG_Carrier PRODUCTS CITY
1 Progressive Personal Anchorage
2 Nationwide Life Anchorage
3 Commercial Personal Birmingham
4 Residential & Commercial Life Alexander City
5 Residential & Commercial Commercial Hartselle
6 Residential & Commercial Bonds, Commercial Tuscaloosa
7 Residential Dumas
8 Commercial Flood Only Tustin
9 Residential & Commercial Bonds, Commercial Mena
10 Residential & Commercial Commercial, Specialty Fresno

The above needs to be changed to:

Rec # SG_Carrier PRODUCTS CITY
1 Progressive Personal Anchorage
2 Nationwide Life
Anchorage
3 Personal, Commercial Birmingham
4 Life, Personal
Alexander City
5 Commercial, Personal Hartselle
6 Bonds, Commercial, Personal Tuscaloosa
7 Personal Dumas
8 Flood Only, Commercial Tustin
9 Bonds, Commercial, Personal Mena
10 Commercial, Specialty, Personal Fresno

I hope that's not to confusing.

Any help would be greatly appreciated.

Thanks,
Rachel

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate Data from same fields from different records BobbyOH Microsoft Access Queries 2 13th Jan 2005 11:51 AM
Duplicating form fields =?Utf-8?B?RXNtZXJhbGRh?= Microsoft Word Document Management 6 3rd Jan 2005 10:00 PM
duplicating certain fields =?Utf-8?B?UnVzcw==?= Microsoft Access 1 22nd Dec 2004 02:24 AM
Duplicating data into blank fields ED DENMARK Microsoft Excel Worksheet Functions 2 17th Sep 2004 07:58 AM
Duplicating data in fields Jim Driscoll Microsoft Access 2 6th Oct 2003 10:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:23 AM.