Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone
Can I use Where Clause in Qlikview load bcz its not working in following Script OR I have to use MATCH Qlikview function of plz suggest !! While using this script table not found error is coming .
/***********************Order Table********************/
OrdLab:
LOAD OlTc,
OlYy,
OlChr,
OlNo,
OlSr,
OlQty,
OlSalRt;
SQL SELECT *
OlTc,
OlYy,
OlChr,
OlNo,
OlSr,
OlSrNo,
SUM(OlSalVal)AS LAB,
SUM(OlCstVal)AS CSTLAB
FROM EmrTst.dbo.OrdLab
WHERE OlTc='QT'
GROUP BY OlTc,OlYy,OlChr,OlNo,OlSr ;
Store OrdLab into ..\QVD\OrdLab.Qvd;
Drop Table OrdLab;
Thanks
Vikas Gupta
There's nothing wrong with the QV code. It looks like you forgot to put OISrNo into your GROUP BY clause, and your query is probably failing as a result.
Hi Orsh
No i am not using OISrNo in group by bcz I wants sum it by on only five key .
Thanks
Hi,
Yes, u Missed to put a OISrNO into your Group by clause, hence ur query was getting failed.
~Kabilan K.
So, remove OISrNO column from Select query..
Hi Kabilan
I checked it by adding OISrNO the Issue is that
SUM(OlSalVal)AS LAB,
FROM EmrTst.dbo.OrdLab
WHERE OlTc='QT'
GROUP BY OlTc,OlYy,OlChr,OlNo,OlSr ;
We can not Sum in load stattement using group by.
Thanks
Did u use like below
OrdLab:
LOAD
OlTc,
OlYy,
OlChr,
OlNo,
OlSr,
OlSrNo,
LAB,
CSTLAB ;
SQL SELECT *
OlTc,
OlYy,
OlChr,
OlNo,
OlSr,
OlSrNo,
OlSalVal,
OlCstVal,
SUM(OlSalVal)AS LAB,
SUM(OlCstVal)AS CSTLAB
FROM EmrTst.dbo.OrdLab
WHERE OlTc='QT'
GROUP BY OlTc,OlYy,OlChr,OlNo,OlSr,OlSrNo ;
~Kabilan K.
Hi Vikas,
I think * in your select query causing the problem. Try removing the asterisk and execute the script.
Regards,
Jagan.
Hi Vikas:
Maybe it is because some qlikview function, such as 'AS' for rename, are not available for SQL.
Try using RESIDENT load.
Thanks
PC