How to Merge a Word Document & SQL Database Fields

By Lanae Carr

Microsoft Word is a word-processing program that offers a range of business tools, including the option to import from the open-source database language SQL. You can merge the SQL database fields using the Mail Merge feature in Microsoft Word. Using this method, you can retrieve all data from your SQL-based server; however, data fields will not be editable. Make the appropriate updates and edits to your SQL database fields prior to importing them into Microsoft Word. Use the Mail Merge Wizard in Word to simplify this process.

Step 1

Open Microsoft Word. Click the "Mailings" tab on the ribbon menu.

Step 2

Click the "Start Mail Merge" icon in the Start Mail Merge group. A drop-down menu will appear. Click "Step by Step Mail Merge Wizard."

Step 3

Click "Next" at the bottom of the Mail Merge Wizard pane on the right of your screen to start your document. Click "Next" a second time to use the format of the current document for your import.

Step 4

Click "Browse"; two options for selecting an SQL database will appear. Choose "Connect to a New Data Source," since this is your first time merging an SQL document in Word. Select "Microsoft SQL Server" from the Data Connection Wizard dialog box.

Step 5

Enter your SQL server name. Choose if you want Windows to authenticate your SQL connection or type in your user name and password. If your SQL server is set up on a different computer, type in your user name and password. Click "Finish."

Step 6

Click "Next" to continue with your merge. A dialog box allowing you to confirm the database name and select the fields that you want to merge into your document will appear. Select the fields that you want and click "Next" to complete the SQL merge. Follow the prompts to choose a format for your mail merge. Click "File" and then "Save" after your formatting is complete.