Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Specialist III
Specialist III

Use

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

Order By emp_id

tresesco
MVP
MVP

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
Specialist II
Specialist II

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

its_anandrjs

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
Author

it is showing script syntax error in  orderby emp_id Asc;

its_anandrjs

Put space between Order By

Eg:-

Order By emp_id Asc;

Not applicable
Author

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

tresesco
MVP
MVP

Could you post your script piece?

vardhancse
Specialist III
Specialist III

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