| Insert into oracle table of unix script values. [message #573219] |
Mon, 24 December 2012 05:32  |
|
|
Hi All,
I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table.
Eg: insert into tbl_daily_status values(STAT,ENDTIME);
Please help me on this.
#!/bin/ksh
joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det"
for i in $joblist
do
STAT=`./JobStatus.pl -i NP1 -z Z8PIMBN -p $i|awk '{print $6}'`
ENDTIME=`./JobStatus.pl -i NP1 -z Z8PIMBN -p $i|awk '{print $4" " $5}'`
echo "$STAT"
echo "$ENDTIME"
done
|
|
|
|
| Re: Insert into oracle table of unix script values. [message #573221 is a reply to message #573219] |
Mon, 24 December 2012 06:26   |
 |
Michel Cadot
Messages: 54155 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
From one of your previous topics:
Michel Cadot wrote on Sat, 18 August 2012 11:33With any SQL question, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
...
In addition, FEEDBACK to those that help you, we are still waiting for you in your previous topics.
Me, I can no more help you if I never have feedback telling if the time I spent for you was useful or just a waste of time.
In the end, how is this a SQL question?
Regards
Michel
[Updated on: Mon, 24 December 2012 06:27] Report message to a moderator
|
|
|
|
|
|