Skip to Content

Unable to Convert Inverted Date to Date DataType Column

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 12, 2017 at 08:10 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded