Microsoft KB Archive/177029

= WD98: Error Message: Word Could Not Parse Your Query Options into a Valid SQL String =

Article ID: 177029

Article Last Modified on 10/4/2002

-

APPLIES TO


 * Microsoft Word 98 for Macintosh

-



This article was previously published under Q177029



SYMPTOMS
When you query for certain records during a mail merge, the following error message may appear:

Word could not parse your query options into a valid SQL String.

This problem occurs when you use quotation marks or an apostrophe in the Query Options Compare To box.



CAUSE
This problem occurs if you are connected to an external data source, such as one created in Microsoft Excel 98 Macintosh Edition, and you use quotation marks or an apostrophe in the Query Options box to create a Compare To entry containing a quotation mark or an apostrophe.



WORKAROUND
Do not include quotation marks or an apostrophe when you set up your query options. To do this, follow these steps:


 * 1) From the mail merge main document, click Mail Merge on the Tools menu, and then click Query Options.
 * 2) Under Compare To, select the Field and Comparison settings, and enter a value without quotations marks or an apostrophe.
 * 3) Click OK.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
When you perform the mail merge, the results may not show quotation marks from your data, depending on how you are connecting to the data source. If you are connecting through Dynamic Data Exchange (DDE), you will not receive quotation marks in the results of the merge. However, if you connect by converting the data source (for example, from a Microsoft Excel 97 for Windows or Microsoft Excel 98 Macintosh Edition worksheet), you will receive quotation marks in the results of the merge.

To open an Excel data source by DDE, follow these steps:


 * 1) On the Tools menu, click Mail Merge.
 * 2) Click Get Data, and then click Open Data Source.
 * 3) Find the Excel worksheet you want to draw data from, select it, and then click Open.

To open an Excel data source by converting an Excel 97 for Windows or Excel 98 Macintosh Edition worksheet, follow these steps:


 * 1) On the Tools menu, click Mail Merge.
 * 2) Click Get Data, and then click Open Data Source.
 * 3) Under List Files of Type, select Microsoft Excel 97-98 Worksheet, find the Excel worksheet you want to draw data from, select it, and then click Open.
 * 4) In the Open Worksheet dialog box, select the appropriate settings and then click OK.

For additional information about this situation in earlier versions of Word, please see the following article in the Microsoft Knowledge Base:

125414 WD: Errors When Querying on Data with Straight Quote/Apostrophe

Additional query words: errmsg odbc sql query filter sort apostrophe apostrophes curly quote quotes double quotation marks quoted single mark smart

Keywords: kbbug kbmerge kbfaq kbpending KB177029

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.