Skip to Content
0
Former Member
Dec 17, 2016 at 03:13 PM

HANA Timestamp conversion to DDIC timestamp HANA View

328 Views

Hi,

I've create a virtual table on a SDA remote source. I'm using this virtual table in a view to load data into BW. In this virtual table there is a timestamp field. Regardless of how I define this field in the BW datasource, delta pointer by timestamp doesn't work. This is because the time stamp is in bigint value like "20,16,101,311,619" but the virtual table timestamp value is "Oct 13, 2016 11:16:19 AM". To get around this, I define delta pointer as a "Numeric Pointer". Than in the view definition I define a field using to_dats, to_time, concat and lpad to create the string representation and cast to bigint. It's just a very long sql string. Is there a better way to do this?

cast(concat(to_dats(date),concat(lpad(hour(to_time(date)),2,'0'),concat(lpad(minute(to_time(date)),2,'0'),lpad(second(to_time(date)),2,'0')))) as bigInt),

Thank you

Dae