Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
create or replace function first_word (str in varchar2) return varchar2 is
First_word_hold varchar2(100);
str_hold varchar2(4000);
end_of_word_loc number;
begin
str_hold := translate(str,' ,.!?;','^^^^^^');
end_of_word_loc := instr(str_hold,'^');
first_word_hold := substr(str_hold,1,end_of_word_loc-1);
return first_word_hold;
end;
/
Code Test:
col a heading "First|Word" format a10
col b heading "Entire|Comment" format a30
select first_word(comments) a, comments b from participants
where comments is not null;
First Entire
Word Comment
---------- ---------------------
Avail Avail 2/13,20,27 only
Couple Couple if poss.
Not Not Tu a.m.
Recommend Recommend Desk
Also Also Sat 1,2
Prefer Prefer couple
Prefer Prefer couple