Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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_]
UPDATE a set ID = 1 FROM abctemp a where a. rion =xyz'
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
Can you please share the table structure of Table IDEM & abctemp ?