Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Not applicable

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

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;

Highlighted

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

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?

Highlighted
MVP
MVP

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

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);

Highlighted
Employee
Employee

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

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.

Highlighted
Specialist
Specialist

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

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