Closed ieviev closed 1 year ago
problem seems to be in the quotes surrounding the table
SELECT FROM [dbo].["Application Object Metadata"] as [x] WHERE (([x].[Object ID] > @param1)) -- params @param1 - 50000;
turns out the first identifier allows quotes but the one after FROM does not,
generated sql:
SELECT ["Application Object Metadata"].[Object ID] as 'Object ID' FROM [dbo].["Application Object Metadata"] as ["Application Object Metadata"] -- params
tested correct sql
SELECT ["Application Object Metadata"].[Object ID] as 'Object ID' FROM [dbo].[Application Object Metadata] as ["Application Object Metadata"] -- params
where is this FROM expression in code?
Some applications have table names with spaces
using MSSQLSERVER provider
querying tables without spaces works, all tables with spaces in the name fail