Select to Sybase table from SQL Server (by LinkedServer) getting error "db.schema.table was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16

Select to Sybase table from SQL Server (by LinkedServer) getting error "The OLE DB provider "MSDASQL" for linked server "XXX" supplied inconsistent metadata for a column. The column "XXXX" (compile-time ordinal 1) of object "db.schema.table" was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16

Query: Select * from [Server].[db].[schema].[table]

Upvotes: 1

Views: 699

Answers (1)

Finally after searching some time in the web found the answer, when makes a query on a table having a nullable CHAR column gives the error...

So the solution was create a View in Sybase where I make an ISNULL Validation for the specific column, and from the SQL Server query the View instead the table.

Query: Select * from [Server].[db].[schema].[view]

Source: http://www.dbainfo.net/wp-content/uploads/CR/sdk_17.htm

Upvotes: 1

Related Questions