我不知道如何附加值。当我打印出代码时,它将垂直向下打印,并且我希望将其一行打印。
Set serveroutput ON;
Create or replace procedure Service_Report (service_name_par IN varchar2)
As --creates a report and takes in one input
Cursor service_cursor IS Select reservation_id, event_place_id, event_type,
reservation_status, numb_people_attend, event_start_date, event_end_date
from reservation
where service_type_id = service_id;
service_id services.service_type_id%type;
service_info service_cursor%rowtype;
BEGIN
SELECT service_type_id INTO service_id from services
WHERE service_name = service_name_par;
FOR service_info IN service_cursor
LOOP
dbms_output.put_line(service_cursor.reservation_id || ‘ ‘ || service_info.event_place_id || ‘ ‘ || service_info.event_type
|| ‘ ‘ || service_info.reservation_status || ‘ ‘ || service_info.numb_people_attend || ‘ ‘ || service_info.event_start_date
|| ‘ ‘ || service_info.event_end_date);
END LOOP;
Exception
When no_data_found then
dbms_output.put_line(‘No services found.’);
End;