762: syntax_required NUMBER := 0;
763:
764: CURSOR SO_LOCK_RECORDS IS
765: SELECT header_id -- Lock rows to be purged
766: FROM so_note_references
767: WHERE header_id = p_header_id
768: FOR UPDATE NOWAIT;
769: BEGIN
770: OPEN SO_LOCK_RECORDS;
769: BEGIN
770: OPEN SO_LOCK_RECORDS;
771: CLOSE SO_LOCK_RECORDS;
772:
773: DELETE FROM so_note_references
774: WHERE header_id = p_header_id;
775:
776: RETURN SQLCODE;
777:
781: ROLLBACK;
782: so_record_errors( return_status,
783: p_request_id,
784: p_header_id,
785: 'OEPUR: SO_NOTE_REFERENCES',
786: NULL );
787: CLOSE SO_LOCK_RECORDS;
788: RETURN return_status;
789: