HANA SQL- MAP Function

light111MAP ( )- works similar to IF..THEN…IF…..THEN…ELSE 


The test program that calls the AMDP method.

2


CURRENT_DATE– returns the current date(YYYY-MM-DD).

TO_DATS( )– converts the date(YYYY-MM-DD) to system date format like YYYYMMDD

DAYNAME ( )– function returns the day name of the date(YYYY-MM-DD).

MAP( )– Function receives an argument(first) and  if…then…if..then…….else. Below as shown depending on dayname it returns the day number of within the week.

1

3


From timestamp we can get the date and time using TO_DATE( ) & TO_TIME( ) functions.

2


 

 

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s