<?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: duplicate records in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950799#M969672</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;&lt;/P&gt;&lt;P&gt;i fell asleep !!&lt;/P&gt;&lt;P&gt;Jonathan the field &lt;SPAN style="font-size: 13.3333px;"&gt;signup_status_id is included in the Select but i removed a whole lot of field (accidently including that one) not to load too much into the screenshot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sasi,&amp;nbsp; I tried what you have selected with no luck.&amp;nbsp; i dont quite understand the first section though.&amp;nbsp; Shouldn't there be a load for the first part?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Sep 2015 23:14:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-28T23:14:47Z</dc:date>
    <item>
      <title>duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950791#M969660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting duplicate records for "&lt;SPAN style="font-family: Times;"&gt;&lt;SPAN style="color: #800000;"&gt;SUP#&lt;/SPAN&gt;,&lt;/SPAN&gt;"due to the join between TrainingContracts and ReturnContractTraining Contracts tables.&amp;nbsp; The "TrainingContractReturn" table only has one field that I can use to link to, so I need to find another way to remove duplicates other than with joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the Distinct (Group) functionality (as shown below but QlikView doesn't seem to like aliases anywhere in the select statement.&amp;nbsp; i.e. SQL didn't seem to mind when I was testing.&amp;nbsp;&amp;nbsp; How else can i handle this issue in QlikView? Any suggestions appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-AU"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial black,avant garde;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;Facts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #800000;"&gt;FieldOfficeID&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;%ConsultantKey&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #800000;"&gt;bdl_referred_by_id&lt;/SPAN&gt;,&lt;SPAN style="color: #008000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; 1 &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUP#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;isnull&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[bdl_referred_by_id]&lt;/SPAN&gt;), 0, 1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPBDLLead#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[BDL Referred By]&lt;/SPAN&gt;='Not BDL Lead',1,0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPNotBDLLead#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;signup_status_id&lt;/SPAN&gt;=5,1,0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPComplete#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial black,avant garde;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;isnull&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;),0, 1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPReturn#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;,1,0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AtFaultReturn#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;,0,1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;NotAtFaultReturn#&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;SQL&lt;/STRONG&gt; SELECT distinct (tc.id),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.id as "FieldOfficeID",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.team_id as "ConsultantTeam",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.first_name ||' '|| FieldOfficer.surname as "FieldOfficer",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; AccountManager.first_name ||' '|| AccountManager.surname as "Account Manager",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.first_name ||' '|| BDLRefferedBy.surname as "BDL Referred By",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.bdl_referred_by_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; last_kpi_action_date as "Status Date of change",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; employer_id as "Employer ID",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.id as BDLRefByID,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.id as TrainContractId,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.received_at ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.account_manager_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; at_fault,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; from training_contracts tc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join signup_statuses ss on tc.signup_status_id = ss.id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join users FieldOfficer on FieldOfficer.id = tc.field_officer_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; Left join users AccountManager on AccountManager.id = tc.account_manager_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join users BDLRefferedBy on BDLRefferedBy.id = tc.bdl_referred_by_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join training_contract_returns tcr on tc.id = tcr.training_contract_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; group by tc.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.team_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.first_name ||' '|| FieldOfficer.surname ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; AccountManager.first_name ||' '|| AccountManager.surname,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.first_name ||' '|| BDLRefferedBy.surname ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.bdl_referred_by_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.finalised_on ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.approved_on ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.file_no,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.employee_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; at_fault,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.role&lt;/SPAN&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 12:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950791#M969660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-28T12:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950792#M969663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Everything after SQL is executed by the DB server, not by Qlikview, so this is more of a SQL question than a QV question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I am trying to use the Distinct (Group) functionality (as shown below but QlikView doesn't seem to like aliases anywhere in the select statement.&amp;nbsp; i.e. SQL didn't seem to mind when I was testing&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV does not care about anything after the SQL statement and it is not executed by QV, so it cannot 'dislike' aliases in the SELECT statement. You might want to clarify this statement a little. The only parsing of the SELECT is to find the end of the statement to know what to send to the OLEDB/ODBC connection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 13:03:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950792#M969663</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-28T13:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950793#M969666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;SELECT distinct (tc.id),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What purpose do you expect the parenthesis to do here? AFAIK the DISTINCT applies to he entire row, not to a specific field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;If(signup_status_id=5,1,0) as SUPComplete#,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field &lt;SPAN style="font-size: 13.3333px;"&gt;signup_status_id is not included in the Select, so it is not included in the recordset and the LOAD statement will fail.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 13:12:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950793#M969666</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-28T13:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950794#M969667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As &lt;A href="https://community.qlik.com/qlik-users/13229"&gt;jontydkpi&lt;/A&gt;‌ mentioned anything after the SQL SELECT is completely the SQL DB query and not related to Qlikview.&lt;/P&gt;&lt;P&gt;From the LOAD till SQL SELECT its completely belongs to Qlikview scripting and Qlikview function can be used here not in select statement.&lt;/P&gt;&lt;P&gt;Please check your SQL query once and let us know if you face any issues&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 13:22:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950794#M969667</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-09-28T13:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950795#M969668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I think Its not the aliases that are your problem but lacking the use of aggregation functions like count,sum etc in your sql query. You are grouping the results but not telling the DB what aggregation it must perform on the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hth&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 14:17:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950795#M969668</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-28T14:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950796#M969669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's not usually a&amp;nbsp; requirement. A SQL group by without an aggregation (must be on all fields in the select), is an alias for SELECT Distinct ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 14:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950796#M969669</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-28T14:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950797#M969670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;Thank you for pointing it out, point taken.&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 18:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950797#M969670</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-28T18:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950798#M969671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be try a resident load and see if it helps?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial black,avant garde;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;STRONG style="color: #0000ff;"&gt;SQL&lt;/STRONG&gt; SELECT distinct (tc.id),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.id as "FieldOfficeID",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.team_id as "ConsultantTeam",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.first_name ||' '|| FieldOfficer.surname as "FieldOfficer",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; AccountManager.first_name ||' '|| AccountManager.surname as "Account Manager",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.first_name ||' '|| BDLRefferedBy.surname as "BDL Referred By",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.bdl_referred_by_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; last_kpi_action_date as "Status Date of change",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; employer_id as "Employer ID",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.id as BDLRefByID,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.id as TrainContractId,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.received_at ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.account_manager_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; at_fault,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; from training_contracts tc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join signup_statuses ss on tc.signup_status_id = ss.id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join users FieldOfficer on FieldOfficer.id = tc.field_officer_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; Left join users AccountManager on AccountManager.id = tc.account_manager_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join users BDLRefferedBy on BDLRefferedBy.id = tc.bdl_referred_by_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; left join training_contract_returns tcr on tc.id = tcr.training_contract_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; group by tc.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.team_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.first_name ||' '|| FieldOfficer.surname ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; AccountManager.first_name ||' '|| AccountManager.surname,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.first_name ||' '|| BDLRefferedBy.surname ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.bdl_referred_by_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; BDLRefferedBy.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.finalised_on ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.approved_on ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.file_no,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; tc.employee_id,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; at_fault,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; FieldOfficer.role&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: arial black,avant garde;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;Facts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;noconcatenate&lt;/SPAN&gt; &lt;STRONG style="color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #800000;"&gt;FieldOfficeID&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;%ConsultantKey&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #800000;"&gt;bdl_referred_by_id&lt;/SPAN&gt;,&lt;SPAN style="color: #008000;"&gt;&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; 1 &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUP#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;isnull&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[bdl_referred_by_id]&lt;/SPAN&gt;), 0, 1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPBDLLead#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[BDL Referred By]&lt;/SPAN&gt;='Not BDL Lead',1,0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPNotBDLLead#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;signup_status_id&lt;/SPAN&gt;=5,1,0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPComplete#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: arial black,avant garde;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;isnull&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;),0, 1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;SUPReturn#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;,1,0) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AtFaultReturn#&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;at_fault&lt;/SPAN&gt;,0,1) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;NotAtFaultReturn#&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;resident Temp ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;drop table Temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;hth&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;Sasi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,times;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 18:21:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950798#M969671</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-28T18:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950799#M969672</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;&lt;/P&gt;&lt;P&gt;i fell asleep !!&lt;/P&gt;&lt;P&gt;Jonathan the field &lt;SPAN style="font-size: 13.3333px;"&gt;signup_status_id is included in the Select but i removed a whole lot of field (accidently including that one) not to load too much into the screenshot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sasi,&amp;nbsp; I tried what you have selected with no luck.&amp;nbsp; i dont quite understand the first section though.&amp;nbsp; Shouldn't there be a load for the first part?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 23:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950799#M969672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-28T23:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records</title>
      <link>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950800#M969673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree with Jonathan in that it may not be enough to have [signup_status_id] be a part of the SQL join syntax, it must be returned as a result column in the SQL statement for it to be passed along to the QV preceding load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the distinction issues, this could be because the SQL statement "intends" to return a 15-field result set, but is only passing on 5 of those fields to QlikView.&amp;nbsp; If you drop 10 columns from a 15-column table, a lot of distinction might be lost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="100286" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100286_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe throw a RecNo() as RECORD_ID to force QlikView side distinction.&amp;nbsp; Test the rowcount on the SQL by itself, then attach the QlikView preceding load and verify before/after rowcounts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 03:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicate-records/m-p/950800#M969673</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2015-09-29T03:47:03Z</dc:date>
    </item>
  </channel>
</rss>

