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.
sivareddye
New Contributor

how to replace null values with out using resident load

hi,

i have 2 tables

one is master table contains two fields (%BILLINGDOC,sysfillener )two columns,

Another one is vendor table which contains two fields(%SYSLIFNR ,NAME1) , after i joining to tables based on the key column i am get null values in in that place i want replace with 'other_vendor',

My Script is

LOAD

%BILLINGDOC,

       %SYSLIFNR

FROM

(qvd);

left join

LOAD

%SYSLIFNR,

NAME1

FROM

(qvd);

My output will be like this:

Header 1Header 2Header 3
%SYSLIFNR%BILLINGDOC, NAME1
US65416823276-
us34665890670-
us56874474987-
us74084698396-
us73749840865-
us95476879878-
uk45676909889-
us43569078988-
us47987289808vwr
uk53874792389ios
gd46984750070-
us52783479739-
uk38746749801skk

i want  replace null values with 'other_vendor',with out using resident load for master table and apply map also.

Can any one help me on that..

Thanks in advance.

regards

siva reddy

10 Replies
MVP
MVP

Re: how to replace null values with out using resident load

i want  replace null values with 'other_vendor',with out using resident load for master table and apply map also.

That's what I had in mind, using a MAPPING approach. Why do you don't want to consider this?

Re: how to replace null values with out using resident load

Maybe use NullAsValue

SET NullValue = 'other_vendor';

NullAsValue  NAME1 ;

..... your script

NullAsNull  NAME1 ;

hirishv7
Honored Contributor

Re: how to replace null values with out using resident load

Hi,

For field,

If(isnull(Header 3),'Other_Vendor',Header 3) as Header 3

Hope this helps,

Hirish

MVP
MVP

Re: how to replace null values with out using resident load

I still would favour ApplyMap():

Don't join - use Applymap instead

sivareddye
New Contributor

Re: how to replace null values with out using resident load

With apply map, performance is very low. That's why I avoid apply map. Is there any other way to replace null values?

Thanks

sivareddye
New Contributor

Re: how to replace null values with out using resident load

hi

its working but i want to use without resident load of master table.

Re: how to replace null values with out using resident load

I find ApplyMap() high performance.

But when loading from a qvd it will only be a fast optimised load if there is no data manipulation except a single WHERE EXISTS.

So as an ApplyMap()  manipulates data this a non optimised load could be the low performance you have seen.

Why not put the ApplyMap() in the qvd generator and only generate a single qvd ?

sivareddye
New Contributor

Re: how to replace null values with out using resident load

yes that's correct,

but my requirement is not 2 fields in master table i have 500+ columns, if i use apply map or resident load for the single filed i that will affect to entire application .

sivareddye
New Contributor

Re: how to replace null values with out using resident load

Hi Bill,

Thanks for your answer, but i didn't get desired result. if any other ways will be give me that will help a lot.

regards

siva

Community Browser