Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to load using where and order by

Hi

i want to load a  column emp_name from a table employees using order by and where clause.

where emp_id is 1,2,3.

orderby emp_id.

i need to load this through script

10 Replies
nagaiank
Valued Contributor III

Re: How to load using where and order by

Use

Where Match(emp_id,1,2,3) > 0

Order By emp_id

MVP
MVP

Re: How to load using where and order by

Yes, possibly she was asking for where part. '>0' part is redundant here, try like:

Where Match(emp_id,1,2,3) Order By emp_id

satishkurra
Valued Contributor II

Re: How to load using where and order by

Use this

LOAD EMPNO,

    ENAME,

    JOB,

    MGR,

    HIREDATE,

    SAL,

    COMM,

    DEPTNO

    Where Match('EMPNO', 1,2,3);

SQL SELECT *

FROM SCOTT.EMP

Order By EMPNO

Re: How to load using where and order by

Try With this

tmpSource:

Load

*,

emp_id

From Location;

Noconcatenate

FinalTable:

Load

*,

emp_id

resident tmpSource

where Match(emp_id,1,2,3)

order by emp_id Asc;

Drop Table tmpSource;

Not applicable

Re: How to load using where and order by

it is showing script syntax error in  orderby emp_id Asc;

Re: How to load using where and order by

Put space between Order By

Eg:-

Order By emp_id Asc;

Not applicable

Re: How to load using where and order by

i tried after loading it is showing garbage statement after non concatenate

MVP
MVP

Re: How to load using where and order by

Could you post your script piece?

vardhancse
Valued Contributor II

Re: How to load using where and order by

we need to keep the where condition after mentioning the table name .

Community Browser