975: -- |---------------------------< chk_attempt_id>------------------------------|
976: -- ----------------------------------------------------------------------------
977: --
978: -- Description:
979: -- Validates if the attempt id exists in OTA_ATTEMPTS
980: --
981: -- Prerequisites:
982: -- Must be called as the first step in insert_validate.
983: --
984: -- In Arguments:
985: -- p_attempt_id
986: --
987: -- Post Success:
988: -- If attempt_id exists in OTA_ATTEMPTS, then continue.
989: --
990: -- Post Failure:
991: -- If the attempt_id does not exists in OTA_ATTEMPTS, then
992: -- throw an error indicating the same.
987: -- Post Success:
988: -- If attempt_id exists in OTA_ATTEMPTS, then continue.
989: --
990: -- Post Failure:
991: -- If the attempt_id does not exists in OTA_ATTEMPTS, then
992: -- throw an error indicating the same.
993: --
994: -- Access Status:
995: -- Internal Row Handler Use Only.
1009: l_api_updating boolean;
1010: --
1011: cursor csr_attempt_exists is
1012: select 1
1013: from ota_attempts
1014: where attempt_id = p_attempt_id;
1015: --
1016: Begin
1017: --
1034: -- Check if attempt_id is not null
1035: --
1036: if p_attempt_id IS NOT NULL then
1037: --
1038: -- attempt_id must exist in ota_attempts
1039: --
1040: open csr_attempt_exists;
1041: fetch csr_attempt_exists into l_attempt_exists;
1042: --