Skip to Content

Hi,

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:

Cursor :C_PARTY_DETAILS

Orginal:

H1.jpg

Changed:

/wp-content/uploads/2014/08/h2_512595.jpg

2) Cursor variables doesn’t require “:”

Orginal:

/wp-content/uploads/2014/08/h3_512596.jpg

Changed:

/wp-content/uploads/2014/08/h4_512600.jpg

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

Orginal:

/wp-content/uploads/2014/08/h5_512601.png

Changed:

/wp-content/uploads/2014/08/h6_512602.png

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

/wp-content/uploads/2014/08/h7_512606.png

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 ”.

/wp-content/uploads/2014/08/h8_512607.png

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)

/wp-content/uploads/2014/08/h9_512608.png

/wp-content/uploads/2014/08/h10_512615.png

9)Error Handling via Exit Handler

/wp-content/uploads/2014/08/h11_512616.png

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

/wp-content/uploads/2014/08/h12_512617.png

/wp-content/uploads/2014/08/h13_512624.png

11) Update from multiple tables has to be changed

/wp-content/uploads/2014/08/h14_512625.png

12) IS Null has to be changed to If Null

13) Function Convert to Cast

14)Date functions have to be adjusted

/wp-content/uploads/2014/08/h15_512626.png

15)Recompile should be changed to Alter procedure recompile

16)Case statements within a procedure not allowed


/wp-content/uploads/2014/08/h16_512637.png

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

/wp-content/uploads/2014/08/h17_512636.png

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

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Lars Breddemann

    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.

    Cheers,

    Lars

    (0) 
  2. Hubery Lu

    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?

    Regards,

    Hubery

    (0) 

Leave a Reply