Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

If then else with load

Hi Guys,

why does not this work? It must here load from PARTNER_HIST_FR.qvd because month <> 2. It still loads from PARTNER_FR.qvd

(qvd);

why?

if month(today()=2) then

table:

LOAD MANDANT,

     ID_PARTNER,

     PARTNER_ROLLE,

     PARTNER_KURZBEZ,

     ARCHIV_KZ,

     SACHB_KZ,

     AEN_DATUM

PARTNER_FR.qvd

(qvd);

else

table:

LOAD MANDANT,

     ID_PARTNER,

     GUELTIG_VON,

     GUELTIG_BIS,

     PARTNER_BEZ,

     ID_PERSON,

     DEBITORNUMMER,

     KREDITORNUMMER,

     EXTID_PARTNER,

     ARCHIV_KZ,

     SACHB_KZ,

     AEN_DATUM

FROM

PARTNER_HIST_FR.qvd

(qvd);

end if

2 Replies
MVP
MVP

If then else with load

Hi Sravan,

Try like this

LET vTemp = If((Month(Today()) * 1) = 2, 'PARTNER_FR.qvd', 'PARTNER_HIST_FR');

Temp:

LOAD *

FROM

$(vTemp)

(qvd);

Hope this helps you.

Regards,

Jagan.

Not applicable

If then else with load

Hi,

try with this

if month(today())=2 then

----

this will work I think :-)

Community Browser