Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / January 2004

Tip: Looking for answers? Try searching our database.

Parse query options into a valid SQL string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shannon - 24 Jan 2004 22:26 GMT
Why do I get the message, "Word can not parse your query options into a valid SQL string?

What can I change to get this to work

Thanks,  Shannon
Peter Jamieson - 26 Jan 2004 15:27 GMT
What it usually means is that Word has got confused about the type of data
in a column in your data source, and builds the wrong piece of query
language. For example, if it thinks the field is a number, it should build a
bit of language like "WHERE myfield = 123", but if it thinks the field is a
piece of text it should use "WHERE myfeild = '123'). This can occur because
the data converters that get data on behalf of Word may logically have to
make guesses about what data is in a column.

Although you may not always be able to solve this problem easily, (we'd at
least need to know which version of Word and what the data source was to
start thinking about a solution), if your data source is Excel and you have
a column where some of the data is numeric and some is alphanumeric, you may
need to refomat the column in Excel as text and reconnect Word to your data
source.

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> Why do I get the message, "Word can not parse your query options into a valid SQL string?"
>
> What can I change to get this to work?
>
> Thanks,  Shannon
Cindy M  -WordMVP- - 26 Jan 2004 17:02 GMT
Hi =?Utf-8?B?U2hhbm5vbg==?=,

> Why do I get the message, "Word can not parse your query options into a valid SQL string?"

Because Word isn't able to understand some kind of filtering conditions you're trying to
set.

Which version of Word? What's the data source type? Under exactly what circumstances (after
performing which commands) do you get this?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the
newsgroup and not by e-mail :-)
- 26 Jan 2004 18:15 GMT
Thank You.

Peter nailed it when he talked about confusing data
types.  You were onto that too, I could tell.  I was
querying a field (column in Excel) that had trophy
placement, such as 1st, 2nd...Honorable Mention.  Query
had a little problem with the 1 in 1st and so on.

Once I declared the format as text, it did fine.

Thanks again,  Shannon
>-----Original Message-----
>Hi =?Utf-8?B?U2hhbm5vbg==?=,
[quoted text clipped - 16 lines]
>
>.
Shannon - 26 Jan 2004 18:29 GMT
Forget what I said, I was on the wrong field when it
worked.  I have Microsoft Word 2000 merging data from
Excel.  I receive the error after closing the query
window.  The data is formated as text, but I still get the
problem.  It is still the data with 1st, 2nd...Honorable
Mention that it has a problem with.  When I thought it
worked, I was clicking the wrong title.
>-----Original Message-----
>Hi =?Utf-8?B?U2hhbm5vbg==?=,
[quoted text clipped - 16 lines]
>
>.
Cindy M  -WordMVP- - 27 Jan 2004 16:39 GMT
Hi Shannon,

> Forget what I said, I was on the wrong field when it
> worked.  I have Microsoft Word 2000 merging data from
[quoted text clipped - 3 lines]
> Mention that it has a problem with.  When I thought it
> worked, I was clicking the wrong title.

Right. Do you know which connection method you're using to
link in the data? (If you don't, it's likely DDE.)

Changing the connection method appears to alleviate the
problem. In the "Open Data Source" dialog box activate the
"Select method" checkbox. After you've chosen the Excel file
you should get a list of methods to choose from; choose ODBC.

Now you should be able to set the Query options (turn down
Word's offer to use MS Query - at least for the moment). If
you still can't, please describe which steps you used to
format this column explicitly as text.

Note that using ODBC may change how dates and numbers are
displayed in the merge result. You'll find information on how
you can control these formats in the Mail merge FAQ on my
website.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.