I have an sql database with quiet long table names, many of them are longer than 64 characters which is causing issues. I can add the tables to the map by right clicking and selecting add to map but if I try to add them using the Add Data>Query Layer tool, or if I add them and then try to modify the query using the Query Layer tool I get an error saying 'Name is empty' and the query will not validate.
The documentation states that tables names of up to 128 characters from SQL are allowable which would be fine but in this case the limit appears to be 64 characters?
I am using ArcPro 2.9 and SQL Server 14.
Any help gratefully received!
Not sure this is the issue, but SQL Server 2014 is not supported with ArcGIS Pro 2.9.x: https://enterprise.arcgis.com/en/system-requirements/latest/windows/database-requirements-sqlserver....
Are there any special characters in the table name?
Is the total length of the fully qualified name longer than 128 characters (i.e. DBNAME.OWNER.TABLE)?
Thanks for coming back to me I am just checking with the database admin but it says it is version 14 of SQL which if I look online came out in 2017, I will confirm this though.
There is no special characters in the sql database name but when I add the layers into ArcPro a % sign is added to the start of each table name e.g table Admin_MaritimeBdry_International_EMODNet_EEZ becomes DATAMGT_geo_reference.dbo.%Admin_MaritimeBdry_International_EMODNet_EEZ,
Database name: DATAMGT_geo_reference
Table Name: %Admin_MaritimeBdry_International_EMODNet_EEZ
This happens with all the layers but the layers with name less than 64 characters that have the % sign still work ok in the Query Layer tool while those that are longer than 64 characters don't work.
Thanks for that additional information. It may be best to work with Technical Support on this.
Is the database a geodatabase or just a SQL Server spatial database (i.e. repository tables)?
It is a SQL server spatial database.
Ok, I would contact support on this.