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

what is the mistake in the below senario....

t1:

LOAD category,

     country,

     sales

FROM

C:\Users\ravi\Desktop\lookup2015.xlsx

(ooxml, embedded labels, table is Sheet1);

t2:

LOAD category,

lookup('country','category',category,'t1') as manikanta

resident t1;

drop table t1;

FROM

C:\Users\ravi\Desktop\lookup2015.xlsx

(ooxml, embedded labels, table is Sheet1);

5 Replies
Not applicable
Author

Hi! What exactly are you trying to achieve? No need to use lookup as you are loading from single table. Also delete

FROM

C:\Users\ravi\Desktop\lookup2015.xlsx

(ooxml, embedded labels, table is Sheet1);


after the drop table t1;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The meaning of your code is unclear. Why do you use lookup() when loading from the same table t1 that already has a relation between category and country? You want to find the first country that has a relation with a particular category?

petter
Partner - Champion III
Partner - Champion III

You must be getting some error message when you try to load this....

Since the FROM here is orphaned... It does not belong to a LOAD statement ...

drop table t1;

FROM

C:\Users\ravi\Desktop\lookup2015.xlsx

(ooxml, embedded labels, table is Sheet1);

ToniKautto
Employee
Employee

It would be great if you could provide details of what issue you get. In this case I assume you get an reload error or a logical problem.

If you have a syntax error the script editor will indicate this with a red line.

If you have a logical error a document log can tell where the issue occurs.

vijetas42
Specialist
Specialist

HI,

No need of using lookup() and from statement you just have to write,

t2:

Load Category ,Country

resident t1;

Drop table t1;

Thanks,

Vijeta