SAP Knowledge Base Article - Preview

1893443 - Procedure within SELECT, results in error -866 “<procedure> returned a result set with a different schema than expected” - SQL Anywhere


Using a procedure within a SELECT statement causes the following error:

<procedure> returned a result set with a different schema than expected
SQLCODE=-866, ODBC 3 State="HY000"

If the procedure is recreated the error disappears.

What is the reason for this behavior?

Is it possible that the used view, in the procedure, is related to this issue?



SAP Sybase SQL Anywhere


SAP SQL Anywhere all versions ; SAP SQL Anywhere, cloud edition all versions ; SQL Anywhere all versions


function, view, parameter, result set, resultset , KBA , BC-SYB-SQA , SQL Anywhere (on premise, on demand) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.