Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Lead function

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.

20 Replies
Not applicable
Author

Hi Ralf

I am getting the error as Right parenthesis missing.but there is some other error.

rbecher
MVP
MVP

Maybe it's the line break? I see no paranthesis is missing.

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
rbecher
MVP
MVP

I don't have your table and data but I wonder if the column MDATE in the Where Clause should be SDATE?

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
rbecher
MVP
MVP

Ok, you could do this in QlikView in the following way:

1. SELECT the data without the LEAD function but with DESCENDING ordering: ORDER BY SDATE DESC

2.Use the QV function previous( ) on the LOAD statement:

TableA:
LOAD *, previous(SDATETIME) as Newdate;
SQL SELECT .... FROM TABLEA ORDER BY SDATE DESC;


- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Thanks for Support Ralf.

It is MDATE only in the where condition. Hard thing is I will not be able to share the data. But just want to know is there any similar function available in Qlikview.

Not applicable
Author

Hi Ralf,

The same Query is working fine if i am executing in SQL plus. Any Suggestions or Alternative approach for this???

Not applicable
Author

Hope QlikTech Support team can provide the support for this.

rbecher
MVP
MVP

As I wrote before an alternative could be this:

1. SELECT the data without the LEAD function but with DESCENDING ordering: ORDER BY SDATE DESC

2.Use the QV function previous( ) on the LOAD statement:

TableA:

LOAD *, previous(SDATETIME) as Newdate;

SQL SELECT .... FROM TABLEA ORDER BY SDATE DESC;



- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
rbecher
MVP
MVP

Are you using ODBC or OLE?

Which OS version and which Oracle version you have?

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Hi ,

I am using OLEDB Connection and the OS version is Windows 2003. Oracle 10g.