Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join excel and sql

What am I doing wrong?  I am trying to do a join between  [combined]: [Date Range] AS [DateRange], and hrsx: DateRangz

Do I have the join statement in the wrong place?

[combined]:
LOAD
  [Date Range] AS [DateRange],
  [FWUserID] AS [PhrNPI];
LOAD
    [Date Range],
[FWUserID]
FROM [lib://rbw (pharmore_rwinkel)/Paycom Hours 2016.xlsx]
(ooxml, embedded labels, table is combined);

[combined]:
Load [DateRange];
FROM [lib://rbw (pharmore_rwinkel)/Paycom Hours 2016.xlsx]

hrxs:
left Join
LOAD
    [DateRangz];
   
SQL Select
    [DateRangz]

FROM Rx.dbo.HRxs;

LIB CONNECT TO 'pmd-sandbox (pharmore_rwinkel)';

hrxs:
LOAD *,
DayName(InitReview) as DateRangez;
SQL SELECT
InitReview,
Checked,
PhrNPI

FROM Rx.dbo.HRxs

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Directly after it. Create a new section or unlock the section that the Data Manager created and edit that.


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Gysbert_Wassenaar

If you want to join tables then you need to give the fields the same name. So either both DateRange or both DateRangez


talk is cheap, supply exceeds demand
Not applicable
Author

thank you I thought that but was not 100% sure.

but now I get this


   

Gysbert_Wassenaar

[combined]:

Load [DateRange]; <<  remove the ; character

FROM [lib://rbw (pharmore_rwinkel)/Paycom Hours 2016.xlsx]


talk is cheap, supply exceeds demand
Not applicable
Author

Getting closer,  I am not a programmer just trying to learn this, I really appreciate your help.

[combined]:
Load [DateRange]
FROM [lib://rbw (pharmore_rwinkel)/Paycom Hours 2016.xlsx]

hrxs:
left Join
LOAD
    [DateRange];
   
SQL Select
    [DateRange]

FROM Rx.dbo.HRxs

Gysbert_Wassenaar

"Cannot open file" looks like a pretty good clue as to what's wrong.

Have you tried creating a load statement for that excel file using the Data Manager instead of using the Date load editor?


talk is cheap, supply exceeds demand
Not applicable
Author

ok I removed the data from the data load editor then when into the data manager and loaded from the.  How and were do I put the join data?

Gysbert_Wassenaar

Directly after it. Create a new section or unlock the section that the Data Manager created and edit that.


talk is cheap, supply exceeds demand
Not applicable
Author

I tried a few different things

Do you know of a class that I should take to help me figure this thing out?

LIB CONNECT TO 'pmd-sandbox (pharmore_rwinkel)';
hrxs:

left Join
LOAD
    [DateRange];
   
SQL Select
    DateRange

FROM Rx.dbo.HRxs


hrxs:
LOAD*;
DayName(InitReview) as DateRange;