Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm new in QlikView . Can you help me to adapt this SQL for QlikView?
PEDIDOS FINALIZADOS:
SELECT IPD_NUMPED FROM ITPEDIDOS
WHERE IPD_CDEMP = 1
AND IPD_TPPED = 'V'
GROUP BY IPD_NUMPED
HAVING SUM(IPD_BASE) > 0
PEDIDO PENDENTE TOTAL (NENHUMA QUANTIDADE ENTREGUE)
SELECT IPD_NUMPED FROM ITPEDIDOS
WHERE IPD_CDEMP = 1
AND IPD_TPPED = 'V'
GROUP BY IPD_NUMPED
HAVING SUM(IPD_QTDENT) =0 AND SUM(IPD_BASE) = 0
Thanks.
Hi,
Thanks for clarifying! Here we go...
Bad News: There is NO Having clause in QlikView
Good News: We can still solve this by using Where clause and the Preceding Load.
I've made a video tutorial sometime back and hopefully it will answer your question.
http://qlikshare.com/qlikview-video-tutorial-clause-qlikview/
However, you syntax will look something like this...
//This is Preceding Load
LOAD
*
WHERE IPD_BASE >0;
// This is main Load
LOAD
IPD_NUMPED,
SUM(IPD_BASE) AS IPD_BASE
From ITPEDIDOS
WHERE
PD_CDEMP = 1
AND IPD_TPPED = 'V'
FROM TableName
GROUP BY IPD_NUMPED;
I hope this helps!
Cheers,
DV
Create connection string using OLeDb and use direct below query
and reload it will give your result
Hi,
in the first query you are selecting only a field (IPD_NUMPED).
Try with select * from....
Hi,
Not sure what you mean by adapt in QlikView? Do you want to re-write the same query in QlikView or do you want to use the SQL query in QlikView? Please clarify.
Thanks,
DV
www.QlikShare.com
Hi,
Deepak, I want to re-write the same query in QlikView. This query returns a message to the User: "Pedido Finalizado" and need to do the same in QlikView
Hi,
Thanks for clarifying! Here we go...
Bad News: There is NO Having clause in QlikView
Good News: We can still solve this by using Where clause and the Preceding Load.
I've made a video tutorial sometime back and hopefully it will answer your question.
http://qlikshare.com/qlikview-video-tutorial-clause-qlikview/
However, you syntax will look something like this...
//This is Preceding Load
LOAD
*
WHERE IPD_BASE >0;
// This is main Load
LOAD
IPD_NUMPED,
SUM(IPD_BASE) AS IPD_BASE
From ITPEDIDOS
WHERE
PD_CDEMP = 1
AND IPD_TPPED = 'V'
FROM TableName
GROUP BY IPD_NUMPED;
I hope this helps!
Cheers,
DV
Thank you for the help! I'll watch the video ...
Thank you Deepak, I got the result I needed!!
I'm glad to know that you got it working. Good luck!
Cheers,
DV
www.QlikShare.com