Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
LuisRivera
Contributor
Contributor

Joins

Dear all,

 

My fact table has a column "ID_Order" as primary key.

I have 10 different tables with 2 columns each, all of them having the same primary key as the fact table.

I think it would make more sense to join the 10 tables with dates (so I can have a single table with all the dates of each ID_Order).

 

This is what I tried so far (but it doesn't work):

 

OLEDB CONNECT TO [hidden];

Fact:
SQL SELECT *
FROM "DBOrders"."dbo"."Orders";

Dates:
SQL SELECT *
FROM "DBOrders"."dbo"."vw_ActivationDate"
LEFT JOIN [ID_Order] FROM "CSPRIMEesp"."dbo"."vw_CancelDate";
LEFT JOIN [ID_Order] FROM "CSPRIMEesp"."dbo"."vw_AnalysisDate";
LEFT JOIN [ID_Order] FROM "CSPRIMEesp"."dbo"."vw_DueDate";
LEFT JOIN [ID_Order] FROM "CSPRIMEesp"."dbo"."vw_CommerceDate";
LEFT JOIN [ID_Order] FROM "CSPRIMEesp"."dbo"."vw_RegistryDate";

What would be best to do here  ?

Thanks in advance,

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can try to load them one by one to check values.

vw_ActivationDate:
SQL SELECT * FROM "DBOrders"."dbo"."vw_ActivationDate"

vw_CancelDate:
SQL SELECT * FROM "CSPRIMEesp"."dbo"."vw_CancelDate";

Also you can do the joins in Qlik:

Dates:
SQL SELECT * FROM "DBOrders"."dbo"."vw_ActivationDate"

Left Join (Dates)
SQL SELECT [ID_Order], CancelDate FROM "CSPRIMEesp"."dbo"."vw_CancelDate";

View solution in original post

1 Reply
rubenmarin

Hi, you can try to load them one by one to check values.

vw_ActivationDate:
SQL SELECT * FROM "DBOrders"."dbo"."vw_ActivationDate"

vw_CancelDate:
SQL SELECT * FROM "CSPRIMEesp"."dbo"."vw_CancelDate";

Also you can do the joins in Qlik:

Dates:
SQL SELECT * FROM "DBOrders"."dbo"."vw_ActivationDate"

Left Join (Dates)
SQL SELECT [ID_Order], CancelDate FROM "CSPRIMEesp"."dbo"."vw_CancelDate";