Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating QVD from Multiple Loads

Below is a script I have been writing to combine four 1 xlx and 3 SQL files to produce a QVD file.

The load portions work just fine. When I get to picking the fields I want to create a QVD file, the script says it cannot find the table.

I would appreciate help in finding the correct syntax for this.

//********************Facility Load******************

Facility_Id:

LOAD FacilityId,

A_FAC_NAME as F_NAME ,

A_FTYPE ,

A_REG

FROM

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

//********************Insurance Load**********************

ODBC CONNECT TO MeditechDREH;

Insurance:

Load

InsuranceID,

Name as INS_NAME;

SQL SELECT *

FROM LiveEH.dbo.DMisInsurance;

//******************Visit Information*************************

ODBC CONNECT TO MeditechDREH;

Visits:

Load

AdmitDateTime,

DischargeDateTime as Disch_Date,

interval(num(DischargeDateTime)-num(AdmitDateTime)) as LOS,

PatientID as ACCT_NUM,

FacilityName & PrimaryInsuranceID as FAC_INS,

FacilityName,

PrimaryInsuranceID as InsuranceID,

FacilityName as FacilityId,

InpatientOrOutpatient,

Month(DischargeDateTime) as Month,

Year(DischargeDateTime) as Year,

VisitID as MT_VISIT;

SQL SELECT *

FROM LiveEH.dbo.BarVisits

Where InpatientOrOutpatient='I';

//***************************Patient Financial Info*******************

Fin_Data:

Load

AdjustmentTotal,

Balance as BAL,

BarStatus,

ChargeTotal as CHARGES,

ReceiptTotal as RECEIPTS,

RefundTotal as REFUNDS,

VisitID as MT_VISIT;

SQL SELECT *

FROM LiveEH.dbo.BarVisitFinancialData

WHERE (Balance=0 and BarStatus='FB'and ChargeTotal<>0) or (BarStatus='BD' and ChargeTotal<>0);

//**********************Create QVD************************************

Vist_Data:

Buffer(Incremental)

Load

F_NAME,

A_FTYPE,

A_REG;

Sql Select *

From Facility_Id;

Load

InsuranceID,

INS_NAME;

Sql Select *

From Insurance;

Load

LOS,

FAC_INS,

ACCT_NUM,

Disch_Date,

InsuranceID;

Sql Select *

From Visits;

Load

BAL,

CHARGES,

RECEIPTS,

REFUNDS,

MT_VISIT;

Sql Select *

From Fin_Data;

store Visit_Data into C:\Documents and Settings\gxpowers\MyDocuments\Meditech_Data.qvd;

Drop Table Visit_Data;

Thanks

Glen

3 Replies
sparur
Specialist II
Specialist II

Hello, Glen.

I think that you created a small mistake in table name:

Vist_Data:

Buffer(Incremental)...

but you try to store a table with name Visit_Data.

I think you missed one symbol and you should use script like this:


Visit_Data:

Buffer(Incremental)

Not applicable
Author

I changed the table name from Vsit_Data to Visit_Data. However, I am still getting the error message:

Invalid Object Name: Facility_Id

Sql Select *

From Facility_Id

Do I need to make the "source" tables Resident?

Thanks

Glen

syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

Store statement can only export fields from one logical table. So you'll have to create only one table. You can try using joins or resident tables to merge all the fields into one large table. But then you need to have some common feilds between these tables to join them.