3 Replies Latest reply: May 29, 2014 4:19 PM by Prem Kumar Thangallapally RSS

    Can someone please help?

      I have the following script which joins a couple of tables by UniqueKey, what I now want to do is create an additional field based on the newly created table. I can get it to work but the data is growing when I don't believe is should be, can anyone suggest what I'm doing wrong...or maybe a better way of doing it?

       

      AWDCombined:

      LOAD UniqueKey,

           SchemeNo

      FROM [Combined.qvd]

       

      Left Join (AWDCombined)

      LOAD UniqueKey,

           NGSSchemeNo;

      SQL SELECT *

      FROM FPWFI;

       

      Left Join (AWDCombined)

      LOAD UniqueKey,

           if(Len(SchemeNo)>6,NGSSchemeNo,SchemeNo) as RealSchemeNo

      Resident AWDCombined;

       

      Like I say, the above does work, it just seems to cause the underlying data to grow and I don't know why.