Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to apply Where Clause to entrie Load script ?


Hi,

I am new in the qlikview world.

I am coming from the SQL background.

how can we apply where caluse to entire results ?

Example for SQL :

select

a.*

from A

left join

B

on

A.field = B.field

where

A.field = 'abcd <---how can we implement same thing in qlikview Load Script ?

any help would be appreciated, i am new in qlikview.

5 Replies
Anonymous
Not applicable
Author

Hi we can use the where clause to load the data for

LOAD Year,

     Month,

     Sales,

     EmpId,

     makedate(Year,Month,1) as date_con

FROM

(ooxml, embedded labels, table is Sheet1) where Year='2013';

The above table load the data of perticular year 2013 Only.......

its_anandrjs

In Qlikview you have to try with

TableA;

Load *

From LocationA

Where field = 'abcd';

Left Join

TableB:

Load *

From LocationB;

Hope this helps

maxgro
MVP
MVP

you can use your sql in Qlikview; so another answer could be

Table:

load

field,

field2,

field3;

sql

select

a.field, a.field2, b.field3

from A

left join

B

on

A.field = B.field

where

A.field = 'abcd'

;

Not applicable
Author

Example :

Noconcatanate:

Test:

LOAD *

          Resident Table1:   <---1000 records

Left Join

LOAD *

          Resident Table2;   <---300 records

Left Join

LOAD *

          Resident Table3    <---Total 200 records among that 100 records has field 'abc'

Where Table3.field = 'abc'

so, end results , i was expecting to be 100 records ,

but, still getting 1000 records.

it looks like WHERE clause is applying to Table3 only and due to left join,

it returns 1000 reords and WHERE condition is not considering.

basically,

I want to apply that WEHRE clause entire results.

maxgro
MVP
MVP

yes where is on Table3

try to add

Final:

noconcatenate lod * resident Test where field = 'abc';

drop table Test;