Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

baarathi
Contributor

How to solve this error?

Let varTemp=1;


Let varThisExec = Date(Now());

Let varLastExec = date(peek('MaxDate', 0, 'LastUpdatedDate'));


LastUpdatedDate:

       Load max(Date("Date of Joining")) as MaxDate

        FROM  /*lib://QVDs/abc.qvd(qvd);*/ [lib://QVDs/Employee.xls]

      (biff, embedded labels, table is Sheet1$);

if ('$(varTemp)'=1) then    

   Qvd:

        LOAD

          "First Name",

          "Last Name",

          "Date of Joining",

          Designation,

          Location,

          Salary,

          ID

      FROM [lib://QVDs/Employee.xls]

      (biff, embedded labels, table is Sheet1$)

      Where "Date of Joining" > '$(varLastExec)';

       Store Qvd into [lib://QVDs/abc.qvd](qvd);

      Let '$(varTemp)'=0;

endif


Temp:

        LOAD

            "First Name",

            "Last Name",

            "Date of Joining",

            Designation,

            Location,

            Salary,

            ID

FROM [lib://QVDs/Employee.xls]

(biff, embedded labels, table is Sheet1$)

Where "Date of Joining" > '$(varLastExec)';

Concatenate

          LOAD

              "First Name",

              "Last Name",

              "Date of Joining",

              Designation,

              Location,

              Salary,

              ID

from lib://QVDs/abc.qvd(qvd)

where not Exists(ID);

inner join

Load ID FROM [lib://QVDs/Employee.xls]

(biff, embedded labels, table is Sheet1$);




if ('$(ScriptErrorCount)') = 0 then

Store Temp into [lib://QVDs/abc.qvd](qvd);

Let varLastExec = '$(varThisExec)';

endif


Started loading data

LastUpdatedDate << Sheet1$ Lines fetched: 1 Qvd << Sheet1$ Lines fetched: 15 Qvd << Sheet1$ Lines fetched: 30 Qvd << abc (QVD (row-based) optimized) Lines fetched: 30 Temp << Sheet1$ Lines fetched: 15

The following error occurred:

Table 'Temp' not found

The error occurred here:

Store Temp into [lib://QVDs/abc.qvd](qvd)

Data has not been loaded. Please correct the error and try loading again.

1 Solution

Accepted Solutions
omarbensalem
Esteemed Contributor

Re: How to solve this error?

The table Temp's structure (fields) are the same fields of the 1st table Qvd, and thus the 2 tables will be automatically concatenated to a single table; its name would be Qvd.

Exit script before storing the table and see the name of ur created table(s)

4 Replies
gareth_wilson12
Contributor II

Re: How to solve this error?

No sure exactly but quick glance could be a number of things. Could be the Temp table is auto concatenating into the Last Updated date table.

Try;

Let varTemp=1;


Let varThisExec = Date(Now());

Let varLastExec = date(peek('MaxDate', 0, 'LastUpdatedDate'));


LastUpdatedDate:

       Load max(Date("Date of Joining")) as MaxDate

        FROM  /*lib://QVDs/abc.qvd(qvd);*/ [lib://QVDs/Employee.xls]

      (biff, embedded labels, table is Sheet1$);

if ('$(varTemp)'=1) then   

   Qvd:

        LOAD

          "First Name",

          "Last Name",

          "Date of Joining",

          Designation,

          Location,

          Salary,

          ID

      FROM [lib://QVDs/Employee.xls]

      (biff, embedded labels, table is Sheet1$)

      Where "Date of Joining" > '$(varLastExec)';

       Store Qvd into [lib://QVDs/abc.qvd](qvd);

      Let '$(varTemp)'=0;

endif


NoConcatenate


Temp:

        LOAD

            "First Name",

            "Last Name",

            "Date of Joining",

            Designation,

            Location,

            Salary,

            ID

FROM [lib://QVDs/Employee.xls]

(biff, embedded labels, table is Sheet1$)

Where "Date of Joining" > '$(varLastExec)';

Concatenate

          LOAD

              "First Name",

              "Last Name",

              "Date of Joining",

              Designation,

              Location,

              Salary,

              ID

from lib://QVDs/abc.qvd(qvd)

where not Exists(ID);

inner join

Load ID FROM [lib://QVDs/Employee.xls]

(biff, embedded labels, table is Sheet1$);




if ('$(ScriptErrorCount)') = 0 then

Store Temp into [lib://QVDs/abc.qvd](qvd);

Let varLastExec = '$(varThisExec)';

endif

omarbensalem
Esteemed Contributor

Re: How to solve this error?

The table Temp's structure (fields) are the same fields of the 1st table Qvd, and thus the 2 tables will be automatically concatenated to a single table; its name would be Qvd.

Exit script before storing the table and see the name of ur created table(s)

gareth_wilson12
Contributor II

Re: How to solve this error?

Or your inner join to Employee.xls is bringing back no results

baarathi
Contributor

Re: How to solve this error?

Thank You