I'am using micronaut data jpa and the query works fine with oracle but not with H2 database. here is the query : delete from myTable where (some conditions) AND (to_char(startDate, 'DY', 'NLS_DATE_LANGUAGE = ENGLISH') IN ('MON', 'TUE', 'WED', 'THU', 'FRI')) (some conditions)
The problem is the query do the right job in the oracle database but my tests fails in H2 database.
the test pass only when i replace ('MON', 'TUE', 'WED', 'THU', 'FRI') by (1,2,3,4,5), but it doesn't work well since the first day in America is Sunday and not Monday, so it shifts by one day.
Thanks in advance for your help.
i've tried many solutions like setting NLS_DATE_LANGUAGE...