Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I'm a little bit of blurry on the JOIN part. Say I have two table as pictured below:
The table Calendar contains the FiscalYear, FiscalMonth and Days.
Table Revenue might not have all of the revenue of a particular Fiscal Year and FiscalMonth.
To which table must a table join and what type of join must I use to derive the table Revenue1?
Thank you for your kind attention guys. Appreciate any suggestions/opinions and advices on this one. Thanks guys
Calendar:
LOAD * Inline [
FiscalYear,FiscalMonth,Days
2014,Jan,xx
2014,Feb,xx
2014,Mar,xx
2014,Apr,xx
2014,May,xx ];
Left Join(Calendar)
Revenue:
LOAD * Inline [
Country,FiscalYear,FiscalMonth,Amount
A1AUS,2014,Jan,yy
A1AUS,2014,Feb,yy
A1AUS,2014,Apr,yy ];
NoConcatenate
Calendar_Final:
Load FiscalYear,FiscalMonth,Days,Amount,If( IsNull(Country),Previous(Country),Country) Resident Calendar;
Drop table Calendar;
Calendar:
Load * From Calendar;
Left Join(Calendar)
Load * From Revenue;
NoConcatenate
Calendar_Final:
Load *,If( IsNull(Country),Previous(Country),Country) Resident Calendar;
Drop table Calendar;
Calendar:
LOAD * Inline [
FiscalYear,FiscalMonth,Days
2014,Jan,xx
2014,Feb,xx
2014,Mar,xx
2014,Apr,xx
2014,May,xx ];
Left Join(Calendar)
Revenue:
LOAD * Inline [
Country,FiscalYear,FiscalMonth,Amount
A1AUS,2014,Jan,yy
A1AUS,2014,Feb,yy
A1AUS,2014,Apr,yy ];
NoConcatenate
Calendar_Final:
Load FiscalYear,FiscalMonth,Days,Amount,If( IsNull(Country),Previous(Country),Country) Resident Calendar;
Drop table Calendar;
Hi Anbu,
Thank you for your reply. Really appreciate it Have a nice day!