declare
a varchar2(100);
v_output varchar2(100);
begin
a:='HCL HR';
SELECT substr('HCL HR',1,instr('HCL HR',' ')-1) into v_output from dual;
dbms_output.put_line(v_output);
end;
OUTPUT
==========
HCL
a varchar2(100);
v_output varchar2(100);
begin
a:='HCL HR';
SELECT substr('HCL HR',1,instr('HCL HR',' ')-1) into v_output from dual;
dbms_output.put_line(v_output);
end;
OUTPUT
==========
HCL
No comments:
Post a Comment