<?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: passing variable to sql loader files in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168985#M90847</link>
    <description>hi Gyan,&lt;BR /&gt;&lt;BR /&gt;The SQLLDR control file  is just a static flat file, you cannot really pass a parameter to that file. Especially when the latter is used by the SQLLDR tool.&lt;BR /&gt;&lt;BR /&gt;You can try to generate the SQLLDR file on-the-fly based on variables input to custom generator script.&lt;BR /&gt;&lt;BR /&gt;If you have anything specific, we can post it here so that we can further assist you.&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
    <pubDate>Thu, 27 Mar 2008 09:50:17 GMT</pubDate>
    <dc:creator>Yogeeraj_1</dc:creator>
    <dc:date>2008-03-27T09:50:17Z</dc:date>
    <item>
      <title>passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168983#M90845</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I would like to know if we can pass a variable from a shell script to an sql loader control file.&lt;BR /&gt;&lt;BR /&gt;I know we can pass a variable to an sql file from unix shell but not sure if this is possible in sql loaders&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gyan</description>
      <pubDate>Thu, 27 Mar 2008 09:39:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168983#M90845</guid>
      <dc:creator>Gyankr</dc:creator>
      <dc:date>2008-03-27T09:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168984#M90846</link>
      <description>If the SQL loader will accept stdin then you can do it a couple of ways:&lt;BR /&gt; &lt;BR /&gt;echo "some_cmd $VAR1 $VAR2" | sql_loader&lt;BR /&gt; &lt;BR /&gt;or from a here document:&lt;BR /&gt; &lt;BR /&gt;cat &amp;lt;&amp;lt; EOF&lt;BR /&gt;some_cmd $VAR1 $VAR2&lt;BR /&gt;EOF&lt;BR /&gt; &lt;BR /&gt;The here document is easier to use for multiple lines for the loader.</description>
      <pubDate>Thu, 27 Mar 2008 09:46:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168984#M90846</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2008-03-27T09:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168985#M90847</link>
      <description>hi Gyan,&lt;BR /&gt;&lt;BR /&gt;The SQLLDR control file  is just a static flat file, you cannot really pass a parameter to that file. Especially when the latter is used by the SQLLDR tool.&lt;BR /&gt;&lt;BR /&gt;You can try to generate the SQLLDR file on-the-fly based on variables input to custom generator script.&lt;BR /&gt;&lt;BR /&gt;If you have anything specific, we can post it here so that we can further assist you.&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Thu, 27 Mar 2008 09:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168985#M90847</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-03-27T09:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168986#M90848</link>
      <description>unix scripts sends a variable (say region),&lt;BR /&gt;and in the control file we need use it like this&lt;BR /&gt;&lt;BR /&gt;delete from table where exists (select 1 from table where region_code='$region')&lt;BR /&gt;&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gyan&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Mar 2008 10:07:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168986#M90848</guid>
      <dc:creator>Gyankr</dc:creator>
      <dc:date>2008-03-27T10:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168987#M90849</link>
      <description>&lt;!--!*#--&gt;hi gyan,&lt;BR /&gt;&lt;BR /&gt;This is a bit confusing. Normally, a SQLLDR control file looks as follows:&lt;BR /&gt;&lt;BR /&gt;LOAD DATA&lt;BR /&gt;DISCARDMAX  999&lt;BR /&gt;APPEND&lt;BR /&gt;INTO TABLE MYTAB130&lt;BR /&gt;(&lt;BR /&gt;LDRDATE         "sysdate",&lt;BR /&gt;REGION          CONSTANT 'PHX',&lt;BR /&gt;STATION         "1",&lt;BR /&gt;WRKLINE        position(1:80) char(80) "rtrim(:WRKLINE)"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Will it be possible to post a complete file?&lt;BR /&gt;&lt;BR /&gt;revert!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Mar 2008 10:40:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168987#M90849</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-03-27T10:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168988#M90850</link>
      <description>hi yogeeraj,&lt;BR /&gt;&lt;BR /&gt;if i see your the above code,it is mentioned like&lt;BR /&gt;APPEND&lt;BR /&gt;INTO TABLE MYTAB130&lt;BR /&gt;&lt;BR /&gt;instead of appending in the table MYTAB130,we  need to delete records like&lt;BR /&gt;&lt;BR /&gt;delete from MYTAB130 where exists (select 1 from someother table where region='$region') and the rest would continue.&lt;BR /&gt;(&lt;BR /&gt;LDRDATE         "sysdate",&lt;BR /&gt;REGION          CONSTANT 'PHX',&lt;BR /&gt;STATION         "1",&lt;BR /&gt;WRKLINE        position(1:80) char(80) "rtrim(:WRKLINE)"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;I am yet to write such a file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;gyan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Mar 2008 11:17:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168988#M90850</guid>
      <dc:creator>Gyankr</dc:creator>
      <dc:date>2008-03-27T11:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to sql loader files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168989#M90851</link>
      <description>Hi Gyan,&lt;BR /&gt;&lt;BR /&gt;Unfortunately, SQLLDR has a rather restrictive syntax. The possible operations on the underlying table are only: INSERT, APPEND, REPLACE, TRUNCATE.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You may wish to have a look at the High-Level Syntax Diagrams concerning SQLLDR which are found at:&lt;BR /&gt;&lt;A href="http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#1261" target="_blank"&gt;http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#1261&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Can you please describe what you are trying to achieve?&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Mar 2008 11:42:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/passing-variable-to-sql-loader-files/m-p/4168989#M90851</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-03-27T11:42:41Z</dc:date>
    </item>
  </channel>
</rss>

