Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
oracle Lead function is not working in the Edit Script section. I am using Qlikview 9.00 SRS 6.0 version. Please suggest any body has tried this.
It works fine. I tried on v9 SR6 via ODBC. Maybe your SELECT is wrong or it's an OLE problem.
Could you post a script excerpt?
- Ralf
Hi Ralf,
I am using the below Query. Please correct me if i am wrong
SQL SELECT
"ID",
(TO_CHAR((TO_DATE('01/01/1970 00:00:00', 'MM/DD/YYYY HH24:MI:SS') + ((SDATE)/(60*60*24))))) As SDATETIME,
Lead((TO_CHAR((TO_DATE('01/01/1970 00:00:00', 'MM/DD/YYYY HH24:MI:SS') + ((SDATE)/(60*60*24)))))) OVER (ORDER BY (TO_CHAR((TO_DATE('01/01/1970 00:00:00', 'MM/DD/YYYY HH24:MI:SS') + ((SDATE)/(60*60*24)))))) as Newdate
FROM TABLEA
WHERE ID=1 AND SUS =5 AND (TO_CHAR((TO_DATE('01/01/1970 00:00:00', 'MM/DD/YYYY HH24:MI:SS') + ((MDATE)/(60*60*24)))))>=(TO_DATE('01/01/2011 00:00:00','MM/DD/YYYY HH24:MI:SS'));
Hi,
QlikView works like this:
Load Fieldname, ..,
Function(fieldname) As fieldname2;
SQL Select *
from Table
Where ...;
that means you have to enter the function into the Load-statement not into the SQL Select!
Martina,
LEAD is an Oracle function...
- Ralf
Hi Ralf,
Can u please help me on this.
Sure, I would do it in a different way, inside out:
LEAD(SDATE) OVER(ORDER BY SDATE)
..and make the calculation outside.
- Ralf
Btw, the LEAD part of your statement is working on my site in QV 9.
So, did you try the query against the database?
- Ralf
Hi Ralf,
I have used the way you had given in the previous Query.It is just the conversion within the date. I am getting missing parenthesis error. I am also using the Qlikview 9.00 SRS 6.00 version. Can u post the complete sql statement of my Sql Query.
Thanks for your response.
Yes i did except lead function the Query is running Fine without error. Is there any equivalent function for lead in Qlikview