Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is this equivalent of a UNION ALL?

Hello,

I need to be able to analyze some .qvs files and determine how I can translate these into SQL. I cannot test my solution as I do not have a QlikView license, so I need to learn from earlier experiances in programming and the files presented.

Now to the case,

I have the follow situation:

TempTable:
LOAD DISTINCT
%CompanyName
RESIDENT Temp;

TempTable2:
LOAD DISTINCT
%Date
RESIDENT Temp;

JOIN (TempTable)
LOAD
*
RESIDENT Temp4;

Temp originally contains much more data, but using:

LOAD DISTINCT on a single field ought to return a vector of non-duplicated values of CompanyNames as I have understood i

The same is true for Date. So now I have a situation where I have a vector of CompanyNames, and a vector of Dates.

Performing a regular "JOIN" shouldn't return anything at all, if I have understood it correct, because there are no overlapping column names and no JOIN keys were specified, and the values themselves differs vastly.

So my question really, is does this become some kind of UNION all?


Suppose that

TempleTable
Company1
Company2

TempTable2
2018-01-19

2018-01-18

will this procedure create a table of the following appearence:

Company1     2018-01-19

Company1     2018-01-18

Company2     2018-01-19

Company2      2018-01-18

I don't know why that would be the resulting table, but this procedure surely must do something?

2 Replies
Anil_Babu_Samineni

Look for ApplyMap - script function ‒ QlikView

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

BTW, you can use QlikView Personal edition to test, No license required.

Your understanding is mostly correct.  A join between two tables (TempleTable and TempTable2 in this case) with no fields in common will produce rows will all rows joined to all the other rows -- a Cartesian join, not a Union. The results are as shown in your example.

Back to your first script example.  I don't know what the fields are in the resident table "Temp4" so can't comment on the results, but I think your understanding is on the right track.

-Rob