Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining tables

I Have:

Expenses_CarKm:

  load

  YearMonth,

  YearMonth & ProfitKmCarNumber As YearMonthCar,

  (ProfitKmEnd - ProfitKmStart) As ProfitKmTotal,

  ProfitKmDrive As ProfitKmDrive,

  (ProfitKmEnd - ProfitKmStart) - ProfitKmDrive As ProfitKmEmpty;

from excel file

And I Have:

TESTING:

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

how do i join Expenses_CarKm and Testing??

5 Replies
Gysbert_Wassenaar

Using the JOIN keyword:


Expenses_CarKm:

  load

  YearMonth,

  YearMonth & ProfitKmCarNumber As YearMonthCar,

  (ProfitKmEnd - ProfitKmStart) As ProfitKmTotal,

  ProfitKmDrive As ProfitKmDrive,

  (ProfitKmEnd - ProfitKmStart) - ProfitKmDrive As ProfitKmEmpty;

from ...excel_file...;

JOIN (Expenses_CarKm)

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);


talk is cheap, supply exceeds demand
Not applicable
Author

I alredy loaded the first excel table in different place and i called it Expenses_CarKm

and i don't want to load it again.

i just want to join

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

with Expenses_CarKm fileds.

joshabbott
Creator III
Creator III

Join (Expenses_CarKm)

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

mohamed_ahid
Partner - Specialist
Partner - Specialist

Hi

try this :

TESTING:

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

join(TESTING)

  load

  YearMonth,

  YearMonthCar,

  ProfitKmTotal,

  ProfitKmDrive,

  ProfitKmEmpty;

resdient  Expenses_CarKm;

Hope it helps

Not applicable
Author

Hi,

It"s not a problem.. the both tables should exists in the script... then use join  keyword for joining your table like below

Join (Expenses_CarKm)

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);