8 Replies Latest reply: Jul 14, 2016 1:21 PM by Robert Winkel RSS

    Join excel and sql

    Robert Winkel

      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