How to pass type variable in a procedure as IN parameter
CREATE OR REPLACE PROCEDURE APPS."QFJS_LMO_TIMESLOT_PROC"
a_std IN VARCHAR2,
TYPE str_table IS TABLE OF CLOB INDEX BY BINARY_INTEGER;
timeStr OUT str_table;
This is giving error!!
Please help!!
This is what you're looking for? (you can also create the type in your database)
CREATE OR REPLACE PACKAGE APPS.MY_PACKAGE AS
PRAGMA SERIALLY_REUSABLE;
TYPE str_table IS TABLE OF CLOB INDEX BY BINARY_INTEGER;
PROCEDURE "QFJS_LMO_TIMESLOT_PROC"(a_std IN VARCHAR2,
post_std IN VARCHAR2,
a_time IN VARCHAR2,
post_hc IN NUMBER,
pre_hc IN NUMBER,
ods_schedule_date IN DATE,
timeStr IN OUT str_table);
END MY_PACKAGE;
CREATE OR REPLACE PACKAGE BODY APPS.MY_PACKAGE IS
PRAGMA SERIALLY_REUSABLE;
PROCEDURE "QFJS_LMO_TIMESLOT_PROC"(a_std IN VARCHAR2,
post_std IN VARCHAR2,
a_time IN VARCHAR2,
post_hc IN NUMBER,
pre_hc IN NUMBER,
ods_schedule_date IN DATE,
timeStr IN OUT str_table) IS
v_clob clob;
BEGIN
FOR i IN 1 .. timeStr.COUNT LOOP
v_clob := timeStr(i);
END LOOP;
END "QFJS_LMO_TIMESLOT_PROC";
BEGIN
NULL;
END MY_PACKAGE;
BEGIN
APPS.MY_PACKAGE.QFJS_LMO_TIMESLOT_PROC('1','2','3',4,5,sysdate,APPS.MY_PACKAGE.str_table('clob1', 'clob2', 'clob3'));
END;
/ -- Hugs, Philips
Similar Messages
-
How to pass a variable to a procedure at run time
Hi All,
Can anyone give me a brief on how to pass a value to a ODI procedure at run time using option utility in ODI 11g.
Thanks in advance.
Regards,
Sreedhar S.First method of doing :
Simply add anew option to your procedure and then just assign the ODI variable you have created as the value for the option the in your jython code reference the option using the following ODI API method: <%=odiRef.getOption("OPTION_NAME")%>
Second way of doing :
Put the procedure in a package. Go to option tab. Assign a variable to the option. You can declare the variable in the package and pass the value in variable while execution. -
How to pass the variable value to reports as a parameter
hi
i have facing a problem that i want to pass the value of a variable that i had calculate in a procedure like
SELECT nvl(BASIC_PAY,0) INTO v_basic FROM EMP WHERE EMP_ID=P_EMP_ID;
so i want to send the variable value v_basic as a parameter through form to report...and simlarly other variables values which i have calculate in procedure....
need ur help to solve this problem
thanks in advanceit's the exact posting from your last post. Please don't duplicate the postings, so that we can help you in one thread and not so many different threads
-
Pass a variable into a procedure as IN parameter
Need some help from an experienced Oracle Guru. I have a stored procedure, which accept a VARCHAR called fiber_ids as parameter, it will use that variable in a simple query like this:
select * FROM GEOTEL_SOURCE where ID IN (fiber_ids)
the value of fiber_ids could something like 'AMFR00102005','AMFR00102006','AMFR00102007','AMFR00102008','AMFR00102009','AMFR00102010','AMFR00102015','AMFR00102016','AMFR00102017','AMFR00102049'
The thing is that looks like the value of fiber_ids is not resolved into query. if I hardcode its real value there, it works, but it does not use its real value when running the procedure. I'm not an experience Oracle user, Please help. what's wrong with procedure? Thanks a lot!
TimProbably the variable value needs single quotes ('): if hard coding works then this must be the problem. Use a inner PL/SQL block instead of regular SQL statement to overcome the issue for selecting data based on varibale value.
-
How to pass session variable value with GO URL to override session value
Hi Gurus,
We have below requirement.Please help us at the earliest.
How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
Please provide step by step solution.No vague answers.
I followed below steps mentioned.
RPD:
****-> Created a session variable called STATUS
-> Create Session Init block called Init_Status with SQL
select 'ACTIVE' from dual;
-> Assigned the session variable STATUS to Init block Init_Status
authenticationschemas.xml:
Added
<RequestVariable source="url" type="informational"
nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
Report
Edit column "Contract Status" and added session variable as
VALUEOF(NQ_SESSION.STATUS)
URL:
http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
Issue:
When I run the URL above with parameter EXPIRED, the report still shows for ACTIVE only. The URL is not making any difference with report.
Report is picking the default value from RPD session variable init query.
could you please let me know if I am missing something.Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya -
How to pass a variable value into a custom planning function via a web
Can some one tell me
How to pass a variable value into a custom planning function via a web template?
What are the different types of Planning function parameters available and what is the difference between them?
Thanks
babuHi Sutrtha,
Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
Am I missing something?
Regards
B -
How to use bind variables in this procedure
Hi Experts,
How to use bind variables in this procedure for static queries.
PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
IS
BEGIN
V_date DATE;
SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
DELETE FROM MER_CLEAR
WHERE MER_DT < v_date
AND ID = M_ID;
COMMIT;
END;
How to use v_date and m_id as bind variables in this procedure to avoid hard parsing.
Please help me.
Thanks.976208 wrote:
How to use v_date and m_id as bind variables in this procedure to avoid hard parsing.
You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool. -
How to pass a variable more than one values?
How to pass a variable more than one values?
You can't.
During 1 session, 1 ODI variable can have only 1 value at a time.
If you need more than 1 value, you will have to do somethink like a loop inside your package, and refresh the variable value each time. -
How to pass select-option filed to Function Module Exporting Parameter
Hi,
How to pass select-option filed to Function Module Exporting Parameter.
ThanksHi,
DATA: BEGIN OF ITAB5_WRK OCCURS 0,
KUNNR TYPE KNKK-KUNNR, "CUSTOMER #
SBGRP TYPE KNKK-SBGRP, "CREDIT REP
KLIMK TYPE KNKK-KLIMK, "CREDIT LIMIT
NAME1 TYPE KNA1-NAME1, "CUSTOMER NAME
SKFOR TYPE KNKK-SKFOR, "TOTAL A/R
AMT1 TYPE KNKK-SKFOR, "CURRENT
AMT2 TYPE KNKK-SKFOR, "01-30
AMT3 TYPE KNKK-SKFOR, "31-60
AMT4 TYPE KNKK-SKFOR, "61-90
AMT5 TYPE KNKK-SKFOR, "91-120
AMT6 TYPE KNKK-SKFOR, "OVR 120
BZIRK TYPE KNVV-BZIRK,
END OF ITAB5_WRK.
SELECT-OPTIONS P_COMP FOR T001-BUKRS
SELECT KUNNR SBGRP FROM KNKK
INTO TABLE ITAB5_WRK
WHERE SBGRP IN P_REP
AND KUNNR GE '0001000000'
AND SKFOR NE 0.
LOOP AT ITAB5_WRK.
DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
ENDLOOP.
PERFORM GET_CREDIT_LIMITS.
*=======================================================================
IF P_DIST NE SPACE.
LOOP AT ITAB5_WRK.
SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
AND VKORG EQ P_COMP
AND VTWEG EQ '20'
AND SPART EQ '10'
AND BZIRK IN P_DIST.
IF SY-SUBRC EQ 0.
MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
MODIFY ITAB5_WRK.
ELSE.
DELETE ITAB5_WRK.
ENDIF.
ENDLOOP.
ENDIF.
*==============================================================
LOOP AT ITAB5_WRK.
MOVE: 'F/S' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
PERFORM AGING.
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MOVE: 'SPEC' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
*PERFORM AGING.*
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MODIFY ITAB5_WRK.
ENDLOOP.
FORM AGING.
*CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'*
EXPORTING
BUKRS = P_COMP
KKBER = WRK-KKBER
KUNNR = WRK-KUNNR
RASID = 'FEND'
KLIMP = 'X'
IMPORTING
SFAE1 = W_SFAE1
SFAE2 = W_SFAE2
SFAE3 = W_SFAE3
SFAE4 = W_SFAE4
SFAE5 = W_SFAE5
SFAE6 = W_SFAE6
SFAEL = W_SFAEL
SNFA1 = W_SNFA1
SNFA2 = W_SNFA2
SNFA3 = W_SNFA3
SNFA4 = W_SNFA4
SNFA5 = W_SNFA5
SNFA6 = W_SNFA6
SNFAE = W_SNFAE
EXCEPTIONS
NO-AGING_SCHEDULE = 1
NO_TABLE_INPUT = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
WHEN 2.
MESSAGE E999 WITH 'DO NOTHING ??'.
ENDCASE.
ENDFORM. "AGING
Thanks -
How to pass a single character to dll (as a parameter)
How do pass a single character to dll (as a parameter). This is a third party dll that i am unable to change.
e.g.: int functionName(char* process, char myChar);My apoligies, I am trying to pass a char from Teststand. Passing as a char is not one of the Category
I tried sending (for example) : Locals.myChar[0]. Which is acceptable in C++, but gives me an error via Teststand. -
How to pass a variable from HTML to Flash
I have built my flash ad banner in Flash 9 and now want the
HTML code to pass the url over to the flash movie that it should
jump to when clicked.
The info in the help file seems out of date for the latest
HTML template as it uses mainly JavaScript to get round IE's
dreadful embeding issue. So my problem is, how do I pass a variable
from the HTML to the actionScript specified int he Help file
(running on a full screen button) as shown below?
myButton_btn.onRelease = function() {
if (clickTAG.substr(0, 5) == "http:") {
getURL(clickTAG);
via the html code now used by Flash 9 which is like this:
<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Advert_long</title>
<script language="javascript"> AC_FL_RunContent = 0;
</script>
<script language="javascript"> DetectFlashVer = 0;
</script>
<script src="AC_RunActiveContent.js"
language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 115;
// -->
</script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
Coping
with
Growing
Audio
Series
Theraputic stories
for children aged
4 to 9
-->
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion,
requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable
version
// embed the flash movie
AC_FL_RunContent(
'codebase', '
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
'width', '120',
'height', '600',
'src', 'Advert_long',
'quality', 'high',
'pluginspage', '
http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Advert_long',
'bgcolor', '#ffffff',
'name', 'Advert_long',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'Advert_long',
'salign', ''
); //end AC code
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be
placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get
Flash</a>';
document.write(alternateContent); // insert non-flash content
// -->
</script>
<noscript>
// Provide alternate content for browsers that do not support
scripting
// or for those that have scripting disabled.
Alternate HTML content should be placed here. This content
requires the Adobe Flash Player.
<a href="
http://www.macromedia.com/go/getflash/">Get
Flash</a>
</noscript>
</body>
</html>You should use SWFObject to embed your Flash. Not only does
it make
embedding more straightforward, it makes passing query
parameters very easy.
Check out:
http://code.google.com/p/swfobject/
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
How to pass a variable from HTML to Flash 9
I have built my flash ad banner in Flash 9 and now want the
HTML code to pass the url over to the flash movie that it should
jump to when clicked.
The info in the help file seems out of date for the latest
HTML template as it uses mainly JavaScript to get round IE's
dreadful embeding issue. So my problem is, how do I pass a variable
from the HTML to the actionScript specified int he Help file
(running on a full screen button) as shown below?
myButton_btn.onRelease = function() {
if (clickTAG.substr(0, 5) == "http:") {
getURL(clickTAG);
via the html code now used by Flash 9 which is like this:
<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Advert_long</title>
<script language="javascript"> AC_FL_RunContent = 0;
</script>
<script language="javascript"> DetectFlashVer = 0;
</script>
<script src="AC_RunActiveContent.js"
language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 115;
// -->
</script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
Coping
with
Growing
Audio
Series
Theraputic stories
for children aged
4 to 9
-->
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion,
requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable
version
// embed the flash movie
AC_FL_RunContent(
'codebase', '
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
'width', '120',
'height', '600',
'src', 'Advert_long',
'quality', 'high',
'pluginspage', '
http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Advert_long',
'bgcolor', '#ffffff',
'name', 'Advert_long',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'Advert_long',
'salign', ''
); //end AC code
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be
placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get
Flash</a>';
document.write(alternateContent); // insert non-flash
content
// -->
</script>
<noscript>
// Provide alternate content for browsers that do not
support scripting
// or for those that have scripting disabled.
Alternate HTML content should be placed here. This content
requires the Adobe Flash Player.
<a href="
http://www.macromedia.com/go/getflash/">Get
Flash</a>
</noscript>
</body>
</html>You should use SWFObject to embed your Flash. Not only does
it make
embedding more straightforward, it makes passing query
parameters very easy.
Check out:
http://code.google.com/p/swfobject/
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
How to pass many variables to servlet using a URL? Ajax related.
I have 100 text boxes in my JSP and want to pass the values stored in these text boxes to a servlet with out the need for submitting the entire page using AJAX frame work.
I know how to peform the above in ajax if I have only 1 textbox. But how can I do that with 100 text boxes. I don't want to build a huge URL with 100 parameters.
I am thinking may be create an array and send it to the servlet, but don't have an idea if we can do it.
Please help me .You can make a POST request using an XMLHttpRequest, but you won't be "passing many variables using a URL", which seems to be one of your requirements, and which makes your question confounding(after all how do you pass many variables using a URL without putting many variables in the URL):
req.open("POST", url, true)
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
req.send("first=Eric&last=Kaiser"); -
How to pass environment variables to adf application?
Hi,
I Created form function with this settings to open my adf application:
Type : SSWA plsql function
Maint Mode = None
Context : Resp
Web HTML : test.jsp
Web host: 192.168.1.30:8890
This works fine. But how can I pass environment variables as parameters?
I like to pass username and org_id.
Thanks in advanceKdeGraaf,
Sounds real interestign what you are saying. But I don't know what you mean with:"the application server name appended till html folder($COMMON_TOP/html) "
Basically if u make a SSWA jsp function with only jsp name say A.jsp.At runtime the url is automatically converted tohttp://<application server>:<port number>/OA_HTML/A.jsp
By the way $COMMON_TOP/html folder is the location for all jsps' in EBS.
Where can I find some information about making a OAF page wrapper? Because I have totaly now experience with OAF.
Make a OAF page, say page A, in process request of page get all the context data say, responsibility, org etc, and set it in http session.Then redirect the flow to ur ADF application page. If ur new and have no knowledge how do we build a page in OAF, u can download OAF developers guide from metalink. Search old threads u would get get the metalink id.--Mukul -
I want to execute a stored procedure using ssis.But the problem I am having is that there is a table with 200 rows with only
single column.Now i want to execute stored procedure using value one by one from table .once the stored procedure is executed with top value from table i also want to delete that topmost column value and execute with next table value.and store the result in
text file.
please help me..or provide a package.If you want to do it in SSIS, a way to do this is by using For Each Loop as mentioned above.
Create 1 OBJECT type variable (list of values) and one STRING type variable (one value at a time)
Use EXE SQL Task with ResultSet = FULL RESULT SET and query = SELECT COL FROM TABLE ORDER BY COL ASC...output this to the OBJECT type variable
Next, a For Each loop container with Foreach ADO Enumerator, ADO object source variable = Object type variable and map that to String type variable with index = 0.
Within your for each loop container, select another EXEC SQL Task and pass in an input parameter (the String type variable) and query = EXEC PROC ? -- WHERE ? = String type variable.
This will execute your store procedure just for that one value out of the whole list.
Now within the same For Each loop, select another EXEC SQL Task and again pass in an input parameter (the same String type variable) and query = DELETE FROM TABLE WHERE COL = ? -- WHERE ? = the current value
The above process should A) get the list of values from the table B) pick one value at a time and execute the proc and delete and right after delete that value from the table.
Hope this helps.
-- some further investigation/tweaking may require but it should help you get started.
Maybe you are looking for
-
runtime error 91 object variable or With block variable not set Hello Re MSAccess 2013 I receive the error "runtime error 91 object variable or With block variable not set" on the following line below ' Create a new email object Set olMailIte
-
Dear all, In a Single Sales Order haveing 10 Line items...... In that 10 line items.....4 internal,4 External(Vendor),2 items are 3rd party items... I need to do in a single invoice...but in above scenario 8 items are delivery releated billing and 2
-
Internet Directory is 'INVALID' after patch
Dear Friends; I'm very new to Oracle Application server. Please help me on this issue. 1. I installed Application server 10.1.0.2 in RHEL 5.4 32bit 2. Then patched it to 10.1.0.3 (before that infra db is updated to 10.1.0.5 sucessfully.) 3. When I
-
Production Premium CS6 - Can't find in English
Hi, I purchased Production Premium CS6 last year & have my proper paperwork such as the serial number. I want to do a second install on my laptop. I can't find the English version of the setup. Can you tell me the right site? Thank you!!
-
Upgrading Endeca Server data domains from 3.0 to 3.1
Please explain the instructions mentioned below (link for reference where it is mentioned): http://docs.oracle.com/cd/E40518_01/studio.310/studio_migration/toc.htm#Application%20data%20structure%20now%20uses%20data%20sets When you upgrade Endeca Serv