Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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 (2)
1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

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
MVP
MVP

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";