Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am new to QlikView and trying to learn every little concept of QV. It would be great if you could help me get the folwoing results
INPUT:
LOAD * INLINE
[
Id, UserName, Salary, Updated
12, William, 250$, 1/1/2015
13, Fox, 30$, 1/1/2015
12, William,, 650$, 5/5/2015
13, Fox , 50$, 5/5/2015
14, Rose, 2500$, 5/12/2015
23, Praj, 12$, 5/17/2015
14, Rose, 3000$, 3/1/2015
12, William, 525$, 5/1/2015
];
OUTPUT
Using Where Exists() it should add up below coulumns to the above table (only those columns which are not represent in the table )
LOAD * INLINE
[
Id, UserName, Salary, Updated
49, Hofer, 330$, 1/1/2015
50, Lise,, 650$, 5/5/2015
12, William, 750$, 1/1/2015
46, Ray, 330$, 1/1/2015
52, Wokem,, 650$, 5/5/2015
];
Thanks for being my guide to learn QV
Try this script:
INPUT:
LOAD *,
Id&'|'&UserName as Check;
LOAD * INLINE
[
Id, UserName, Salary, Updated
12, William, 250$, 1/1/2015
13, Fox, 30$, 1/1/2015
12, William, 650$, 5/5/2015
13, Fox , 50$, 5/5/2015
14, Rose, 2500$, 5/12/2015
23, Praj, 12$, 5/17/2015
14, Rose, 3000$, 3/1/2015
12, William, 525$, 5/1/2015
];
Concatenate(INPUT)
LOAD * INLINE
[
Id, UserName, Salary, Updated
49, Hofer, 330$, 1/1/2015
50, Lise, 650$, 5/5/2015
12, William, 750$, 1/1/2015
46, Ray, 330$, 1/1/2015
52, Wokem, 650$, 5/5/2015
]
Where not Exists(Check, Id&'|'&UserName);
DROP Field Check;
I tried implementing this
INPUT:
LOAD * INLINE
[
Product,ProdName, Price, Updated
123, Watch, 150$, 1/1/2015
134, Fruit, 30$, 1/1/2015
145, Ring, 3000$, 3/1/2015
123, Watch, 125$, 5/1/2015
123, Watch, 119$, 5/5/2015
134, Fruit , 50$, 5/5/2015
145, Ring, 2500$, 5/12/2015
234, Pen, 12$, 5/17/2015
312, Jeans, 50$, 6/9/2015
];
OUTPUT:
LOAD * INLINE
[
Product, ProdName, Price, Updated
123, Watch, 150$, 1/1/2015
345, Mobile, 250$, 6/1/2015
789, Wallet, 70$, 7/1/2015
]
WHERE NOT EXISTS(Product);
Try this script:
INPUT:
LOAD *,
Id&'|'&UserName as Check;
LOAD * INLINE
[
Id, UserName, Salary, Updated
12, William, 250$, 1/1/2015
13, Fox, 30$, 1/1/2015
12, William, 650$, 5/5/2015
13, Fox , 50$, 5/5/2015
14, Rose, 2500$, 5/12/2015
23, Praj, 12$, 5/17/2015
14, Rose, 3000$, 3/1/2015
12, William, 525$, 5/1/2015
];
Concatenate(INPUT)
LOAD * INLINE
[
Id, UserName, Salary, Updated
49, Hofer, 330$, 1/1/2015
50, Lise, 650$, 5/5/2015
12, William, 750$, 1/1/2015
46, Ray, 330$, 1/1/2015
52, Wokem, 650$, 5/5/2015
]
Where not Exists(Check, Id&'|'&UserName);
DROP Field Check;
Works for me. Do you actually have a question you'd like to ask us?
Hi Sunny and Gysbert,
Thanks for your response and adding up to my knowledge base. It also works for me. As of I have no such questions but I will surely keep posting my queries to learn more under your and community's guidance.
Thanks again,
Robin