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

IBM iSeries Command

Hi All,

Im working on AS400 with IBM iSeries Access , i need to implement the incremental load for one table as following:

load all data except last 30 days from QVD.

load last 30 days data from DB,

the idea is very simple but the main issue is the date filed on DB having speace and i don't know how i can give the right command

the source filed looking like this '101001 ' i try idea by making vairable to give me date before 30 days including the speace but also not work [:(]

any idea plz......!!!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The details are not clear... In general I understand the request is to load data older 30 days from QVD, and 30 days and later from the database. It can be implemented like this:

1. Define the date "30 days back" as a variable
LET v30daysback = date(today()-30);

2. Load from QVD with condition "older than 30 days"
Result:
LOAD
...
FROM file.qvd
WHERE Date < '$(v30daysback)';

3. Load from the database only the fresh data
CONCATENATE (Result) LOAD
...
;
SQL SELECT
...
FROM table
WHERE Date >= '$(v30daysback)';

As for the date formatting - it is an unrelated question, and it is no clear from your post. As Corrado says - need example of your data.

View solution in original post

4 Replies
Not applicable
Author

Could you explain better your request?
Even with example data?

Regards

Anonymous
Not applicable
Author

The details are not clear... In general I understand the request is to load data older 30 days from QVD, and 30 days and later from the database. It can be implemented like this:

1. Define the date "30 days back" as a variable
LET v30daysback = date(today()-30);

2. Load from QVD with condition "older than 30 days"
Result:
LOAD
...
FROM file.qvd
WHERE Date < '$(v30daysback)';

3. Load from the database only the fresh data
CONCATENATE (Result) LOAD
...
;
SQL SELECT
...
FROM table
WHERE Date >= '$(v30daysback)';

As for the date formatting - it is an unrelated question, and it is no clear from your post. As Corrado says - need example of your data.

Not applicable
Author

Hi all

first of all sorry for unclear information, and thanks for your replays,,

Daer Michael,

i was doing the same step but the diffrent is very small Embarrassed ,

i was doing like = (where Date>= $(vDay) ) and it was giving me error.

and the correct as you wrote (where Date>=' $(vDay) ')

Thanks A Lot 🙂

Anonymous
Not applicable
Author

Glad it helped Big Smile
For future - these sort of mistakes easy to find going through the log file. Log shows actual values of the variables instead of their names. Using debug step-by-step may be usefult too, if the script is not too long.