Hi Team
Running this SQL in SQL promot and get error ORA-01882: timezone region not found
SELECT
f.code AS "DC",
c.code,
au.username,
TO_CHAR(cw.MOD_TS AT TIME ZONE tz.code, 'DD-MON-YYYY HH24:MI:SS') AS mod_ts
FROM
Table 1 cw
JOIN
Table2 au ON cw.au_uid = au.id
JOIN
Table3 f ON cw.fac_id = f.id
JOIN
Table4 c ON cw.comp_id = c.id
JOIN
time_zone tz ON f.TIME_ZONE_ID = tz.id
WHERE
au.username = 'INTGUSR001';
If i do the following it works..
TO_CHAR(cw.MOD_TS AT TIME ZONE ‘UTC’, 'DD-MON-YYYY HH24:MI:SS')
but i would like to pass the tz.code value to dynamically calculate it as each row in Table3 can have different value for the timezone.
Thanks
sudarsan.