Create Index syntax error

G

Guest

Hello All.

I am attempting to create an Index in a table through a sql query, and I
keep getting a syntax error in create index statement message.

Here is what I have

CREATE INDEX [Engagement Name] ON [tb|Main Report Data];


What am I doing wrong? Is there something I have to setup in the database
for this type of sql statement to work?
 
G

Guest

try:
CREATE INDEX <index_name>
ON tb|Main Report Data ([Engagement Name])

Further info available from Access 2007 help topic: Create an index
(Probably in earlier versions, too)

HTH
 
J

John W. Vinson

Hello All.

I am attempting to create an Index in a table through a sql query, and I
keep getting a syntax error in create index statement message.

Here is what I have

CREATE INDEX [Engagement Name] ON [tb|Main Report Data];

What you posted here contains a vertical-bar character where there should
probably be a letter L (tb|Main Report Data) - is that a typo in the post, or
in your SQL? A vertical bar is a "superquote" character that I've never really
understood, but it would certainly be a syntax error.


John W. Vinson [MVP]
 

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