Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Load particular table(qvd) based on Field values?

Hi All,

I have a scenario like this below.

Till now I had a table (let say Table and it is stored as a QVD) which was loaded in Data Model as simple and suppose the field 'A' has values like (1,2,3,4)

Load A,B,C

from Table.qvd(qvd);

Now one more new table has been created (let say Table_New, same structure though) and the field 'A' has values: 'x'.

Requirement:

Now in my data model, I have to use both the above tables, condition:

  • If the field 'A' = 'x', then Load * from Table_New.qvd (qvd);
  • Else, Load * from Table.qvd (qvd);

Do I need to store both tables in one QVD?

Please suggest how to enhance the existing script/add the new script.

Regards!!!

4 Replies
eduardo_sommer
Partner - Specialist
Partner - Specialist

Hi,

I have some questions about your problem: You are making the decision of which qvd to load, based on the value of a field from a qvd you didn't choose yet. Another question, if have already loaded the qvd, you may have lots of values for field A. Which one should you choose?

Please, send us more details.

Eduardo

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Eduardo,

Below are my answers to your queries:

  • I need to load both the QVDs in to data model.
  • I want all values from 'A' field.
  • The value to be 'x' from 'A' field, I need to load that from Table_New qvd, otherwise for rest all other values, I have to load Table qvd.

Hope it is clear now.


Not applicable

Hi DMohanty,

You can use the below script.

Table:

Load A,B,C

from Table.qvd(qvd);

concatenate(Table)

Load A,B,C

from Table_New.qvd(qvd)

where A= 'x';

Then you have all the values for A and you don't need to carry 1 more table in your data-model.

Thanks

Garry

PradeepReddy
Specialist II
Specialist II

Try the bellow script,

Table:

Load A,B,C

from Table.qvd(qvd)

Where A<>'X';

Concatenate(Table)

Load A,B,C

from Table_New.qvd(qvd)

Where A= 'x';

Regards

Pradeep