I am reading data from the database and writing to temporary file in the below format.
1=XP|external_component|com.adp.meetingalertemail.processing.MeetingAlertEmail|EMAILALERTPUSH|32|4#XP|classpath|/usr/home/dfusr/lib/xalan.jar:
/usr/home/dfusr/lib/xerces.jar:
/usr/home/dfusr/lib/xml.jar:
/usr/home/dfusr/lib/classes12.zip
The data is writing in multiple rows as i want to write the same in one row for the same sequnce number. 1 in the above example
Find below the code i am retrieving from the database and writing to myJobTaskAttribListFile.
sqlplus -s $DBCredentials 1> $myJobTaskAttribListFile <<-EndOFSQL
SET DEFINE OFF;
SET SERVEROUT ON
SET LINESIZE 3400;
DECLARE
i_job_id NUMBER := $myJobId ;
o_run_status_id NUMBER := 0 ;
i_end_time VARCHAR2(1000) ;
i_total_errors NUMBER := 0 ;
i_total_warnings VARCHAR2(1000) ;
i_total_inserted NUMBER := 0 ;
i_total_updated NUMBER := 0 ;
i_total_rejected NUMBER := 0 ;
i_log_file VARCHAR2(1000) ;
i_job_run_message VARCHAR2(512) ;
i_modlast_by VARCHAR2(1000) ;
o_sqlcode NUMBER := 0 ;
o_sqlmsg VARCHAR2(1000) ;
BEGIN
$myUSPLoadJobTaskAttribs
(
i_job_id,
o_run_status_id,
o_sqlcode,
o_sqlmsg
);
END;
/
EndOFSQL
Please advice how can i write the same in one row for each sequnce number.