<?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 Upload table without loop from QlikView to SQL Server in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-table-without-loop-from-QlikView-to-SQL-Server/m-p/1240812#M6628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works to read from one table in a SQL Server instance into a table called BAC in QV. Next it writes a couple of the imported fields to a different table line by line. But it's really slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My attempt (below the working code) to write it all at once errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any suggestions for the correct syntax to upload the whole table at once?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***working code***&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='M/D/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';&lt;/P&gt;&lt;P&gt;SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';&lt;/P&gt;&lt;P&gt;SET FirstWeekDay=6;&lt;/P&gt;&lt;P&gt;SET BrokenWeeks=1;&lt;/P&gt;&lt;P&gt;SET ReferenceDay=0;&lt;/P&gt;&lt;P&gt;SET FirstMonthOfYear=1;&lt;/P&gt;&lt;P&gt;SET CollationLocale='en-US';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO &amp;lt;stuff deleted&amp;gt; ... Application Intent=READWRITE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM dbo.BAC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET Nrecord = NoOfRows('BAC'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql truncate table dbo.BACTest;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 1 to Nrecord&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET PC = FieldValue('PC',i);&lt;/P&gt;&lt;P&gt;LET Zip = FieldValue('Physical postal code',i);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sql insert into dbo.BACTest ([Profit Center Name],[Physical postal code]) values('$(PC)','$(Zip)');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***not working code***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql insert into dbo.BACTest ([Profit Center Name],[Physical postal code]) SELECT FieldValue('PC'),FieldValue('Physical postal code') FROM BAC;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jan 2017 15:05:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-01-26T15:05:54Z</dc:date>
    <item>
      <title>Upload table without loop from QlikView to SQL Server</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-table-without-loop-from-QlikView-to-SQL-Server/m-p/1240812#M6628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works to read from one table in a SQL Server instance into a table called BAC in QV. Next it writes a couple of the imported fields to a different table line by line. But it's really slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My attempt (below the working code) to write it all at once errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any suggestions for the correct syntax to upload the whole table at once?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***working code***&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='M/D/YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';&lt;/P&gt;&lt;P&gt;SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';&lt;/P&gt;&lt;P&gt;SET FirstWeekDay=6;&lt;/P&gt;&lt;P&gt;SET BrokenWeeks=1;&lt;/P&gt;&lt;P&gt;SET ReferenceDay=0;&lt;/P&gt;&lt;P&gt;SET FirstMonthOfYear=1;&lt;/P&gt;&lt;P&gt;SET CollationLocale='en-US';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO &amp;lt;stuff deleted&amp;gt; ... Application Intent=READWRITE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM dbo.BAC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET Nrecord = NoOfRows('BAC'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql truncate table dbo.BACTest;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 1 to Nrecord&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET PC = FieldValue('PC',i);&lt;/P&gt;&lt;P&gt;LET Zip = FieldValue('Physical postal code',i);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sql insert into dbo.BACTest ([Profit Center Name],[Physical postal code]) values('$(PC)','$(Zip)');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***not working code***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql insert into dbo.BACTest ([Profit Center Name],[Physical postal code]) SELECT FieldValue('PC'),FieldValue('Physical postal code') FROM BAC;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2017 15:05:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-table-without-loop-from-QlikView-to-SQL-Server/m-p/1240812#M6628</guid>
      <dc:creator />
      <dc:date>2017-01-26T15:05:54Z</dc:date>
    </item>
  </channel>
</rss>

