Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am connected to my database and trying to load master calendar. But while loading i am getting error as "Member Table Not found". Below is the script which i am loading.Is there any mistake in the script
DateTemp:
LOAD min(MakeDate(Year(registrationdate),Month(registrationdate),Day(registrationdate))) as Temp_Date
Resident Member;
LOAD max(MakeDate(Year(registrationdate),Month(registrationdate),Day(registrationdate))) as Temp_Date
Resident Member;
LOAD min(MakeDate(Year(transactiondatetime),Month(transactionDateTime),Day(transactiondatetime)))as Temp_Date
Resident transaction;
LOAD max(MakeDate(Year(transactiondatetime),Month(transactiondatetime),Day(transactiondatetime)))as Temp_Date
Resident transaction;
/*Creating Master calendar */
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
Temp:
Load
min(Temp_Date) as minDate,
max(Temp_Date) as maxDate
Resident DateTemp;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
// DROP Table Temp;
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendarDaily:
Load
Recno()as DataWeekNo,
TempDate as Date,
Date(TempDate-29) as RollStart,
TempDate as RollEnd,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
WeekDay(TempDate)As weekday
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
DROP Table Temp;
Drop table DateTemp;
Please check whether Member table name correct or not ....
Please check this ....
I Cheked it. The Table name is correct.
Please share sample app...
It will better to help you.
here is the complete script. Hope this helps
Load
Clientnumberphonenumber,clientstatus,registrationdate as Date,registrationstorelocation,gender,dateofbirth;
sql select Clientnumberphonenumber,clientstatus,registrationdate,registrationstorelocation,gender,dateofbirth from [dbo].[Member];
load translip,clientnumberphonenumber,storelocation,Date;
sql select translip,clientnumberphonenumber,storelocation,transactiondatetime as Date from dbo.transaction where transactiondatetime>='01-Apr-2014 00:00:00' and transactiondatetime<='30-Apr-2014 23:59:59';
DateTemp:
LOAD min(MakeDate(Year(registrationdate),Month(registrationdate),Day(registrationdate))) as Temp_Date
Resident [Member];
LOAD max(MakeDate(Year(registrationdate),Month(registrationdate),Day(registrationdate))) as Temp_Date
Resident [Member];
LOAD min(MakeDate(Year(transactiondatetime),Month(transactionDateTime),Day(transactiondatetime)))as Temp_Date
Resident [transaction];
LOAD max(MakeDate(Year(transactiondatetime),Month(transactiondatetime),Day(transactiondatetime)))as Temp_Date
Resident [transaction];
/*Creating Master calendar */
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
Temp:
Load
min(Temp_Date) as minDate,
max(Temp_Date) as maxDate
Resident DateTemp;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
// DROP Table Temp;
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendarDaily:
Load
Recno()as DataWeekNo,
TempDate as Date,
Date(TempDate-29) as RollStart,
TempDate as RollEnd,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
WeekDay(TempDate)As weekday
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
DROP Table Temp;
Drop table DateTemp;
Try this,
[Member]:
Load
Clientnumberphonenumber,clientstatus,registrationdate as Date,registrationstorelocation,gender,dateofbirth;
sql select Clientnumberphonenumber,clientstatus,registrationdate,registrationstorelocation,gender,dateofbirth from [dbo].[Member];
[transaction]:
load translip,clientnumberphonenumber,storelocation,Date;
sql select translip,clientnumberphonenumber,storelocation,transactiondatetime as Date from dbo.transaction where transactiondatetime>='01-Apr-2014 00:00:00' and transactiondatetime<='30-Apr-2014 23:59:59';
Great !! It worked out.
Thanks a lot
Please check here you have to replace for registrationdate to Date
LOAD min(MakeDate(Year(Date),Month(Date),Day(Date))) as Temp_Date
Thanks
if you get right answer then please mark right answer and close the thread .
It will helpful for other members.