Hi, I have a related question.
So I performed the operation and have now an additional field with the type localdate (I used to_localdate) after all, not to_timestamp, because I only care about the date).
And now I am trying to use this field in WHERE clauses, which was the initial reason I even wanted to convert the field from text to date. And it is not working:( I already tried all possible syntaxis, with like, with =, with between, with using 00:00:00 or not using it... receiving the same error all the time.
Do you have any ideas what can be wrong?
My converted date field is fiscpertimestamp, the initial field is fiscper_0.
If I just execute the view I can see that the field contents look like for example "2022-05-01". So I tried an expression:
SELECT * FROM cldatabase.iv1uverrechnungsberichtmashatest WHERE fiscpertimestamp = '2022-05-01'
And it (and all similar expressions) end up with the error below:
Finished with error: Error executing query. Total time 1.5 seconds.
QUERY [VIRTUAL] [ERROR]
QUERY [JDBC WRAPPER] [ERROR]
QUERY [JDBC ROUTE] [ERROR] Received exception with message 'SAP DBTech JDBC: [403]: internal error: Error opening the cursor for the remote database [SAP][ODBC Driver][SAP IQ]Procedure 'TO_TIMESTAMP' not found for query "SELECT SUM("/BIC/OUD2ADAUF"."/BIC/D1KARTZE"), ("/BIC/OUD2ADAUF"."CALDAY"), ("/BIC/OUD2ADAUF"."FISCPER"), ("/BIC/OUD2ADAUF"."FISCVARNT"), ("/BIC/OUD2ADAUF"."/BIC/A1MBRANC2"), ("/BIC/OUD2ADAUF"."CO_AREA"), ("/BIC/OUD2ADAUF"."/BIC/B1MELKAL"), ("/BIC/OUD2ADAUF"."/BIC/D1MOLAGST") FROM "sapbw_nls"."/BIC/OUD2ADAUF" "/BIC/OUD2ADAUF" WHERE CONVERT(DATE, TO_TIMESTAMP((SUBSTRING(("/BIC/OUD2ADAUF"."FISCPER"),CONVERT(INT,( CONVERT(DECIMAL,?) + 1) ),CONVERT(INT,( CONVERT(DECIMAL,?) - CONVERT(DECIMAL,?) ) )))+(SUBSTRING(("/BIC/OUD2ADAUF"."FISCPER"),CONVERT(INT,( CONVERT(DECIMAL,?) + 1) ),CONVERT(INT,( CONVERT(DECIMAL,?) - CONVERT(DECIMAL,?) ) ))), ? )) = ? GROUP BY "/BIC/OUD2ADAUF"."CALDAY","/BIC/OUD2ADAUF"."FISCPER","/BIC/OUD2ADAUF"."FISCVARNT","/BIC/OUD2ADAUF"."/BIC/A1MBRANC2","/BIC/OUD2ADAUF"."CO_AREA","/BIC/OUD2ADAUF"."/BIC/B1MELKAL","/BIC/OUD2ADAUF"."/BIC/D1MOLAGST" "'