<?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 Problem with Exists() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151041#M28962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;FinTrans:&lt;BR /&gt;LOAD Account AS SysCode,&lt;BR /&gt; BatchNum,&lt;BR /&gt; Debit - Credit AS Actual$,&lt;BR /&gt; "Line_ID",&lt;BR /&gt; LineMemo,&lt;BR /&gt; Project,&lt;BR /&gt; Ref1 ,&lt;BR /&gt; Ref2,&lt;BR /&gt; 'Actuals' AS Set,&lt;BR /&gt; RefDate AS PostingDate,&lt;BR /&gt; MonthStart(RefDate)AS PeriodLookupDate,&lt;BR /&gt; ShortName,&lt;BR /&gt; Applymap('TransTypeMap',"TransType",'No Trans Type') AS TransType,&lt;BR /&gt; TransId,&lt;BR /&gt; ContraAct&lt;BR /&gt;WHERE EXISTS (Account, SysCode);&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "DHP_SAP".dbo.JDT1&lt;BR /&gt;WHERE ("DHP_SAP".dbo.JDT1.RefDate &amp;gt;= '2009-07-01') AND ("DHP_SAP".dbo.JDT1.TransType &amp;gt; 0);&lt;/P&gt;&lt;P&gt;Reason: EXISTS is not an SQL command so it cannot be specified with the SQL portion in LOAD statement.&lt;/P&gt;&lt;P&gt;By the way, did you try SAP Connector? The new version is pretty nice. Connecting at SQL level is fine, but I have experienced many problems in long run. Just a thought for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2009 07:30:00 GMT</pubDate>
    <dc:creator>disqr_rm</dc:creator>
    <dc:date>2009-08-05T07:30:00Z</dc:date>
    <item>
      <title>Problem with Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151040#M28961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;I'm loading a dimension (GL account) with the following script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PostingAccounts:&lt;BR /&gt;LOAD AcctCode AS &lt;STRONG&gt;SysCode&lt;/STRONG&gt;,&lt;BR /&gt; AcctName,&lt;BR /&gt; FormatCode,&lt;BR /&gt; applymap('Stmt_SectionMap', left("FormatCode",1),'blank section') AS "Fin Stmt Section",&lt;BR /&gt; applymap('StmtMap', left("FormatCode",1),'blank') AS "Fin Stmt",&lt;BR /&gt; "Segment_0" AS GLCode,&lt;BR /&gt; "Segment_1" AS ParkCode,&lt;BR /&gt; "Segment_2" AS StateCode,&lt;BR /&gt; applymap('ParkMap',"Segment_1") As ParkName,&lt;BR /&gt; applymap('StateMap',"Segment_2") As StateName,&lt;BR /&gt; Fathernum AS ParentCode;&lt;BR /&gt;SQL SELECT AcctCode,&lt;BR /&gt; AcctName,&lt;BR /&gt; FormatCode,&lt;BR /&gt; "Segment_0",&lt;BR /&gt; "Segment_1",&lt;BR /&gt; "Segment_2",&lt;BR /&gt; Fathernum&lt;BR /&gt;FROM "DHP_SAP".dbo.OACT WHERE "DHP_SAP".dbo.OACT.Postable = 'Y' AND "DHP_SAP".dbo.OACT.FormatCode &amp;lt; '900' ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I'm then loading GL transactions in the following script, but I only want to load them where the GL account (ie SysCode) already exists.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FinTrans:&lt;BR /&gt;LOAD Account AS SysCode,&lt;BR /&gt; BatchNum,&lt;BR /&gt; Debit - Credit AS Actual$,&lt;BR /&gt; "Line_ID",&lt;BR /&gt; LineMemo,&lt;BR /&gt; Project,&lt;BR /&gt; Ref1 ,&lt;BR /&gt; Ref2,&lt;BR /&gt; 'Actuals' AS Set,&lt;BR /&gt; RefDate AS PostingDate,&lt;BR /&gt; MonthStart(RefDate)AS PeriodLookupDate,&lt;BR /&gt; ShortName,&lt;BR /&gt; Applymap('TransTypeMap',"TransType",'No Trans Type') AS TransType,&lt;BR /&gt; TransId,&lt;BR /&gt; ContraAct;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "DHP_SAP".dbo.JDT1 WHERE &lt;STRONG&gt;Exists(SysCode)&lt;BR /&gt;&lt;/STRONG&gt;AND ("DHP_SAP".dbo.JDT1.RefDate &amp;gt;= '2009-07-01') AND ("DHP_SAP".dbo.JDT1.TransType &amp;gt; 0);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I run the script I get the following error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL Error:[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'SysCode'.&lt;BR /&gt;SQL Scriptline:&lt;BR /&gt;SQL State:37000&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "DHP_SAP".dbo.JDT1 WHERE Exists(SysCode)&lt;BR /&gt;AND ("DHP_SAP".dbo.JDT1.RefDate &amp;gt;= '2009-07-01') AND ("DHP_SAP".dbo.JDT1.TransType &amp;gt; 0)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What am I doing wrong?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Derek&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 06:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151040#M28961</guid>
      <dc:creator />
      <dc:date>2009-08-05T06:55:34Z</dc:date>
    </item>
    <item>
      <title>Problem with Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151041#M28962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;FinTrans:&lt;BR /&gt;LOAD Account AS SysCode,&lt;BR /&gt; BatchNum,&lt;BR /&gt; Debit - Credit AS Actual$,&lt;BR /&gt; "Line_ID",&lt;BR /&gt; LineMemo,&lt;BR /&gt; Project,&lt;BR /&gt; Ref1 ,&lt;BR /&gt; Ref2,&lt;BR /&gt; 'Actuals' AS Set,&lt;BR /&gt; RefDate AS PostingDate,&lt;BR /&gt; MonthStart(RefDate)AS PeriodLookupDate,&lt;BR /&gt; ShortName,&lt;BR /&gt; Applymap('TransTypeMap',"TransType",'No Trans Type') AS TransType,&lt;BR /&gt; TransId,&lt;BR /&gt; ContraAct&lt;BR /&gt;WHERE EXISTS (Account, SysCode);&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM "DHP_SAP".dbo.JDT1&lt;BR /&gt;WHERE ("DHP_SAP".dbo.JDT1.RefDate &amp;gt;= '2009-07-01') AND ("DHP_SAP".dbo.JDT1.TransType &amp;gt; 0);&lt;/P&gt;&lt;P&gt;Reason: EXISTS is not an SQL command so it cannot be specified with the SQL portion in LOAD statement.&lt;/P&gt;&lt;P&gt;By the way, did you try SAP Connector? The new version is pretty nice. Connecting at SQL level is fine, but I have experienced many problems in long run. Just a thought for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 07:30:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151041#M28962</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2009-08-05T07:30:00Z</dc:date>
    </item>
    <item>
      <title>Problem with Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151042#M28963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Derek,&lt;/P&gt;&lt;P&gt;Use Exists(SysCode,&lt;B&gt;Account&lt;/B&gt;) instead of Exists(SysCode) and try.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sridhar Chitikela&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 12:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Exists/m-p/151042#M28963</guid>
      <dc:creator />
      <dc:date>2009-08-05T12:10:21Z</dc:date>
    </item>
  </channel>
</rss>

