Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Placing of codes in the script to concatenate variables.

Hi, I'm trying to concatenate userMonthnum with Year, usermonth with Year, MonthNum with Year and Month with Year. However, a called field calls the original field from the load statement directly below. How can I concatenate those variables, looking at my current script below? The variables I want to concatenate is in bold. Thanks.

load *, userMonthNum &'/'& Year as uMonthNum,

  usermonth &'/'& Year as uMonth,

  MonthNum &'/'& Year as tMonthnum,

  Month &'/'& Year as tMonth;

  

LOAD * INLINE [

    userMonthNum, usermonth

    01, Jan

    02, Feb

    03, Mar

    04, Apr

    05, May

    06, Jun

    07, Jul

    08, Aug

    09, Sep

    10, Oct

    11, Nov

    12, Dec

];

LOAD * INLINE [

    MonthNum, Month

    01, Jan

    02, Feb

    03, Mar

    04, Apr

    05, May

    06, Jun

    07, Jul

    08, Aug

    09, Sep

    10, Oct

    11, Nov

    12, Dec

];

load *, date([userPrint_Month],'MM') as userMonthNum;

load *,If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',[Print Month]) as userPrint_Month,

    date([Print Month],'MM') as MonthNum;


load *,date(MonthStart([Print Date]),'MM/YYYY') as [Print Month],

    If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',DESCRIPTION) as Description,

    If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',SITEID) as [Site ID],

    If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',PURCHASEAGENT) as [Purchase Agent],

    If(DESCRIPTION like 'U*' Or DESCRIPTION like 'u*',REQUESTEDBY) as [Requested By],

    Year([Print Date]) as Year;

     

LOAD

     .

     .

     .

     .

     .

     .

     RFQNUM,

     DESCRIPTION,

     SITEID,

     REQUESTEDBY

     PURCHASEAGENT,     

     PRINTDATE,

     date(floor(timestamp#(Replace([PRINTDATE],' ',' '), 'DD.MM.YYYY hh:ss:mm'))) as [Print Date]    

FROM

<filename>

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

0 Replies