Hi, I realize this question has been asked a few times, however, I have tried to remove spaces, change name etc, but I am still having issues.

1020
13
Jump to solution
09-13-2017 09:39 AM
Highlighted
New Contributor III

This is issue. I am trying bring in a excel table with a standard set of attribute (fields) which I will then merge layers to this new excel table. The issue is that I have an example of how the data should be entered, and when I bring in this excel table I keep getting this error message. 

 

One or more layers failed to draw:

ValdesSlidesMetrics$ Events: Syntax error (missing operator) in query expression 'Longitude centrepoint >= -129.300244 AND Latitude centrepoint >= 49.622159 AND Longitude centrepoint <= -123.957440 AND Latitude centrepoint <= 53.344866'.
ValdesSlidesMetrics$ Events: An invalid SQL statement was used. [`ValdesSlidesMetrics$`]

 

So when I go to export the data it will not work. I was wondering I have missed something...as this is a very simply step and I can not see what I've done wrong. Any suggestions would be most helpful.

Thanks 

Jessica

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Honored Contributor

As a starting point, your field names cannot contain a space, so remove those.

Did you make that SQL statement as a definition query, or are you getting that error message as soon as you try to add the Excel sheet as a layer?

View solution in original post

13 Replies
Highlighted
MVP Honored Contributor

As a starting point, your field names cannot contain a space, so remove those.

Did you make that SQL statement as a definition query, or are you getting that error message as soon as you try to add the Excel sheet as a layer?

View solution in original post

Highlighted
New Contributor III

Hi Darren

I get this error when bringing in the excel sheet to ArcMap. I will have a closer look at the excel table for spaces etc...and try again. Also notice Joe Borgione comments below. I will change this and see if it work.

Thanks for the help.

Cheers

Jessica

Reply
0 Kudos
Highlighted
MVP Honored Contributor

I'm not sure how that SQL query is getting in there, then. Do you have filters on, in Excel? If so, try removing them.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Not sure if this is your problem or not, but it's worth taking a look at:

centrepoint <= 53.344866'  (the ' at the could be the culprit)

Also, be sure your centrepoint data are typed as float or double, not text.  It may be that you are trying mathematical comparisons ( <,> =>,<=) on a text field.

Highlighted
New Contributor III

HI Joe

Thanks, I was wondering about this. The excel table was sent to me from someone and I thought this might be needed. I will remove it and then see if this works. I let you know.

Thanks 

Jessica 

Reply
0 Kudos
Highlighted
New Contributor III

Hi again Joe

So I checked the table to see if the ..'...was the problem and then checked to make sure the parameters were 'double' and not text. But I still get the error below. I am not too sure what else to try? 

Jessica 

One or more layers failed to draw:

ValdesSlidesMetrics$ Events: Syntax error (missing operator) in query expression 'Longitude centrepoint >= -133.851656 AND Latitude centrepoint >= 46.634603 AND Longitude centrepoint <= -119.664869 AND Latitude centrepoint <= 56.379586'.
ValdesSlidesMetrics$ Events: An invalid SQL statement was used. [`ValdesSlidesMetrics$`]

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

The problem appears to be your field names, as suspected/suggested by Darren Wiens  Most of them have spaces and/or special characters:

That's a huge problem with excel files coming into ArcGIS.  Excel is okay with spaces and/or special characters in the field names, while ArcGIS is not.  You need to clean up the field names in the source data (your excel worksheets) before you can use them in ArcGIS.

Highlighted
New Contributor III

Hey Joe

I was wondering about that. I will change it for the purpose of this database. I was hoping I didn't have to change much of what they were wanting. Thanks for clarifying. I am also a wee knew to using other peoples data and as this is a big project, I was trying to stay within their requirement with regards to the table. Anyhow, I greatly appreciate your time. 

Thanks

Jess

Reply
0 Kudos
Highlighted
New Contributor III

Hi Joe and #Darren Wiens

Also, realize that there are several data validations (drop down menus) in this table, that I need to have in here. I was wondering if there a way around this when bringing the file into Arc? 

Any ideas?

cheers

Jess

Reply
0 Kudos