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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Script Problem

Hi guys,

I have an issue with my load script.

I have 6 months worth of data. 5 months contain 10 fields and one month contains 8 fields.

When I try to load the fields and store into a qvd, i get an error message for the month that has only 8 fields and all the other qvds are created apart from this one.

Is there any way I can do something to handle this missing field problem when creating my qvds so that it doesn't error and I actually create all the qvds in one go?

Thanks

5 Replies
sushil353
Master II
Master II

hello

can you discribe your loading script that you are using

Not applicable
Author

Hi Sushil,

My load script is as follows:

Data:

LOAD

Cust_ID,

Balance,

Age,

MonthYear,

Curr_Val

FROM (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Like I said earlier, the problem is I have multiple months of data and 5 fields are in all the months I have apart from one month, so when I reload my application, the reload fails for one month of data as the fields Age and Curr_Val do not exist for one month only.

Is there any way I can do something to handle this?

Thanks

Not applicable
Author

I think you need to load monthyear separately qlikview will consider it as separate table and will create link on monthyear with your data.

Actually you many have multiple transactions with monthyear field so you have to use DISTINCT clause to retrieve unique monthyear.

Regards

Zubair Khan

sushil353
Master II
Master II

hi zebadguy,

first of all load the 5 month of data by applying condition in a qvd file say testdata.qvd. then concatenate it with data of month 6. try to understand the script below. first time dont use concatenate statement. I tried with a sample data and it is working..

data:

load

cust_id,

balance,

age,

monthYear,

curr_val

from[.........]

where monthyear=6;

concatenate load * from testdata.qvd(qvd)

where monthyear<=5;

store Data into testdata.qvd;

HTH

chematos
Specialist II
Specialist II

Hi,

You could create the two missing fields with null values or whatever you want:

LOAD

Cust_ID,

Balance,

Age,

MonthYear,

Curr_Val,

' ' as FieldMissing1,

' ' as FieldMissing2,

FROM (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Regards,

Chema