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

optimized qvd script doubt?

LOAD year,

     month,

     [customer number],

     [budget amount]

FROM

(qvd)

where  Exists(year);          ---  when i go for reload  with this statement  i am not getting any data

//   where not exists (year);    --  when i go for reload with this  statement   i am getting full data

what is the wrong here ?  can i write like this ?

pls share some example script for optimized qvd  and  un optimized qvd?

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi Manoj,

If you load another table with Year column before loading your budget this will work otherwise it won't work.

SomeTableName:

LOAD

year,

'

'

'

FROM SomeTableName;

Data:

LOAD year,

     month,

     [customer number],

     [budget amount]

FROM

(qvd)

where  Exists(year);  

When the above script executes the data in the budget is loaded for the years exists in the table SomeTableName.

Hope this helps you.

Regards,

Jagan.

View solution in original post

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi Manoj,

If you load another table with Year column before loading your budget this will work otherwise it won't work.

SomeTableName:

LOAD

year,

'

'

'

FROM SomeTableName;

Data:

LOAD year,

     month,

     [customer number],

     [budget amount]

FROM

(qvd)

where  Exists(year);  

When the above script executes the data in the budget is loaded for the years exists in the table SomeTableName.

Hope this helps you.

Regards,

Jagan.

vardhancse
Specialist III
Specialist III

its a kind of left join, if we write where exists it will check with the associated table.

As there is no other table, it shows error while reloading

its_anandrjs
Champion III
Champion III

Hi,

With simple example also you can find how it works suppose there is two table one is new records and other is old records, and we want top load only new records. Then load new records table first and then old table with syntax Where Exists(year); then by using this we get only last 2013 records only.

NewRecords:

LOAD * INLINE [

    year, month, customer number, budget amount,flag

    2013, 5,33,4587412,t2

];

OldRecords:

LOAD * INLINE [

    year, month, customer number, budget amount,flag

    2011, 4,45,45863,t1

    2012, 5,34,26369,t1

] Where Exists(year);

Regards

Anand