SAP Knowledge Base Article - Preview

2414692 - Different result for convert function between little endian (x64) and big endian platform - SAP ASE

Symptom

  • Running a convert on hex values returns different result depending on platform used

-- Linux & Solaris x64

select convert(tinyint, 0x38000000), convert(smallint, 0x38000000), convert(int, 0x38000000)
go
select convert(tinyint, 0x00000038), convert(smallint, 0x00000038), convert(int, 0x00000038)
go

 ----  ------  -----------
  56     56           56
 ----  ------  ---------------
    0       0  939524096

-- Solaris Sparc

select convert(tinyint, 0x00000038), convert(smallint, 0x00000038), convert(int, 0x00000038)
go
select convert(tinyint, 0x38000000), convert(smallint, 0x38000000), convert(int, 0x38000000)
go

----  ------ -----------
   0       0          56
----  ---------  ---------------
 56  14336  939524096


Read more...

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0

Keywords

convert, hex, endian , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , 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.