Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rennesia
Contributor III
Contributor III

Generate a table from other retreived data

I have the following problem:

From several tables I read data and I have to combine it to one new table BatchData. What is the correct script to realize that?

When someone has a

Batch_Actual:

LOAD

    Val as Actual_StartYear;

    SELECT * FROM x WHERE Name = "Actual_StartYear";

join(Batch_Actual)

LOAD

    Val as Actual_StartMonth;

    SELECT * FROM x WHERE Name = "Actual_StartMonth";

join(Batch_Actual)

Batch_Previous:

LOAD

    Val as Previous_StartYear;

    SELECT * FROM x WHERE Name = "Previous_StartYear";

join(Batch_Previous)

LOAD

    Val as Previous_StartMonth;

    SELECT * FROM x WHERE Name = "Previous_StartMonth";

join(Batch_Previous)

BatchData:

=(Actual_StartYear),=(Actual_StartMonth)

=(Previous_StartYear),=(Previous_StartMonth)

6 Replies
petter
Partner - Champion III
Partner - Champion III

Is this some load script that is working?

sunny_talwar

Not idea what the intention is. May be if you can provide some sample data with the expected output, it would be easy to understand.

pooja_sn
Creator
Creator

What fields does table 'BatchData' contain? can you share your qvw?

rennesia
Contributor III
Contributor III
Author

Petter and Sunny, thanks for the replies.

Yes, this script is a load script.

An example:

Batch_Actual.Actual_StartYear = 2016
Batch_Actual.Actual_StartMonth = 03
Batch_Previous.Previous_StartYear = 2015

Batch_Previous.Previous_StartMonth = 04

BatchData (the new table) must be:

2016,03

2015,04

gferran
Partner - Contributor III
Partner - Contributor III

To combine diferents tables the join operation is the right way but you must know than the default join is the outer. Try to explain your intention to permit our help.

rennesia
Contributor III
Contributor III
Author

Maybe more explanation is useful...

I have to read several data from one table (as you can see by Batch_Actual and Batch_Previous). That data must be copied to another table, so I can use it for presentation etc.

In the script from the attached file, you can see at the 'New BatchData'-tab the layout of the table I have to realize.