
Signature
Michael Tissington
http://www.tabtag.com
http://www.oaklodge.com
If your query works in the database in which it is defined then typically
Word would just do SELECT * FROM queryname and you should be OK. (although I
can't tell without trying it, so it would help to know
a. which version of Word
b. what is the data source (looks as if you mean Access or SQL Server)
c. how are you connecting? (DDE, ODBC, OLEDB) ?
)
However, if you are filtering or sorting, Word will have to modify the
SELECT, and that might create some invalid SQL depending on the syntax Word
uses. It might be worth using VBA to look at the
ActiveDocument.MailMerge.DataSource.QueryString
'Group' is certainly used in SQL for the GROUP BY clause but I don't think
it is reserved in the sense that you can't use it as a name for columns etc.
--
Peter Jamieson
MS Word MVP
> I have an SQL query and one of the columns is called 'GROUP'
>
[quoted text clipped - 9 lines]
> http://www.tabtag.com
> http://www.oaklodge.com