Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have been stuck on this homework problem for sometime now. I am asked to read

ID: 3621326 • Letter: I

Question

I have been stuck on this homework problem for sometime now. I am asked to read in some information stored in a database table. Then print out the players name from the table in sorted order using a buble sort algorithm.

This is what i have so far

create or replace
PROCEDURE TEAM_TABLE_SORT AS

TYPE player_Name_type IS TABLE OF databasename.team.player%type
INDEX BY PLS_INTEGER ;
player_name player_Name_type;
i integer := 1;
temp integer;
begin
for player_names in (select * from marshall.team )
LOOP
player_name(i) := player_names.player ;
dbms_output.put_line(i|| ' - ' ||chr(9) || player_name(i) ) ;
i := i + 1 ;
END LOOP;


All this does is printout the information!!! Any ideas on how to sort the names using bubble sort

Explanation / Answer

Dear.... DECLARE TYPE player_Name_type IS TABLE OF ( codASCII VARCHAR2(3), databasename.team.player%type INDEX BY PLS_INTEGER ;); TYpe tip_vector2 IS TABLE OF player_Name; VECTOR2 TIP_VECTOR2 := TIP_VECTOR2(); aux player_Name_type; FLAG BOOLEAN := TRUE; begin WHILE(FLAG) LOOP FLAG := FALSE; FOR I IN 1..(vector2.count-1) LOOP IF VECTOR2(I). player_Name_type
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote