Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
miro_kopecky
Contributor III
Contributor III

Load from different tables

Hello,
I have added in my script those three highlited lines and now it gives me error that filed "code" not found.
I think I need to somehow join tables Card and Codes but I dont know how to...
I would be very grateful if anybody could help me.
Thanks.

Bez názvu.png 

Labels (2)
1 Solution

Accepted Solutions
Kalmer
Partner - Creator
Partner - Creator

Something like that should fix it: (PS: i don't have these characters in excel, so go through it):

Tmp_Debit:
Load
	F1 as krajina.card,
	cislo as card,
	typ as typ.card,
From [lib://AttachedFiles/testovacie udaje.xlsx]
(ooxml, embedded labels, table is [platobnoé karty]);

Left join(Tmp_Debit)
Load
	left(numbers, 6) as card,
	numbers as code
From [lib://AttachedFiles/AU_BIN prefix.xlsx]
(ooxml, embedded labels, table is [Harok1]);

Debit:
Load
	*,
	if(......
Resident Tmp_Debit;

Drop table Tmp_Debit;

View solution in original post

3 Replies
Lisa_P
Employee
Employee

What is the relationship between the code and the other data ?

miro_kopecky
Contributor III
Contributor III
Author

Hi,
field 'code' is the first 6 digits of field 'card'.
But not in every case and i need to check that.
Kalmer
Partner - Creator
Partner - Creator

Something like that should fix it: (PS: i don't have these characters in excel, so go through it):

Tmp_Debit:
Load
	F1 as krajina.card,
	cislo as card,
	typ as typ.card,
From [lib://AttachedFiles/testovacie udaje.xlsx]
(ooxml, embedded labels, table is [platobnoé karty]);

Left join(Tmp_Debit)
Load
	left(numbers, 6) as card,
	numbers as code
From [lib://AttachedFiles/AU_BIN prefix.xlsx]
(ooxml, embedded labels, table is [Harok1]);

Debit:
Load
	*,
	if(......
Resident Tmp_Debit;

Drop table Tmp_Debit;