<?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: QlikView SQL string length limit in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295845#M707609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It actually doesn't; well spotted. The join created duplicate columns names - for example, both tables have an id column. I did a quick test with only certain columns and it seems to have worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET lSQLString = 'SELECT W_MobileWeb_Dev.dbo.qmob_phcs.id, W_MobileWeb_Dev.dbo.qmob_values.id as value_id FROM W_MobileWeb_Dev.dbo.qmob_phcs LEFT JOIN W_MobileWeb_Dev.dbo.qmob_values ON W_MobileWeb_Dev.dbo.qmob_values.phcs_id = W_MobileWeb_Dev.dbo.qmob_phcs.id';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL $(lSQLString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. I'll test some sub queries next; hopefully they work as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Mar 2014 07:57:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-06T07:57:24Z</dc:date>
    <item>
      <title>QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295836#M707600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use a loop to build up a SQL string to be sent to SQL server via OLE DB. The loops works fine - when I "capture" the SQL before it gets sent to the database and then paste it into Query Analyzer - it runs and returns results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I limit the loop to generate a SQL string of less then 165,000 (approximate) characters it runs throught in QlikView, but over that the script fails withou error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question then is - is there a limit to the length of an SQL string the QlikView can handle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 07:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295836#M707600</guid>
      <dc:creator>jarno_loubser</dc:creator>
      <dc:date>2011-12-13T07:43:41Z</dc:date>
    </item>
    <item>
      <title>QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295837#M707601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas from anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 05:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295837#M707601</guid>
      <dc:creator>jarno_loubser</dc:creator>
      <dc:date>2012-03-02T05:44:31Z</dc:date>
    </item>
    <item>
      <title>QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295838#M707602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't find any info on this. I suggest you open a ticket to QlikTech team.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 11:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295838#M707602</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-03-02T11:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295839#M707603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of creating the dynamic query in Qlikview, if it is possible try creating this in SQL stored procedure and execute the query in stored procedure.&amp;nbsp; Now use this stored procedure in Qlikview to fetch the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can execute stored procedure using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL EXEC StoredProcedureName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 12:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295839#M707603</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-02T12:36:10Z</dc:date>
    </item>
    <item>
      <title>QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295840#M707604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jagan. This will work, but it will require some rework and make the solution very database specific.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 06:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295840#M707604</guid>
      <dc:creator>jarno_loubser</dc:creator>
      <dc:date>2012-03-12T06:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295841#M707605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jarno,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I unfortunately don't have a solution for you, but I would appreciate it if you could share how you execute a SQL in text format in QlikView. I have the requirement to build up a dynamic SQL string and execute when QlikView loads. It sounds like you're already doing this? Would you mind sharing how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 07:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295841#M707605</guid>
      <dc:creator />
      <dc:date>2014-03-06T07:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295842#M707606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could do it in this way, having the table name in a variable and the SELECT statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vTableName):&lt;/P&gt;&lt;P&gt;SQL $(vSELECT);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 07:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295842#M707606</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-06T07:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295843#M707607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the feedback. I've tested this and it works well, thank you. However, it doesn't seem to work with joins - or I'm missing something. I get an ODBC read failed error. If I run the SQL in SQL Server it runs fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll have to build up some intense SQL. Would there be a way to still execute this via QlikView?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic SQL join example I tried to run:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET lSQLString = 'SELECT * FROM W_MobileWeb_Dev.dbo.qmob_phcs LEFT JOIN W_MobileWeb_Dev.dbo.qmob_values ON W_MobileWeb_Dev.dbo.qmob_values.phcs_id = W_MobileWeb_Dev.dbo.qmob_phcs.id';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL $(lSQLString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 07:26:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295843#M707607</guid>
      <dc:creator />
      <dc:date>2014-03-06T07:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295844#M707608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the statement itself (no in variable) runs in QlikView?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 07:43:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295844#M707608</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-06T07:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295845#M707609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It actually doesn't; well spotted. The join created duplicate columns names - for example, both tables have an id column. I did a quick test with only certain columns and it seems to have worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET lSQLString = 'SELECT W_MobileWeb_Dev.dbo.qmob_phcs.id, W_MobileWeb_Dev.dbo.qmob_values.id as value_id FROM W_MobileWeb_Dev.dbo.qmob_phcs LEFT JOIN W_MobileWeb_Dev.dbo.qmob_values ON W_MobileWeb_Dev.dbo.qmob_values.phcs_id = W_MobileWeb_Dev.dbo.qmob_phcs.id';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL $(lSQLString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. I'll test some sub queries next; hopefully they work as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 07:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295845#M707609</guid>
      <dc:creator />
      <dc:date>2014-03-06T07:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295846#M707610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea, you should always use a column list, not SELECT *.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 08:01:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295846#M707610</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-06T08:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295847#M707611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more question. Any idea how I could do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET lSQLString = 'SELECT &lt;STRONG&gt;REPLACE(REPLACE(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;W_MobileWeb_Dev.dbo.&lt;/SPAN&gt;qmob_values.value_comments,';','-'),':','-')&lt;/STRONG&gt; AS value_comments FROM W_MobileWeb_Dev.dbo.qmob_phcs LEFT JOIN W_MobileWeb_Dev.dbo.qmob_values ON W_MobileWeb_Dev.dbo.qmob_values.phcs_id = W_MobileWeb_Dev.dbo.qmob_phcs.id';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL $(lSQLString);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The quotes in the SQL statement are causing the quotes in QlikView to indicate the string are conflicting.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I've tried adding quotes, but without success.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Any ideas?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 08:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295847#M707611</guid>
      <dc:creator />
      <dc:date>2014-03-06T08:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295848#M707612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should work with doubling the quotes inside the string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET lSQLString = 'SELECT &lt;STRONG&gt;REPLACE(REPLACE(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;W_MobileWeb_Dev.dbo.&lt;/SPAN&gt;qmob_values.value_comments,'';'',''-''),'':'',''-'')&lt;/STRONG&gt; AS ..'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 08:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295848#M707612</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-06T08:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView SQL string length limit</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295849#M707613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent!!! Thank you Ralf, your assistance is MUCH appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2014 08:13:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-SQL-string-length-limit/m-p/295849#M707613</guid>
      <dc:creator />
      <dc:date>2014-03-06T08:13:07Z</dc:date>
    </item>
  </channel>
</rss>

