<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Store DB value in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998688#M718573</link>
    <description>Prabhu,&lt;BR /&gt;  The shell script understand its own environment. The sql file you create can be understood and executed only by database clients which is a different process altogether.  &lt;BR /&gt;&lt;BR /&gt;  You can do, provided the sqlplus shoud write to stdout and you can grep/cut/awk that output to get the exact value in the local_var like previously mentioned.  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
    <pubDate>Mon, 16 Jun 2003 16:54:28 GMT</pubDate>
    <dc:creator>Umapathy S</dc:creator>
    <dc:date>2003-06-16T16:54:28Z</dc:date>
    <item>
      <title>Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998684#M718569</link>
      <description>i'm doing lot of process in my shell script and &lt;BR /&gt;in middle of my script, i need to check value of a &lt;BR /&gt;column in database table and depends on the value i need to&lt;BR /&gt;proceed with my shell script process....&lt;BR /&gt;&lt;BR /&gt;for eg...&lt;BR /&gt;&lt;BR /&gt;Myshell.sh&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;..&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Sqlplus .... check.sql   (helps to fetch value from database and store it in Local_Var)&lt;BR /&gt;&lt;BR /&gt;If  Local_Var = 'A'&lt;BR /&gt;  Do 'Task A'&lt;BR /&gt;Elsif Local_Var = 'B'&lt;BR /&gt;  Do 'Task B'&lt;BR /&gt;fi.&lt;BR /&gt;&lt;BR /&gt;******* How to store database column value in Local_Var ?</description>
      <pubDate>Mon, 16 Jun 2003 16:07:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998684#M718569</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-16T16:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998685#M718570</link>
      <description>You can try this&lt;BR /&gt;&lt;BR /&gt;Local_Var=`sqlplus .... check.sql`&lt;BR /&gt;&lt;BR /&gt;Note that the quotes are back-quotes.&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Mon, 16 Jun 2003 16:14:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998685#M718570</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2003-06-16T16:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998686#M718571</link>
      <description>Prabhu,&lt;BR /&gt;  You can also store/write/redirect the value in a temp file and access the value from there in your shell script.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jun 2003 16:20:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998686#M718571</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-06-16T16:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998687#M718572</link>
      <description>I know to store it in temp file and access from there....is there no way to store directly into a variable ???</description>
      <pubDate>Mon, 16 Jun 2003 16:32:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998687#M718572</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-16T16:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998688#M718573</link>
      <description>Prabhu,&lt;BR /&gt;  The shell script understand its own environment. The sql file you create can be understood and executed only by database clients which is a different process altogether.  &lt;BR /&gt;&lt;BR /&gt;  You can do, provided the sqlplus shoud write to stdout and you can grep/cut/awk that output to get the exact value in the local_var like previously mentioned.  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
      <pubDate>Mon, 16 Jun 2003 16:54:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998688#M718573</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-06-16T16:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998689#M718574</link>
      <description>Do you have a sample code to do the same ?</description>
      <pubDate>Tue, 17 Jun 2003 14:56:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998689#M718574</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-06-17T14:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Store DB value</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998690#M718575</link>
      <description>Prabhu,&lt;BR /&gt;&lt;BR /&gt;   I dont work in Oracle.  But I work in Informix.  Follwing is a sql file which selects a value from a table.&lt;BR /&gt;&lt;BR /&gt;$ cat mytemp.sql&lt;BR /&gt;select field1 from table_a where field2=1111;&lt;BR /&gt;&lt;BR /&gt;  Here is the part of shell script which actually does the job.&lt;BR /&gt;&lt;BR /&gt;$ mytemp.sh&lt;BR /&gt;local_var=`dbaccess db1 mytemp.sql`&lt;BR /&gt;next_var=`echo $local_var|awk '{ print $2 }'`&lt;BR /&gt;echo "here from the shell" $next_var&lt;BR /&gt;&lt;BR /&gt;where dbaccess is the equivalent of sqlplus.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Jun 2003 15:08:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/store-db-value/m-p/2998690#M718575</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-06-17T15:08:36Z</dc:date>
    </item>
  </channel>
</rss>

