SQL to find the Time Admin instance number for a particular run.
-- ------------------------------------------------------- -- Get the instance number for the Time Admin temp tables -- prompting for the process instance number. -- ------------------------------------------------------- select '1' as INSTANCE from PS_TL_IPT11 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '2' as INSTANCE from PS_TL_IPT12 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '3' as INSTANCE from PS_TL_IPT13 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '4' as INSTANCE from PS_TL_IPT14 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '5' as INSTANCE from PS_TL_IPT15 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '6' as INSTANCE from PS_TL_IPT16 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '7' as INSTANCE from PS_TL_IPT17 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '8' as INSTANCE from PS_TL_IPT18 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '9' as INSTANCE from PS_TL_IPT19 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '10' as INSTANCE from PS_TL_IPT110 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '11' as INSTANCE from PS_TL_IPT111 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '12' from PS_TL_IPT112 where PROCESS_INSTANCE = :PROCESS_INSTANCE union select '13' as INSTANCE from PS_TL_IPT113 where PROCESS_INSTANCE = :PROCESS_INSTANCE