variable scratch_text varchar2(50) declare id number; begin id := dbms_workload_repository.create_snapshot(); :scratch_text:='snapshot='||id; end; / print scratch_text