is GROUP a reserved word ?

M

Michael Tissington

I have an SQL query and one of the columns is called 'GROUP'

I have a mail merge that runs against the query and everything's works
accept for the group field.

In Word MailMerge is GROUP as reserved word ?

Thanks.
 
P

Peter Jamieson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top