08/30/2023 03:24 AM
Hi ,
usecase is Identity should be created a day before the start date .
For this I am using TIMESTAMPDIFF(DAY, STARTDATE, CURRENTDATE) in my where clause . When I am using the same query in data analyzer it is giving me results . But when I am running the job it is giving timestamp invalid identifier . Our source db is Oracle DB
08/30/2023 03:50 AM
Hi @PragyaPurwar ,
Seems like TIMESTAMPDIFF function is not available in Oracle SQL. Can you try with DATEDIFF() function like below and check once.
SELECT DATEDIFF(STARTDATE, CURRENT_DATE())
08/30/2023 05:42 AM
Job is getting stuck using this function
08/30/2023 03:53 AM
Are you trying to check the timestamp difference on the Oracle DB?
You can simply put a minus operator to calculate the difference in timestamp for Oracle DB.
Calculate difference between two timestamps in Oracle
IGA has MySQL DB which supports TIMESTAMPDIFF function.
08/30/2023 05:46 AM
My startdate format is Dec 30 , 2023 and currentdate format is 'YYYY-MM-DD' . I tried to use the query select format(startdate , 'YYYY-MM-DD')-Current_date from table_name ;
08/30/2023 05:50 AM
@PragyaPurwar Did you tried with DATEDIFF function?
08/30/2023 05:55 AM
Yes DATEIFF is working in data analyzer , when I tried to run the job . It got stuck