Plsql function error in computation
Hi Friends,
I have the below plsql function which is throwing error.
The below function is written in Apex, so kindly let me know how to resolve this error
The below query checks the existing value and if null assigns a value by select statement. else will assign it back to the variable. I am not getting how to set the value dynamically using the select statement
Function:
BEGIN
IF
:P1_VARIABLE_NAME IS NULL THEN :P1_VARIABLE_NAME:=select .... from .... (which returns a string value)
ELSE
:P1_VARIABLE_NAME
END
END
Error:
Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe
Hi Kiran,
I followed the query you mentioned and I am now getting the follwing below error:
ORA-06550: line 7, column 3: PLS-00110: bind variable 'P1_VARIABLE_NAME' not allowed in this context ORA-06550: line 9, column 1: PLS-00103: Encountered the symbol "END" when expecting one of the following: ; The symbol ";" was substituted for "END" to continue.
Note that I am using the PLSQL function block to fetch the data in the computation section of Apex.
Similar Messages
-
Error while trying to access a SSWA PLSQL function
Hi,
I am trying to access a report as a web page by defining the function as follows :
Type : SSWA PLSQL FUNCTION
HTML Call : OracleOASIS.RunReport
Parameters : report=EMPDET
This function is attached to the menu and when I try to access the page I get this error.
"Error: The requested URL was not found, or cannot be served at this time.
Incorrect usage."
The URL that shows in the page is as follows(<server:port> I removed the server name and port) :
http://<server:port>/dev60cgi/rwcgi60?GDEV_APPS+DESFORMAT=HTML+SERVER=GDEV_APPS+report=EMPDET+p_session_id=A9C71A70B9B1D9BD2DCC0FC3AF9BC324+p_user_id=1133+p_responsibility_id=50230+p_application_id=800+p_security_group_id=0+p_language_code=US+NLS_LANG=AMERICAN_AMERICA+NLS_DATE_FORMAT=DD-MON-RRRR+NLS_NUMERIC_CHARACTERS=.%2C+NLS_DATE_LANGUAGE=AMERICAN+NLS_SORT=BINARY+paramform=NO
Surprisingly other functions which are defined in this manner work fine. Do I need to register my report anywhere or are there any other settings I need to do for the report to show up.
Can someone let me know.
ThanksHi ;
pelase check below which could be similar error like yours
Troubleshooting of Runtime Errors of Customer Intelligence Reports [ID 284829.1]
Regard
Helios -
Hi Friends,
I have the below plsql function which is throwing error.
The below function is written in Apex, so kindly let me know ow to resolve this error
The below query checks the existing value and if null assigns a value by select statement. else will assign it back to the variable.
Function:
BEGIN
IF
:P1_VARIABLE_NAME IS NULL THEN :P1_VARIABLE_NAME:=select .... from .... (which returns a string value)
ELSE
:P1_VARIABLE_NAME
END
END
Error:
Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipePradeep wrote:
No I am creating a PLSQL function body option to write the above query. Is there a way in apex to dynamically bind the valueApex function bodies support bind variables. For example, you can set the rendering condition of an Apex region to a function body and code it as follows:
if :P1_SOMEVAR = MySchema.MyFunction( :P1_SOME_OTHERVAR ) then
return( true );
else
return( false );
end if;Where the bind variables used are standard Apex page item (variables).
I also suggest that if your questions are Apex related and not specifically PL/SQL and SQL language related, you rather ask your questions in the OTN Apex forum and not here. -
Error ERR-9131 Error in PLSQL function body for item default code, item=P24
Hi All,
Am getting the below error in my page 24
ORA-01403: no data found
Error ERR-9131 Error in PLSQL function body for item default code, item=P24_REQ_BY_ID
OK
I dont know what to do?:(
Suddenly am getting this error in the page.
Can anyone help me to understand why this error is coming?
Thanks & Regards,
Ramya
Edited by: 901942 on Jan 29, 2012 10:16 PMData stored in these tables is different. If Oracle says that there's no record that satisfies the WHERE condition, why do you think that it lies? It is too stupid to do that.
Therefore, you need to handle the exception. There are several ways to do it. Here are some of them.
The first one is the most obvious - EXCEPTION handling section.
DECLARE
default_value VARCHAR2(100);
BEGIN
SELECT ISID INTO default_value
FROM USER_TBL
WHERE UPPER(ISID) = UPPER(:APP_USER);
RETURN default_value;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN (null); -- or whatever you find appropriate
END;Another one is to use aggregate function (MAX is a good choice) as it won't return NO-DATA-FOUND, but NULL:
DECLARE
default_value VARCHAR2(100);
BEGIN
SELECT MAX(ISID) INTO default_value
FROM USER_TBL
WHERE UPPER(ISID) = UPPER(:APP_USER);
RETURN default_value;
END; -
Computation using plsql function body
Apex 4.2 linux 11gR2
I am trying to compute a value based on existing data in DB
Using apex functionality, pl/sql function body to compute AFTER SUBMIT
declare
c number(4);
temp NUMBER(11,2);
temp1 NUMBER(11,2);
--P11_CURRENT_MONTH_EST_TO_DATE NUMBER(11,2);
begin
select count (*) into c
FROM REVENUE_ANNUAL
where COMPANY_ID=:P11_COMPANY
and period=:P11_PERIOD;
dbms_output.put_line(c);
if c>0 then
SELECT CURRENT_MONTH_BILLED_TO_DATE
into temp
FROM REVENUE_ANNUAL
where COMPANY_ID=:P11_COMPANY
and period=:P11_PERIOD;
--dbms_output.put_line(temp);
:P11_X :=:temp;
:P11_CURRENT_MONTH_EST_TO_DATE := temp*0.19;
--dbms_output.put_line(P11_CURRENT_MONTH_EST_TO_DATE);
end if ;
end ;
block is executed successfully in sql dev but on insert in apex , it never returns a value.
Your Help is appreciated.
Edited by: Hunk09 on Apr 23, 2013 4:04 PM
Edited by: Hunk09 on Apr 23, 2013 4:06 PMIf your computation type is "PL/SQL Function Body", then you need to add something like this to your procedure.
return temp;which will set whatever item you've associated with your computation to the variable "temp" in session state. -
Can't load XRE function error. I uninstalled Firefox but now it says my security setting will not allow me to install Firefox.
See:
*http://kb.mozillazine.org/Browser_will_not_start_up#XULRunner_error_after_an_update
*[[/questions/880170]] -
Jobs gets hanged when a call is made to PLSQL function in Data Services XI
Hi,
I am facing the below issue after migration of BODI 11.7 to BODS XI 3.1.
The job is not proceeding after the below mentioned statements.
print('before call');
$is_job_enable=DS_TEST.TEST.MY_PKG.IS_JOB_ENABLED(job_name());
print($is_job_enable);
MY_PKG.IS_JOB_ENABLED plsql function will return Number.
$is_job_enable is a global variable declared as decimal (10, 0).
This Job works fine in Data Integrator 11.7.3 version and gets handed in Data Services XI 3.1.
I tried changing the global variable $is_job_enable to int and created new data sources before doesn't solve the problem. Can anyone tell me what is the issue?
Thanks & Regards
Maran MK
The trace file says
5260 3284 JOB 5/5/2009 4:43:17 AM Job <TEST_JOB> is started.
5260 3284 PRINTFN 5/5/2009 4:43:17 AM before call
5260 3284 SP 5/5/2009 4:43:18 AM Stored procedure call <MY_PKG.IS_JOB_ENABLED> is started.
5260 3284 SP 5/5/2009 4:43:18 AM SQL query submitted for stored procedure call <MY_PKG.IS_JOB_ENABLED> is: <BEGIN :AL_SP_RETURN :=
5260 3284 SP 5/5/2009 4:43:18 AM "TEST"."MY_PKG"."IS_JOB_ENABLED"("P_JOB_NAME" => :P_JOB_NAME); END;
5260 3284 SP 5/5/2009 4:43:18 AM >.
5260 3284 SP 5/5/2009 4:43:18 AM Stored procedure call <E> input parameter <P> has value of <TEST_JOB>.
5260 3284 SP 5/5/2009 4:43:18 AM Stored procedure call <E> return value is <1.0000000>.
5260 3284 SP 5/5/2009 4:43:18 AM Stored procedure call <MY_PKG.IS_JOB_ENABLED> is done.
The below error occurs only in Windows and not in Linux environment.
5260 3284 SYS-170101 5/5/2009 4:43:21 AM |Session TEST_JOB
5260 3284 SYS-170101 5/5/2009 4:43:21 AM System Exception <ACCESS_VIOLATION> occurred. Process dump is written to <E:\Program Files\Business Objects\Data
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Services\log\BODI_MINI20090505044318_5260.DMP> and <E:\Program Files\Business Objects\Data
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Services\log\BODI_FULL20090505044318_5260.DMP>
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Process dump is written to <E:\Program Files\Business Objects\Data Services\log\BODI_MINI20090505044318_5260.DMP> and
5260 3284 SYS-170101 5/5/2009 4:43:21 AM <E:\Program Files\Business Objects\Data Services\log\BODI_FULL20090505044318_5260.DMP>
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Call stack:
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00CA9EAB, ActaDecimalImpl<RWFixedDecimal<RWMultiPrecisionInt<3> >,RWMultiPrecisionInt<3>,ActaDecimal28,char
5260 3284 SYS-170101 5/5/2009 4:43:21 AM [29]>::operator=()0315 byte(s), x:\src\rww\actadecimalimpl.cpp, line 13140004 byte(s)
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00D8A267, Convert()+0999 byte(s), x:\src\eval\calc.cpp, line 0303
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBF9E0, XVal_cast::compute()+0272 byte(s), x:\src\core\compute.cpp, line 1664
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBC239, XStep_assn::execute()+0057 byte(s), x:\src\core\step.cpp, line 0069
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBB30D, XStep_sblock::execute()+0029 byte(s), x:\src\core\step.cpp, line 0707
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBB30D, XStep_sblock::execute()+0029 byte(s), x:\src\core\step.cpp, line 0707
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBE0BC, XPlan_spec::execute()+0348 byte(s), x:\src\core\plan.cpp, line 0082
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DC5EA0, XPlan_desc::execute()+0336 byte(s), x:\src\core\xplan.cpp, line 0153
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBD68E, XPlan_spec::compute()0206 byte(s), x:\src\core\plan.cpp, line 01450011 byte(s)
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00DBD891, XPlan_spec::compute()+0225 byte(s), x:\src\core\plan.cpp, line 0244
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:0074533A, AE_Main_Process_Options()+31498 byte(s), x:\src\xterniface\actamainexp.cpp, line 3485
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:00747EDA, AE_Main()1498 byte(s), x:\src\xterniface\actamainexp.cpp, line 07680030 byte(s)
5260 3284 SYS-170101 5/5/2009 4:43:21 AM 001B:004029F9
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Registers:
5260 3284 SYS-170101 5/5/2009 4:43:21 AM EAX=0000000E EBX=03E392E0 ECX=04B455A0 EDX=012346D8 ESI=02B75D88
5260 3284 SYS-170101 5/5/2009 4:43:21 AM EDI=04B455A0 EBP=00212738 ESP=002124BC EIP=00CA9EAB FLG=00210206
5260 3284 SYS-170101 5/5/2009 4:43:21 AM CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Exception code: C0000005 ACCESS_VIOLATION
5260 3284 SYS-170101 5/5/2009 4:43:21 AM Fault address: 00CA9EAB 01:00585EAB E:\Program Files\Business Objects\Data Services\bin\acta.dllHi Manoj & Tiji,
Thanks for your comments. Please find the below outcome.
print($is_job_enable); -- is not executed if PLSQL function is called.
I changed $is_job_enable to VARCHAR, still the same issue.
I created new project and executed the same in new job, still the same issue (all objects are new except Datastore).
The dmp happens only when we the PLSQL function is called. I commented the Function call, the execution proceeds further but got hanged in other PLSQL function call (different than the 1st one)
Is this bug in 12.1?
Can you tell any Hot fix available? If possible please give me the SAP Notes Number.
Is there any other way to execute the PLSQL functions/procedures in 12.1?
Thanks
Maran MK -
How to register database plsql function in obiee
Hi,
I've a database plsql function which accepts two date arguments - StartDate and EndDate and return Integer.
I discoverer like we've Plsql function registration tool, where we import function and pass parameter values as arguments in report- how same can be done in Oracle BI Administration tool and BI Answers?
I tried to create logical column as
EVALUATE('YOUR_FUNCTION(%1, %2, %3, %4)' as varchar(20),@{p_1},@{p_2},@{p_3},@{p_4})
it is giving syntax error.
url: How to store OBIEE presentation level variable values in DB
Please help. It is really urgent.
Kind Regards.Hi,
I created 2 session variables p_startym and p_endym of char datatype and called in function(name: RepInitDates). It looks like:
EVALUATE('INIT_DATES_MONID(%1, %2)' AS INTEGER , VALUEOF(NQ_SESSION."p_startym"), VALUEOF(NQ_SESSION."p_endym")).
Now I've presentation variables StartMonth and EndMonth in bi answers report, whose value i want to pass to p_startym and p_endym. What should be the syntax of Bi answers column? Please reply.
Thanks -
How to invoke PLSQL function result using SPEL for Rendered Property.
Hi All
I have requirement in Iprocurement to show a warning message in Shopping cart page when user click on the Add to Cart Button and irrespective of the warning message it should allow the user to continue to the next screen. We have 5 different stores in ShoppingHomePG and all of them lead to same screen for user date entry when we click on the store. But my requirement is to show a warning message for only one store.
I created a TIP and showing a warning message on the screen. But this message is showing up for all the stores. I want to show only for one store.
I have a SQL query to identify the store Name and I can return true or false value using plsql function. I am thinking there may be an option to invoke the plsql function boolean value using SPEL. Kindly suggest me how to acheive this.
If my understanding is wrong about PL/SQL funciton with SPEL. Please point me in right direction to achive this requirement.
OA Framework version : 11.5.10.5RUP
Thank You!
Krishnathis is an error when i connect to application server by jdeveloper
Error getting OC4J Process for: opmn-home+oc4j-test130.pythis-vpmn.com-6202-default:
Too few bytes (7) received from OPMN response -
Error creating computer-to-computer network
Hello all, is there a fix for this issue yet?
Creating computer-to-computer networks over Airport is broken in SL for many many users!
Ad-hoc networking over wifi is essential for many iphone applications, come on Apple, sort this out?Ok, thanks ... So Apple doesn't actually read these boards?
I've perused the numerous pages of numerous threads about the problem, and seen the numerous unhelpful replies.
Sorry, but i'm not cool with this. Apple has progressively crippled my computer's functionality with firmware/software updates. First it was the superdrive, (firmware borked by update, had to be replaced) now ad-hoc networking. These are known issues which have affected thousands of people, and have been discussed in these boards extensively. Discussions are often marked as "Solved" and locked down, when it is clear that the only solution is replacement of affected hardware as it is simply not supported by Apple anymore. This is a tactic to force people to buy new Macs. Several Mac users I know do not tinker, they just want ti to work, so they tend to buy a new Mac every 2-3 years because the "old" one has slowed down (usually due to a full hard drive) - or - in some cases, they accepted an Apple update.
The iPhone is a premium smartphone and its wifi connectivity with the Mac is much advertised. Guess what, it doesn't work for many who upgraded to Snow Leopard- yeah, "Error creating computer-to-computer network"
There is no solution other than replacing the laptop's Airport card (an operation too daunting for most users) or messing around wih windows Atheros firmware flashers . For most people it really means go back to Leopard, and if you don't know how to do that and your machine is out of warranty, tough.
I'm sorry if this isn't the place for complaining, i have already contacted Apple about it but the site says told not to expect a response. Maybe if enough people have the sme issues and make enough noise something can be done.
This must be a very easy thing to fix in the OS but the fix is probably blocked by some policy to accelerate the obsolescence of Macs. Sooner rather than later, your Mac wil be "legacy". -
I just updated to itunes 10.3 & iOS 6.1 and I cannot download a song to my library! I get the error "This computer is already associated with an Apple ID. You can download past purchases on the computer with just one apple ID every 90 days. This computer can be used with a different Apple ID in 75 days." WHAT??
I've never had problems before - my husband and I have used the same library for years. My daughter also has her own Apple ID... are we going to have trouble with that, too? Actually we have 4 Apple IDs - somewhere around 8 Apple devices... this is a huge issue for us... HELPJust to be clear - I just bought a new song and can't download it into the library because of this error message.
-
How can I call a plsql function from an attribute?
I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
How can I call to my function from the attribute and display the returnes value in the page?
Thanks.Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
How can I return the sequence value to my attribute?
Thanks. -
Is there a way to hide a function error indicator in a print view?
I've got a numbers report with a function error and I was wondering if there's a way to hide the exclamation point when printing it out? Not trying to hide something, just to avoid displaying an error when its unimportant.
Thanks!Tim,
You might try including the IFERROR function in your expression. This will suppress the error message.
Jerry -
'setProgress is not a function' error while setting the progress of a progress bar manually
I want to set value of a progress bar in an accordian but I am encountering 'setProgress is not a function' error. Any idea what's wrong with following code.
Observation:
If I move the progress bar out of the Accordian then the error goes away and the progress bar appears fine.
I want to set the progress bar eventually to {repMonitor.currentItem.threatLevel} but for now I am just testing with hypothetical threat value i.e 60
<mx:Accordion id="monAccordian" includeIn="Monitoring" x="10" y="10" width="554" height="242" change="monAccordianChange()" >
<mx:Repeater id="repMonitor" dataProvider="{monitoringArray}">
<mx:Canvas width="100%" height="100%" label="{repMonitor.currentItem.firstName+' '+ repMonitor.currentItem.lastName}" >
<mx:Image x="10" y="10" source="{repMonitor.currentItem.imageName}" width="175" height="118"/>
<s:Label x="200" y="14" text="Threat Level:"/>
<mx:ProgressBar x="200" y="30" mode="manual" label="" id="bar" width="200" creationComplete="bar.setProgress(60,100);" />
</mx:Canvas>
</mx:Repeater>
</mx:Accordion>Okay.. Thanks.
On another forum I ve been told that I need to use getRepeaterItem. How can I use it to set my progress bar such the value of progress may be taken from repMonitor.currentItem.threatLevel? -
Downloaded new version itunes to Windows 7, now receiving error while computer is booting Apple Sync Notifier.exe- Entry Point Not Found the procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite.dll., Help! How do I remove this message every time I start up Windows? Would it help to
re-install Itunes and what version??Refer to this thread - https://discussions.apple.com/message/15685210#15685210
Quick answer "copy the file SQLite3.dll from the C:\Program Files (x86)\Common Files\Apple\Apple Application Support folder to the C:\Program Files (x86)\Common Files\Apple\Mobile Device Support folder"
Maybe you are looking for
-
within the next few weeks, i will likely be making the move to the world of mac and subsequently, to logic pro. my only real big question at this point is just how much power will i need? i will definately be going with the intel processor but how ma
-
Adjusting second monitor brightness?
I'm currently playing around with a dual-monitor setup with my laptop and a crappy dell monitor, using xinerama : $ xrandr --output LVDS1 --mode 1280x800 --output VGA1 --mode 1280x1024 --right-of LVDS1 The only thing is that when I set the brightness
-
COMMAND plus T does not work on the keyboard but does from the menu...
Is there a way that that shortcut could have gotten shut off from the keyboard? When I click on file or edit and then go to something like "make new tab (command t)" works fine but from the keyboard it does nothing.
-
How can i put a new music on itunes?
how can i put a new music on itunes? i dont see any music on my itunes
-
My brother and I got new Ipod touches for christmas - and they cannot detect the wifi in the house, despite the fact that all the laptops are running fine on it. They have picked up the prescence of other networks, and resetting the wireless connecti