Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
hello
can you discribe your loading script that you are using
Hi Sushil,
My load script is as follows:
Data:
LOAD
Cust_ID,
Balance,
Age,
MonthYear,
Curr_Val
FROM
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
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
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
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
Regards,
Chema