Hello,
I am using an ArcSDE geodatabase that is connected to a Microsoft SQL Server. I am running some processes using some SQL commands to push data from MS SQL Server into other applications. I received the following error when I attempted to run the process:
"Msg 8114, Level 16, State 5 Error converting data type nvarchar to numeric"
There seems to be a data type mismatch somewhere in ArcSDE data but the error does not provide me with a specific field so that I can check data in the ArcSDE geodatabase. Would it be possible pinpoint the field in the ArcSDE database where the issue exists?
Thank you,
SAM1
Enterprise geodatabases are stored in, not "connected to" vendor databases. The distinction is significant, because it indicates how to locate the issue -- via the SQL client. While there is "SDE data", it only exists in the sde/dbo schema metadata tables. All the other data is user data.
One way to identify which column in your SQL is problematic is to reduce the complexity of the SQL command until it does not fail, then add columns again until it does. There are likely to be database vendor-specific solutions involving error logs for tracking down SQL errors.
If the SQL is being executed in an arcpy.ArcSDESQLExecute cursor, and additional details are being hidden, you can print the SQL before executing it, then use that SQL in a client window.
A leading candidate for SQL problems are columns which are managed by a domain (you see a different value in the Desktop or Server interface than is stored in the database), though it seems less likely for this particular error message.
- V