Skip to Content
0

Unable to Convert Inverted Date to Date DataType Column

Apr 11, 2017 at 08:36 AM

107

avatar image

Hi , I have TCURR (Currency table) table in SAP BW ON HANA (BW 7.5 on SAP HANA SPS10), this table has column GDATU which is NVARCHAR in which date is stored in inverted date format. I am unable to convert the GDATU inverted date column into date column.

Here is sample sql query that i am firing ,and here is error i am getting

SELECT GDATU, 99999999-TO_INTEGER( GDATU ) INTGDATU from TCURR;

ERROR:

SAP DBTech JDBC: [339]: invalid number: [6930] attribute value is not a number;int sqlsub(int '99999999', int [here]int(string "GDATU")),GDATU = ''[string]; checkNull false

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mateusz Bialy Apr 12, 2017 at 08:10 PM
0

Hello,

your query is correct and works for me, you should check if data in TCURR is correct

try:

SELECT GDATU from TCURR where GDATU NOT LIKE '%[0-9]%'
It should return all troublesome data. If you remove "not" your query would work only for correct rows.
Regards,
Mateusz.

Share
10 |10000 characters needed characters left characters exceeded