SAP Knowledge Base Article - Preview

3022092 - convert() or cast() may fail due to error #249 depending on query plans - SAP ASE

Symptom

  • convert() or cast() may fail due to error #249 depending on query plans.
  • For example, the following query is executed.

select * from test1
where test1.t1col1 in ( select t2col1 from test2 where t2col1 < 10 )
and convert(int, test1.t1col2) = 100

  • A 249 error may be raised as below if merge join is chosen. It works fine if nested loop join is chosen.

Msg 249, Level 16, State 1:
Server '<ASE name>', Line 1:
Syntax error during explicit conversion of CHAR value 'DATA2     ' to a INT field.


Read more...

Environment

  • SAP Adaptive Server Enterprise 15.x
  • SAP Adaptive Server Enterprise 16.0

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0

Keywords

KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , How To

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.