Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
in this code the tab2 table removed to be the code is correct but i want tab2 tables so pls find out the error
tab:
LOAD id,name,sal,date(date(doj,'dd-mm-yyyy')) as doj Inline [
id,name,sal,doj
1,sri,5000,12-12-2010
2,ram,6000,12-12-2011
1,sati,7000,12-12-2012
1,vam,8000,12-12-2013
1,kittu,9000,12-12-2014
];
tab2:
LOAD * Inline [
id,prod,sales
1,a,500
2,b,600
3,c,700
4,d,750
5,a,100
6,b,100];
sort:
LOAD * Resident tab Order By doj;
LET max=Num(Peek('doj',-1,'sort'));
LET min=Num(Peek('doj',0,'sort'));
temp:
LOAD Date($(min)+RecNo()-1) as tempdate
AutoGenerate($(max)-$(min)+1);
cal:
LOAD tempdate as doj,
Year(tempdate) as year,
Month(tempdate) as month,
'Q'&Ceil(Month(tempdate)/3) as qtr
Resident temp;
DROP Tables temp;
Try it will Upper case DD-MM-YYYY
tab:
LOAD id,name,sal,Date(Date#(doj,'DD-MM-YYYY')) as doj Inline [
id,name,sal,doj
1,sri,5000,12-12-2010
2,ram,6000,12-12-2011
1,sati,7000,12-12-2012
1,vam,8000,12-12-2013
1,kittu,9000,12-12-2014
];
Hi Try this
tab:
LOAD id,name,sal,date(date#(doj,'DD-MM-YYYY')) as doj Inline [
id,name,sal,doj
1,sri,5000,12-12-2010
2,ram,6000,12-12-2011
1,sati,7000,12-12-2012
1,vam,8000,12-12-2013
1,kittu,9000,12-12-2014
];
tab2:
LOAD * Inline [
id,prod,sales
1,a,500
2,b,600
3,c,700
4,d,750
5,a,100
6,b,100];
sort:
NoConcatenate
LOAD * Resident tab Order By doj ;
DROP Table tab;
LET max = Floor(Peek('doj',-1,sort));
Let min = Floor(Peek('doj',0,sort));
//
temp:
LOAD Date($(min)+RowNo()-1) as tempdate
AutoGenerate $(max)-$(min)+1;
cal:
LOAD Date(tempdate,'DD-MM-YYYY') as doj,
Year(tempdate) as year,
Month(tempdate) as month,
'Q'&Ceil(Month(tempdate)/3) as qtr
Resident temp;
DROP Tables temp;
Thanks
Mohit
here is the tables are joined ,am try to concatenate between tab & tab2 tables the code will be correctly but why we are using noconcatenate qualifier,