Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
klaus_feldam
Creator II
Creator II

Calling table from a QVD into a script

I am running into issues calling a table (SalesDetails) from a QVD.

Contents of QVD:

-------------------------

SalesDetails:
LOAD
SHDCTO & '_' & SHDOCO & '_' & SHKCOO as SalesHeaderKey,  // Link Header to Detail
SHKCOO As [Order Company],

SHVR01 as [PO Number],
SHVR02 as [Lock Box Info],
SHCARS as [Check Number],
SHCNID as [Ordered By],
SHTRDC as [Trade Discount],
SHTKBY as [Order Taken By],
SHDEL1 as [Delivery Instructions 1],
SHDEL2 as [Delivery Instructions 2]
;
SQL SELECT *
FROM F4201
;

STORE SalesDetails INTO All_4201.qvd (qvd);

-------------------

When I run the following script, where I trying to call the SalesHeader table, I am getting an error, saying that the resident table can't be found.

Could anyone cast a quick look and see where I am going wrong?

LOAD *

FROM D:\Client View\AllClients\All_4201.qvd (qvd)

where [Order Company]= '$(CompanyLimit)';

YTD:

Load

YTDKey,

Sum(if(EXISTS([Current YTD Date], Date), [Net Sales Amount])) as [YTD Net Sales Amount], 

Sum(if(EXISTS([Current YTD Date], Date), [Net Sales Quantity])) as [YTD Net Sales Quantity],

Sum(if(EXISTS([Current YTD Date], Date), [Sales Margin Amount])) as [YTD Sales Margin Amount],

Sum(if(EXISTS([Current YTD Date], Date), [Sales Cost Amount])) as [YTD Sales Cost Amount],

RESIDENT SalesDetails

WHERE EXISTS([YTD Date], Date)

GROUP BY YTDKey;

13 Replies
Not applicable

FInd the attached updated App. It should work now.

Not applicable

Thank's man

It is working but i still don't understand why it wasn't working when i did it:)

Can you explain it to me?

Not applicable

If you see the code, I have changed the structure. When the structure of a table is same and if you want to create an other table with the same structure then you can add some junk field and achieve and drop the field later.

Not applicable

OK

i understand your structure.

But i dont understand why code which i have wrote didnt work.

Is it because i wanted to store table which was linked to sources from files ?

Or because of something different?

...