Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 14th, 2012, 02:16 PM
imchi imchi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 171 imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 5 h 37 m
Reputation Power: 26
Inline pragma before cursor

Hi,

I have a stored proc that calls a user-defined function "fun" like this (greatly simplified):

Code:
procedure foo(p_cursor out ref cursor)
begin
  open p_cursor for
  select a.*
  from a
  where fun(a.b) = 1
end foo;


I want to call fun with "pragma inline(fun, 'YES')".
According to the Oracle documentation, the inline pragma will affect only the following statements if placed right before them:

Code:
Assignment 	CASE 	EXIT-WHEN
Call 	CONTINUE-WHEN 	LOOP
Conditional 	EXECUTE IMMEDIATE 	RETURN


So, in my case, where should I put the pragma? I do have a call, but it's wrapped in the SQL within a cursor definition.
What is the right way (if this is feasible at all)?

Thanks.

Reply With Quote
  #2  
Old September 16th, 2012, 09:23 PM
spacebar208's Avatar
spacebar208 spacebar208 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: spaceBAR Central
Posts: 191 spacebar208 User rank is Sergeant Major (2000 - 5000 Reputation Level)spacebar208 User rank is Sergeant Major (2000 - 5000 Reputation Level)spacebar208 User rank is Sergeant Major (2000 - 5000 Reputation Level)spacebar208 User rank is Sergeant Major (2000 - 5000 Reputation Level)spacebar208 User rank is Sergeant Major (2000 - 5000 Reputation Level)spacebar208 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 9 h 59 m
Reputation Power: 41

Reply With Quote
  #3  
Old September 17th, 2012, 09:35 AM
imchi imchi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 171 imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level)imchi User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 5 h 37 m
Reputation Power: 26
Quote:
Originally Posted by spacebar208



Thank you for the answer and the links. What I was trying to figure out is whether the inline pragma should be placed within the procedure just before the SQL with the function call, or before calling the procedure itself. I'll keep digging.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Inline pragma before cursor

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap