Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

need resident load help

Hi,

I need to load SalesREP ID whose current sales value for the current month is >0, but for last 8 years's sales value will be 0.

So I have written the below code in script:

[TmpSalesRep]:

first 2

load 

[%Sales Trn Key],

[Process Date] as DateKey,

[Sales Amount USD] as SalesAmount,

[Sales Rep ID] as AsOfSalesRepID

resident [TmpTable]

  where

   [Process Month] = 'March' and [Sales Amount USD]>0;

left join

load

[%Sales Trn Key],

[Process Date] as DateKey,

[Sales Amount USD] as SalesAmount,

[Sales Rep ID] as AsOfSalesRepID

resident [TmpTable]

where

  [Process Date] >= '$(vPrevEightYearStartDate)' and

    [Process Date] <= '$(vPrevYearEndDate)' and

    [Sales Amount USD]>=0;

  //$(vCurrentMonth)

drop table [TmpTable];

Please let me know if I am wrong because I am getting wrong data.

10 Replies
Anil_Babu_Samineni

Seems, you are using Left join for resident table only. Unless your expression is okay to me. Can you describe more on Variables?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful