Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Master
Master

Nulls from DB

Hi all,

i am getting nulls from Database only

but i want to exclude nulls from DB while loading itself  how can i do this in script?  you can see in image with empty spaces i  dont want that

Thanks

Sonyempty.PNG

11 Replies
Master II
Master II

In the script do as below:

If(Len(Trim([Deal Type])) > 0,[Dea Type]) as [Deal Type]

Master
Master

i want to write in where condition   i dont want alter the column

is there any way?

Master II
Master II

Something like below:

First:
Load  *
Resident Data
Where Len(Trim(Type)) > 0;

Master
Master

am getting  0,-1 in listbox i used above expression in script.

Master II
Master II

Did you used the If() condition as below:

If(Len(Trim([Deal Type])) > 0,[Dea Type]) as [Deal Type]

Master
Master

its working  but.  one question

if i want write with sql  condition how can i achieve this?

like

sql   filed1

field2

Deal_Type 

where is not null             like this how can i do ?

Master
Master

i used this   but still i can see one blank in listbox  what is the wrong here?

where Deal_Type is not null and Deal_Type <>'' and Deal_Type <>'?';

Champion III
Champion III

Did you try like

WHERE Len(Deal_Type) > 0

Partner
Partner

Is it MS SQL database?

There may be spaces here. You need to do a trim function in SQL where clause.