Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional load from qvd

I have saved al my tables from my database in gvd files.

Also a joined table.

Now I want to link that joined table with two tables (with data from the joined table)

one where the code starts with a P and one where the code starts with an A

I added the script.

dot_action is my joined table, the selected fields are from the joined table.

How do I write the conditional load statement?

Because how I did it is not working.

Kind regards,

Katleen

18 Replies
aveeeeeee7en
Specialist III
Specialist III

Hi

Try this:

LOAD id,
     product_id,
     dotation_id,
     status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='P';

Concatenate

A_actie:
LOAD id,
     product_id,
     dotation_id,
     status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='A';

Not applicable
Author

Doesn't work, I get the error: script failed.

Any other ideas?

aveeeeeee7en
Specialist III
Specialist III

Use Concatenate inbetween them:

P_actie:

LOAD id,
     product_id,
     dotation_id,
     status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='P';

Concatenate

A_actie:
LOAD id,
     product_id,
     dotation_id,
     status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='A';

ashfaq_haseeb
Champion III
Champion III

Hi,

Try below

P_actie:

LOAD id,

     product_id,

     dotation_id,

     status

FROM

QVD\dot_actie.qvd where status like 'P*'

(qvd);

A_actie:

LOAD id,

     product_id,

     dotation_id,

     status

FROM

QVD\dot_actie.qvd where status like 'A*'

(qvd);

Regards

ASHFAQ

Not applicable
Author

Still the same error and I don't want to concatenate them, I need those in two seperate tables

Not applicable
Author

Doesn't work either, still the same error.

SunilChauhan
Champion
Champion

LOAD id,
     product_id,
     dotation_id,
     status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='P';

A_actie:
LOAD id,
     product_id as A_actie_product_id ,
     dotation_id  as  A_actie_dotation_id ,
     status  as A_actie_Status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='A';

Sunil Chauhan
aveeeeeee7en
Specialist III
Specialist III

Kindly check the path you are using is right or not.

Kindly rename the Table names since same names in both tables caused Synthetic keys

P_actie:

LOAD id,
     product_id,
     dotation_id,
     status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='P';

A_actie:
LOAD id,
     product_id  AS  A_product_id,
     dotation_id AS A_dotation_id,
     status  AS A_status
FROM
QVD\dot_actie.qvd(qvd) where Left(status,1)='A';

Kindly give the full folder path where your qvd is lying.

Kindly change it:

FROM

QVD\dot_actie.qvd(qvd)

ashfaq_haseeb
Champion III
Champion III

Hi,

Attach your qvd's

Regards

ASHFAQ