<?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: Re: Insert CSV file to Postgres from qlikview. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526756#M196855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have any experience with Postgres so I cannot write the .cmd file for you. Usually you will have to call a SQL command line client and pass it a SQL query source file. The only thing that source file has to contain is some sort of SQL IMPORT statement that opens an external file and drops its contents in a specific table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you store that command in a .cmd (batch) file, you have to choose how to call this command file. If you want to write to the DB at the end of your load script, then add a statement like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;EXECUTE 'C:\CmdFiles\ImportIntoPostgress.cmd';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at the end of your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if you want to execute the import from the QlikView user interface, add a button to your sheet, open Button-&amp;gt;Properties-&amp;gt;Actions, click the Add button, on the left select External, then on the right select Launch and click OK. A new action layout appears. Click the Browse button at the top right, navigate to your .cmd file and click OK. Then click Apply or OK and the action will be attached to your button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's about it, I think&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Oct 2013 11:58:00 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2013-10-25T11:58:00Z</dc:date>
    <item>
      <title>Insert CSV file to Postgres from qlikview.</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526753#M196852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have scenario where in my qlikview report is generating csv file and i have to insert those csv file into Postgres database.&lt;/P&gt;&lt;P&gt;In sort i have to wtite back to database.&lt;/P&gt;&lt;P&gt;any help would be appreciated.&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 11:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526753#M196852</guid>
      <dc:creator />
      <dc:date>2013-10-25T11:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Insert CSV file to Postgres from qlikview.</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526754#M196853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since everything is external to your document, you can write a .cmd file that performs a Postgres Import from that particular csv, and launch it&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;from your load script by using the EXECUTE statement&lt;/LI&gt;&lt;LI&gt;from your UI by creating a button and attaching an External-&amp;gt;Launch action type&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 11:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526754#M196853</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2013-10-25T11:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Insert CSV file to Postgres from qlikview.</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526755#M196854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks peter..could u pls help me with nay ex. or demo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 11:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526755#M196854</guid>
      <dc:creator />
      <dc:date>2013-10-25T11:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Insert CSV file to Postgres from qlikview.</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526756#M196855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have any experience with Postgres so I cannot write the .cmd file for you. Usually you will have to call a SQL command line client and pass it a SQL query source file. The only thing that source file has to contain is some sort of SQL IMPORT statement that opens an external file and drops its contents in a specific table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you store that command in a .cmd (batch) file, you have to choose how to call this command file. If you want to write to the DB at the end of your load script, then add a statement like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;EXECUTE 'C:\CmdFiles\ImportIntoPostgress.cmd';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at the end of your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, if you want to execute the import from the QlikView user interface, add a button to your sheet, open Button-&amp;gt;Properties-&amp;gt;Actions, click the Add button, on the left select External, then on the right select Launch and click OK. A new action layout appears. Click the Browse button at the top right, navigate to your .cmd file and click OK. Then click Apply or OK and the action will be attached to your button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's about it, I think&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 11:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526756#M196855</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2013-10-25T11:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Insert CSV file to Postgres from qlikview.</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526757#M196856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello All,&lt;/P&gt;&lt;P&gt;still not got the solution for aboce problem.&lt;/P&gt;&lt;P&gt;I have a CSV file whcih i have to insert in postgres table.I raed somewhere we can use 'COPY"&lt;/P&gt;&lt;P&gt; (COPY postgres_table FROM 'wheat_crop_data.csv' DELIMITER ';' CSV&lt;BR /&gt;HEADER ) command in postgres for importing CSV file directly into it.&lt;/P&gt;&lt;P&gt;BUT How can i do this using batch file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 12:55:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526757#M196856</guid>
      <dc:creator />
      <dc:date>2013-10-28T12:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Insert CSV file to Postgres from qlikview.</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526758#M196857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a command line tool called &lt;EM&gt;psql&lt;/EM&gt; that allows you to execute single SQL statements on a remote Postgres database. For details about the command line syntax, see &lt;EM&gt;http: //www.postgresql.org/docs/9.3/static/app-psql.html&lt;/EM&gt; (remove the space before the slashes). For example, to execute a single copy-from-csv as specified in your question, do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;[&lt;EM&gt;Path-to-psql&lt;/EM&gt;]\psql.exe -c " COPY postgres_table FROM 'wheat_crop_data.csv' DELIMITER ',' FORMAT CSV HEADER"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put this statement in a .cmd file and execute it from within QlikView.&lt;/P&gt;&lt;P&gt;Of course, you'll have to add parameters to specify database name, username, password and the likes. You'll find all the details in the documention by using the above URL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 13:32:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-CSV-file-to-Postgres-from-qlikview/m-p/526758#M196857</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2013-10-28T13:32:48Z</dc:date>
    </item>
  </channel>
</rss>

