Skip to Content

Sybase ASE To HANA


This is my first Blog, so if I don’t articulate properly please pardon me .</p>

Recently I worked in a project which involved Migrating the few tables and stored procedures from Sybase ASE database to HANA Database.

ASE adheres to TSQL standard  and HANA adheres to ANSCII standard. So the Migration involved lot of changes in the HANA Stored procedures. I would like to highlight few of the most important changes:

1) Cursor with parameter within a cursor is not accepted. so as a work around I have changed the code as below:






2) Cursor variables doesn’t require “:”





3) System is not allowing to access the Cursor in any Concat operation





4) Functions have to be used in select statements cannot be assigned directly to a variable.


5)Null handling inside the Arithmetic functions is not necessary.

6)Domains have to be changed to Local Data Type

7)Mixed Cases (Lower & Upper) have to be handled in ”.


Here the column name unitized_flag is maintained in lower case in table itself.

8)In control flow statements like “IF” Range comparison is not allowed(between, In)



9)Error Handling via Exit Handler


10) In Dynamic construct have to use “||” instead of  “+”



11) Update from multiple tables has to be changed


12) IS Null has to be changed to If Null

13) Function Convert to Cast

14)Date functions have to be adjusted


15)Recompile should be changed to Alter procedure recompile

16)Case statements within a procedure not allowed


This CASE has to be taken outside and converted to IF.


17)Identity in DDL has to be changed to Sequences.

18) Calling procedure with NULL is not allowed it has to be replaced with calling with string “NULL”

I hope this Blog is useful for some Data Migration Projects

You must be Logged on to comment or reply to a post.
  • Only got here through the blog post advertising in Cannot create temporary table having identity c... | SCN ...

    This is definitively a nice collection of notes you took during your migration project.

    However, I think you could do way better than this!

    Please invest into proper content preparation, structuring and formatting of your text.

    The "graphics" unfortunately look rather... crappy !?

    The overall text structure seems to get lost on the way.

    Then there are bits and pieces I really don't get... what's "ANSCII" ? SAP HANA doesn't have anything with that name...

    Also, when describing differences and limitations it would be extremely helpful to know the software version you were using. E.g. NULL valued parameters are available in SPS 9 of SAP HANA.

    Maybe you want to do an updated version of this blog post - actually I think putting it as a document instead would be much more appropriate (see The Difference between a Discussion, Blog Post,... | SCN for more info on this) - and include those improvements.

    Would surely be well appreciated.



  • Hi A.Dinesh,

    Thanks for the post, it is useful for those who are working on ASE-HANA migration.

    Just one question, I remember HANA supports CASE within procedure, why did you say it does not? Maybe HANA adds the additional support for now?