Cuenta palabras

DECLARE nombre varchar2(19):='Antony Vazquez Yung'; suma NUMBER:=0; my_tablen BINARY_INTEGER; my_tab DBMS_UTILITY.uncl_array; my_list VARCHAR2(50) := REPLACE(nombre,' ',','); BEGIN dbms_output.put_line(nombre); DBMS_UTILITY.comma_to_table( list => my_list, tablen => my_tablen, tab => my_tab ); dbms_output.put_line('Cant. de palabras: '||my_tablen); for i in 1..my_tablen loop dbms_output.put_line(my_tab(i)||':'||length(my_tab(i))); suma := suma + length(my_tab(i)); end loop; dbms_output.put_line('Cant. letras: '||suma); END; /
Antony Vazquez Yung
Cant. de palabras: 3
Antony : 6
Vazquez : 7
Yung : 4
Cant. letras : 17

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.