
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check link below.
Regards,
Kaushik Solanki


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sandip,
instead of left join try to use concatenate.
BR
Martin
