Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 16th, 2003, 01:22 AM
Registered User
 
Join Date: Jul 2003
Location: , , Bangladesh.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Analytical function and stored procedure

Dear All,
I used LEAD analytical function in following SQL statement.

SELECT SKEW,LEAD(SKEW) OVER(ORDER BY SKEW) AS N_SKEW
FROM tblEVIIIParameter

It works fine in SQL plus prompt. But when I use the same SQL statement in writting a stored procedure I got error message.

The Stored Procedure is as follows

CREATE OR REPLACE PROCEDURE sp_GetParforEVIII(
 io_cursor IN OUT sp_getData.cursor_Data
 )
AS
BEGIN
 OPEN io_cursor FOR
 SELECT SKEW,LEAD(SKEW) OVER(ORDER BY SKEW) AS N_SKEW
 FROM tblEVIIIParameter;
END sp_GetParforEVIII;

Error message is as follows (got during compile the stored procedure)

Errors for PROCEDURE SP_GETPARFOREVIII:

LINE/COL ERROR
-------- -----------------------------------------------------------------
8/29 PLS-00103: Encountered the symbol "(" when expecting one of the
         following:
         , from into bulk

Could you please tell how I can use analytical function in stored Procedure.

Thanks.



  #2 (permalink)  
Old October 20th, 2003, 11:44 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not completly sure about what the function does, but try putting a comma in between
LEAD(SKEW), OVER(ORDER BY SKEW)

Ate Lead and Over the same function?
What results do you get with

SELECT SKEW,LEAD(SKEW) OVER(ORDER BY SKEW) AS N_SKEW
FROM tblEVIIIParameter

How many columns do you get?


Sal
  #3 (permalink)  
Old November 14th, 2003, 01:41 PM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Akmhasan!

Consult
"http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:186812348071"

for help. i think there is everything you are looking for.

bye!
oli

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Procedure muthu555 SQL Server 2000 1 March 5th, 2007 07:13 AM
Maximum stored procedure, function, tirgger error kuku SQL Server 2000 1 November 7th, 2005 03:04 AM
Stored Procedure rajanikrishna SQL Server 2000 0 July 18th, 2005 05:01 AM
Location of Stored Procedure & Function in MySQL kasie MySQL 8 March 22nd, 2005 10:54 AM
C# and stored procedure Msmsn C# 1 August 26th, 2003 11:03 PM



All times are GMT -4. The time now is 09:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.