Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error: Table not Found

Hi, I am trying to make a master calendar with time.I have loaded an excel file that includes a field with timestamp  but when I am trying to load the data, it throws error "Table not Found". Do you have any idea where is the problem?
Thank you

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

I repeat = does the email table exists before this script is run?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

16 Replies
avinashelite

can please share the script ??

sushil353
Master II
Master II

Share your script

Not applicable
Author

Dates:

LOAD

  Floor(Min(TimeStamp#(mytable, 'MM/DD/YYYY hh:mm:ss'))) AS MinDate,

  Floor(Max(TimeStamp#(mytable, 'MM/DD/YYYY hh:mm:ss'))) AS MaxDate

RESIDENT emails;

LET vMinDate = FieldValue('MinDate', 1);

LET vMaxDate = FieldValue('MaxDate', 1);

TempCalendar:

LOAD DayStart(TimeStamp($(vMinDate) + (RecNo()/60/60/24) + (IterNo() -1))) AS DateNumber,

    TimeStamp($(vMinDate) + (RecNo()/60/60/24) + (IterNo() -1)) AS TempDate

AYTOGENERATE 86399 WHILE Num($(vMinDate) + IterNo() -1) <= Num($(vMaxDate));

Calendar:

LOAD

TempDate AS mytable,

Hour(TempDate) AS CalenderHour,

Minute(TempDate) AS CalenderMinute,

Date( Floor(TempDate)) AS CalendarDate,

Day(TempDate) AS CalendarDayOfMonth,

Month(TempDate) AS CalendarMonthName,

'Q' & Ceil(Month(TempDate)/3) AS CalendarQuarter,

Year(TempDate) AS CalendarYear,

'Q' & Ceil(Month(TempDate)/3) & '/' & Year(TempDate) AS CalendarQuarterAndYear,

Year(TempDate) & '/' & 'Q' & Ceil(Month(TempDate)/3) AS CalendarYearAndQuarter,

'Wed ' & DayStart(WeekStart(TempDate) + 3) as CalendarWednesdays

RESIDENT TempCalendar ORDER BY TempDate ASC;

DROP TABLE TempCalendar;

DROP Table Dates;

// I found the code by a post here and I made some modifications but I don't understand whythe table can't be found.

avinashelite

can you share the sample data too??

I think you need to check whether the data is in the date format or not otherwise the date function won't work on top of that....

check with the Mindate, Maxdate ?? whether the its on date format or not

jonathandienst
Partner - Champion III
Partner - Champion III

Which line is triggering the error?

Does the email table exist before this script is run?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
puttemans
Specialist
Specialist

Hi,

Is 'aytogenerate' a valid syntax? Possible that the table therefore is not created?

Regards,

Not applicable
Author

In the beggining. I have loaded the excel file with two fields: 1.mailinglist 2.mytable (contains timestamp). The work sheet in excel file is called mails. I don't find how to upload the excel file.

The data format is: M/D/YYYY h:mm:ss in Greek (Also I correct the code at this part but it's not working again)

Thank you for your quick response

sasiparupudi1
Master III
Master III

May be you can try this

set the variable vMinDate= to minimum date and vMaxDate to your maximum date from your excel file (exclude the time part)

/*

Dates:

LOAD

  Floor(Min(TimeStamp#(mytable, 'MM/DD/YYYY hh:mm:ss'))) AS MinDate,

  Floor(Max(TimeStamp#(mytable, 'MM/DD/YYYY hh:mm:ss'))) AS MaxDate

RESIDENT emails;

*/

LET vMinDate =num(date(date#('01/20/2005','MM/DD/YYYY'),'MM/DD/YYYY'));  

LET vMaxDate = num(date(date#('07/28/2015','MM/DD/YYYY'), 'MM/DD/YYYY'));

TempCalendar:

LOAD $(vMinDate) + Iterno()-1 As Num,

    Date($(vMinDate) + IterNo() - 1) as TempDate

    AutoGenerate 1 While $(vMinDate) + IterNo() -1 <= $(vMaxDate);

Calendar:

LOAD

TempDate AS mytable,

Hour(TempDate) AS CalenderHour,

Minute(TempDate) AS CalenderMinute,

Date( Floor(TempDate)) AS CalendarDate,

Day(TempDate) AS CalendarDayOfMonth,

Month(TempDate) AS CalendarMonthName,

'Q' & Ceil(Month(TempDate)/3) AS CalendarQuarter,

Year(TempDate) AS CalendarYear,

'Q' & Ceil(Month(TempDate)/3) & '/' & Year(TempDate) AS CalendarQuarterAndYear,

Year(TempDate) & '/' & 'Q' & Ceil(Month(TempDate)/3) AS CalendarYearAndQuarter,

'Wed ' & DayStart(WeekStart(TempDate) + 3) as CalendarWednesdays

RESIDENT TempCalendar ORDER BY TempDate ASC;

DROP TABLE TempCalendar;

//DROP Table Dates;

HTH

Sasi

Not applicable
Author

the excel file I use