Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
danosoft
Specialist
Specialist

Error table not found, using STORE

 

Hi, i have this error... when i do the STORE of my table in the script "table not found" where is the problem in my script?

CDG_Gas:
[...]

IF filetime('.\DataStores\V_FATTURATO_CDG_GAS_18.qvd') > 0 then
Concatenate:
CDG_Gas_18:
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS_18.qvd' (qvd);
ELSE
Concatenate:
CDG_Gas_18:
LOAD
***;
SQL SELECT *
FROM ***;
ENDIF
STORE CDG_Gas_18 INTO '.\DataStores\V_FATTURATO_CDG_GAS_18.qvd' (qvd);

 

immagine.png

1 Solution

Accepted Solutions
rubenmarin

You can change the order of script: first check the qvd that doesn't exists and create the qvds, after this load everything from qvds, like:

IF filetime('.\DataStores\V_FATTURATO_CDG_GAS_18.qvd') > 0 then
 // Nothing
ELSE
CDG_Gas_18:
LOAD 
***;
SQL SELECT *
FROM ***;
// Store the table in qvd and delete the table
STORE CDG_Gas_18 INTO '.\DataStores\V_FATTURATO_CDG_GAS_18.qvd' (qvd);
DROP Table CDG_Gas_18;
ENDIF

After all qvds are created load the data in a single table using qvds:

CDG_Gas:
[...]

Concatenate (CDG_Gas)
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS_18.qvd' (qvd);

Concatenate (CDG_Gas)
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS_19.qvd' (qvd);

Or maybe just:

CDG_Gas:
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS*.qvd' (qvd);

View solution in original post

6 Replies
m_woolf
Master II
Master II

It looks like your table name is CDG_Gas.

 

Put an exit script; before the Store line, reload and look at the table name to verify.

rubenmarin

Hi, CDG_Gas_18 has the same structure as CDG_Gas and is autoconcatenating, try with Nocontenate to avoid autoconcatenation:

CDG_Gas_18:
NoConcatenate LOAD

 

danosoft
Specialist
Specialist
Author

Hi sorry but i want concatenate all two table.

And i want to store my table CDG_Gas_18 in the .qvd file, but when it execute the command STORE it do that error, why?

rubenmarin

Concatenate means that a table is added to another table, so table CDG_Gas_18 is not created and its values are added to CDG_Gas.

If you want to keeep them concatenated you need to use the first table: STORE CDG_Gas INTO '.\DataStores\V_FATTURATO_CDG_Gas.qvd' (qvd);

or: STORE CDG_Gas INTO '.\DataStores\V_FATTURATO_CDG_Gas_18.qvd' (qvd);

 

danosoft
Specialist
Specialist
Author

ok understand, but i want have more .qvd one for every year (but the table are all concatenated)

for example

CDG_GAS

.....

STORE CDG_Gas INTO '.\DataStores\V_FATTURATO_CDG_Gas.qvd' (qvd);

CDG_GAS_18

.....

STORE CDG_Gas_18 INTO '.\DataStores\V_FATTURATO_CDG_Gas_18.qvd' (qvd);

CDG_GAS_19

.....

STORE CDG_Gas_19 INTO '.\DataStores\V_FATTURATO_CDG_Gas_19.qvd' (qvd);

 

but all those table need be concatenated becouse i need only a table in my dashboard

rubenmarin

You can change the order of script: first check the qvd that doesn't exists and create the qvds, after this load everything from qvds, like:

IF filetime('.\DataStores\V_FATTURATO_CDG_GAS_18.qvd') > 0 then
 // Nothing
ELSE
CDG_Gas_18:
LOAD 
***;
SQL SELECT *
FROM ***;
// Store the table in qvd and delete the table
STORE CDG_Gas_18 INTO '.\DataStores\V_FATTURATO_CDG_GAS_18.qvd' (qvd);
DROP Table CDG_Gas_18;
ENDIF

After all qvds are created load the data in a single table using qvds:

CDG_Gas:
[...]

Concatenate (CDG_Gas)
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS_18.qvd' (qvd);

Concatenate (CDG_Gas)
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS_19.qvd' (qvd);

Or maybe just:

CDG_Gas:
LOAD
*** from '.\DataStores\V_FATTURATO_CDG_GAS*.qvd' (qvd);