Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Word 2007 Mail Merge using SQL query rather than whole table

Posted on 2007-03-22
2
Medium Priority
?
1,449 Views
Last Modified: 2008-01-09
I want to merge data from an address table in an SQL2000 database into a word document.  I'm using Word 2007 and I can only seem to be able to load an entire table.  I'd like to be able to specify the data I want using a SQL query.  I had tried using MS Query via Excel and saving a .dqy file to use in Word, but have had weird results.  Some data fields for nvarchar data types are blank.

0
Comment
Question by:neburton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
KCTS earned 750 total points
ID: 18773279
You could create a view in SQL and use the view rather than the table.
0
 
LVL 1

Author Comment

by:neburton
ID: 18778211
I guessed that since posting the question and it works, but was wondering if there was a more elegant and flexible solution.  I'd like to be able modify the query on a regular basis, and it would be nice to do this in word rather than firing up SQL Enterprise Manager to modify a View.  Seems Microsoft missed a trick here with Word 2007.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question