Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed help in executing the SQL via shell script and use the result set
    primarykey
    data
    text
    <p>I currently have a request to build a shell script to get some data from the table using SQL (Oracle). The query which I'm running return a number of rows. Is there a way to use something like result set?</p> <p>Currently, I'm re-directing it to a file, but I'm not able to reuse the data again for the further processing.</p> <hr> <p><strong>Edit:</strong> Thanks for the reply Gene. The result file looks like:</p> <pre><code>UNIX_PID 37165 ---------- PARTNER_ID prad -------------------------------------------------------------------------------- XML_FILE -------------------------------------------------------------------------------- /mnt/publish/gbl/backup/pradeep1/27241-20090722/kumarelec2.xml pradeep1 /mnt/soar_publish/gbl/backup/pradeep1/11089-20090723/dataonly.xml UNIX_PID 27654 ---------- PARTNER_ID swam -------------------------------------------------------------------------------- XML_FILE -------------------------------------------------------------------------------- smariswam2 /mnt/publish/gbl/backup/smariswam2/10235-20090929/swam2.xml </code></pre> <p>There are multiple rows like this. My requirement is only to use shell script and write this program.</p> <p>I need to take each of the pid and check if the process is running, which I can take care of.</p> <p>My question is how do I check for each PID so I can loop and get corresponding <code>partner_id</code> and the <code>xml_file</code> name? Since it is a file, how can I get the exact corresponding values? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload