Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

shashank20
New Contributor III

concat problem in script

Hi Geniuses,

When I am concatenating 20 with one column it gave me wrong result. Below is the script

LOAD 

    '20' & Right([Fiscal Year],2) AS FY ,

     [Fiscal Year]

FROM

[..\..\QVD_DATA\ETG\S_E_Bookings.qvd]

(qvd)

where Fiscal Year is FY10, FY11,FY12,FY13

The desired result is 2010,2011,2012,2013

Result which I am Getting 20,2010,2011,2012,2013

I want to remove that unwanted 20

Thanks in advance

S

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: concat problem in script

What is the Fiscal Year value for the record you get 20 in FY (just select 20 in FY and look at the other field)?

I assume it's NULL.

You can check for NULL like

LOAD 

    if(len(trim([Fiscal Year])), '20' & Right([Fiscal Year],2) ) AS FY ,

     [Fiscal Year]

FROM

[..\..\QVD_DATA\ETG\S_E_Bookings.qvd]

(qvd)

4 Replies
MVP
MVP

Re: concat problem in script

What is the Fiscal Year value for the record you get 20 in FY (just select 20 in FY and look at the other field)?

I assume it's NULL.

You can check for NULL like

LOAD 

    if(len(trim([Fiscal Year])), '20' & Right([Fiscal Year],2) ) AS FY ,

     [Fiscal Year]

FROM

[..\..\QVD_DATA\ETG\S_E_Bookings.qvd]

(qvd)

Employee
Employee

Re: concat problem in script

It seems you have one (or more) record with NULL into [Fiscal Year] field

Not applicable

Re: concat problem in script

Hi,

Check out the Solution given in the below file

Nothing Changes required.

hope it helps you.

Regards,

Ravikant

shashank20
New Contributor III

Re: concat problem in script

Thanks a lot swehl, it worked

Community Browser