How to Merge Duplicate Records Using SQL for MW Word Mail Merge

ykapta

New Member
Joined
May 17, 2011
Messages
1
Hi Guys,

I've been working on this all day and can't seem to figure it out. Your help is greatly appreciated.

Current SQL query is returning data that looks like this:

ID FNAME LNAME FLDTEXT FLDTEXT_ID (HIDDEN)
1 JOHN DOE BLUE 10
1 JOHN DOE RED 11
1 JOHN DOE GREEN 12

Which is fine, however the Word Mail Merge receipient list wants to treat all of these as seperate and individual records, which is the problem.

I need it to look something like this:

ID FNAME LNAME FLDTEXT FLDTEXT1 FLDTEXT2 FLDTEXT_ID (HIDDEN)
1 JOHN DOE BLUE RED GREEN 10, 11, 12

Unfortuantely, I do not have direct access to the source, so I can modify the table structure. Based on my research, I need to create a SQL view and use UNION function. Any guidance would be greatly appreciated.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top