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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sql script in qlikview

How to convert SQL alter and update statement in qlikview

like e.g.

1.....

Alter table abctemp ADD [Code] varchar(50);

Go

Alter table abctemp ADD [rion] varchar(50);

Go

Alter table abctemp ADD [ID] varchar(2);

Go

2....

UPDATE A

SET  CODE = [  Value  ]

FROM abctemp A

LEFT OUTER JOIN IDEM B ON A.Code = B.[No_]

UPDATE A

SET rion = [Name] FROM abctemp A

LEFT OUTER JOIN IDEM B ON A.Code = B.[No_]

UPDATEset ID = 1    FROM abctemp a where a. rion =xyz'

2 Replies
Anonymous
Not applicable
Author

You just add the field, based on left join.

2.  left join (abctemp)

          Load No_  as Code,

                   [ Value ] as CODE,

                   Name as rion

               resident IDEM;

resident or From SQL select * from IDEM; if you are reading directly from database.

left join(abctemp)

        Load No_ ,

        1 as ID

resident abctemp

where rion='xyz';


If you want to update again, once that are defined in the table, use this:


Step 1:

rename field ID as ID_old


left join (A)

         Load Key, -- the one from join

                 ID_new

        resident B;

drop table B;


Step2:

Noconcatenate

Temp:

    Load *, if( isnull(ID_new), ID_old, ID_new) as ID

Resident A;


Drop field ID_new, ID_old;


Best regards,

Cosmina
      

      

Kushal_Chawda

Can you please share the table structure of Table IDEM & abctemp ?