- 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.
SAP Adaptive Server Enterprise 15.x
SAP Adaptive Server Enterprise 16.0
KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , How To
About this pageThis is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).
Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.