Using SQl from within Portal
can somebody please help me as I am starting to feel quite stupid. I create a report using Sql and get the following error
Error: ORA-00911: invalid character (WWV-11230)
Failed to parse as INTRANET - select name, surname, component, phone_number, building from PERSON_DETAILS where upper(surname) like 'A%';, SURNAME ASC, NAME ASC, COMPONENT ASC, BUILDING ASC (WWV-08300)
I run the same query under sql plus and it works. What am I doing wrong.
Thanks in advance.
null
Andy,
From the error message that you have posted, it looks that you are adding a semicolon ";" at the end of your query in your report. Do not add any ";" at the end of the query that you are writing and it should work fine.
e.g.
It should be:
"select * from emp"
and not:
"select * from emp;"
If you are still unable to rectify your problem then pls post the actual query that you are using.
Thanx,
Chetan.
Similar Messages
-
Using APEX_MAIL from within a procedure invoked from DBMS_JOB
I have done a lot of googling and wasted a couple of days getting nowhere and would appreciate some help. But I do know that in order to use APEX_MAIL from within a DBMS_JOB that I should
"In order to call the APEX_MAIL package from outside the context of an Application Express application, you must call apex_util.set_security_group_id as in the following example:
for c1 in (
select workspace_id
from apex_applications
where application_id = p_app_id )
loop
apex_util.set_security_group_id(p_security_group_id =>
c1.workspace_id);
end loop;
I have created a procedure that includes the above (look towards the end)
create or replace procedure VACANCIES_MAILOUT
(p_application_nbr number,
p_page_nbr number,
p_sender varchar2)
AS
Purpose: Email all people registerd in MAILMAN [email protected]
with details of any new vacancies that started listing today.
Exception
when no_data_found
then null;
when others then raise;
l_body CLOB;
l_body_html CLOB;
l_vacancy_desc VARCHAR2(350);
to_headline varchar2(200);
to_org varchar2(100);
l_vacancies_desc varchar2(2000);
to_workspace_id number(22);
CURSOR vacancies_data IS
select DISTINCT v.headline to_headline,
ou.org_name to_org
from VACANCIES v,
Org_UNITS ou
where
ou.org_numb = v.Org_Numb
and v.public_email_sent_date is Null
Order by ou.org_name, v.headline;
BEGIN
BEGIN
FOR vacancies_rec in vacancies_data
-- build a list of vacancies
loop
BEGIN
l_vacancy_desc := '<br><b>' ||
vacancies_rec.to_org || '<br>' ||
vacancies_rec.to_headline || '</b><br>';
-- l_vacancy_desc :=
-- vacancies_rec.to_org || ' - ' ||
-- vacancies_rec.to_headline ;
l_vacancies_desc := l_vacancies_desc || l_vacancy_desc;
END;
END LOOP;
END;
l_body := 'To view the content of this message, please use an HTML enabled mail client.'||utl_tcp.crlf;
l_body_html :=
'<html>
<head>
<style type="text/css">
body{font-family: Verdana, Arial, sans-serif;
font-size:11pt;
margin:30px;
background-color:white;}
span.sig{font-style:italic;
font-weight:bold;
color:#811919;}
</style>
</head>
<body>'||utl_tcp.crlf;
l_body_html := l_body_html || l_vacancies_desc
|| '<p>-----------------------------------------------------------------------------------------------------------------</strong></p>'
||utl_tcp.crlf
|| '<p>The above new vacancies have been posted on the <strong>Jobs At Murdoch</strong> website.</p>'
||utl_tcp.crlf
||'<p>For futher information about these vacancies, please select the following link</p>'
||utl_tcp.crlf
||'<p> Jobs At Murdoch </p>'
||utl_tcp.crlf
||'<p></p>'
||utl_tcp.crlf;
l_body_html := l_body_html
||' Regards
'||utl_tcp.crlf
||' <span class="sig">Office of Human Resources</span>
'||utl_tcp.crlf;
for c1 in (
select workspace_id
from apex_applications
where application_id = 1901)
loop
apex_util.set_security_group_id(p_security_group_id => c1.workspace_id);
end loop;
apex_mail.send(
p_to => '[email protected]',
p_from => '[email protected]',
p_body => l_body,
p_body_html => l_body_html,
p_subj => 'Jobs At Murdoch - new vacancy(s) listed');
update VACANCIES
set public_email_sent_date = trunc(sysdate,'DDD')
where public_email_sent_date is null;
commit;
END;
but still get the error
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /oracle
System name: Linux
Node name: node
Release: 2.6.18-194.17.1.el5
Version: #1 SMP Mon Sep 20 07:12:06 EDT 2010
Machine: x86_64
Instance name: instance1
Redo thread mounted by this instance: 1
Oracle process number: 25
Unix process pid: 5092, image: (J000)
*** 2011-07-12 09:45:03.637
*** SESSION ID:(125.50849) 2011-07-12 09:45:03.637
*** CLIENT ID:() 2011-07-12 09:45:03.637
*** SERVICE NAME:(SYS$USERS) 2011-07-12 09:45:03.637
*** MODULE NAME:() 2011-07-12 09:45:03.637
*** ACTION NAME:() 2011-07-12 09:45:03.637
ORA-12012: error on auto execute of job 19039
ORA-20001: This procedure must be invoked from within an application session.
ORA-06512: at "APEX_040000.WWV_FLOW_MAIL", line 290
ORA-06512: at "APEX_040000.WWV_FLOW_MAIL", line 325
ORA-06512: at "APEX_040000.WWV_FLOW_MAIL", line 367
ORA-06512: at "HRSMENU_TEST.VACANCIES_MAILOUT", line 94
ORA-06512: at line 1
Can someone please tell me what what stupid thing I am doing wrong? The procedure worked when invokded from SQL Workshop but fails in a DBMS_JOB.
much thanks PeterI think that might help...
http://www.easyapex.com/index.php?p=502
Thanks to EasyApex..
LK -
Is there any way to use Quickview from within Spotlight search results?
I'm sure this has been answered previously, but my searches came up empty....
Is there any way to use Quickview from within Spotlight search results? I'd like to be able to do a Spotlight search and hit the space bar for a quick Quickview look before actually launching the program. I'm guessing this isn't possible, but thought I'd ask...Thanks, Kappy.
Duh...I meant Quick Look. Sorry about that.
In any event, pressing the space bar in Spotlight just puts a space in the Spotlight search box - it doesn't open a Quick view of the highlighted item... -
Using FLASHBACK_TRANSACTION_QUERY from within a procdure.
I am trying to create a procedure that will execute immediate the undo_sql found in the flashback_transaction_query.
I am using version 10.2
When i run the following code:
SELECT UNDO_SQL
FROM flashback_transaction_query
WHERE table_name = 'table'
AND logon_user = 'user';
UNDO_SQL
update "schema"."table" set "item" = '999' where ROWID = 'AAAVLeAAAAAAPCUAAA';
8 rows....
However when i embed the same code within a procedure it states i have insufficient privileges.
CREATE OR REPLACE PROCEDURE FIND_REDO_SQL
(tablename in varchar2,
username in varchar2)
IS
code varchar2(300);
CURSOR SQL_TRANS IS
SELECT UNDO_SQL
FROM flashback_transaction_query
WHERE table_name = tablename
AND logon_user = username;
BEGIN
OPEN sql_trans;
LOOP
FETCH SQL_TRANS INTO code;
EXECUTE IMMEDIATE code;
EXIT WHEN SQL_TRANS%NOTFOUND;
END LOOP;
END;
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "user.FIND_REDO_SQL", line 15
ORA-06512: at line 1
Is it the case that i cannot query flashback_transaction_query from within a proceduress.Unfortunately not, i cannot see anywhere it may tell me why i cannot query this view via a procedure. Below is a list of privileges that i have.
Am i missing one that i really need.
Thanks,
G
ADMINISTER ANY SQL TUNING SET
ADMINISTER DATABASE TRIGGER
ADMINISTER SQL TUNING SET
ADVISOR
ALTER ANY CLUSTER
ALTER ANY DIMENSION
ALTER ANY EVALUATION CONTEXT
ALTER ANY INDEX
ALTER ANY INDEXTYPE
ALTER ANY LIBRARY
ALTER ANY MATERIALIZED VIEW
ALTER ANY OUTLINE
ALTER ANY PROCEDURE
ALTER ANY ROLE
ALTER ANY RULE
ALTER ANY RULE SET
ALTER ANY SEQUENCE
ALTER ANY SQL PROFILE
ALTER ANY TABLE
ALTER ANY TRIGGER
ALTER ANY TYPE
ALTER DATABASE
ALTER PROFILE
ALTER RESOURCE COST
ALTER ROLLBACK SEGMENT
ALTER SESSION
ALTER SYSTEM
ALTER TABLESPACE
ALTER USER
ANALYZE ANY
AUDIT ANY
AUDIT SYSTEM
BACKUP ANY TABLE
BECOME USER
COMMENT ANY TABLE
CREATE ANY CLUSTER
CREATE ANY DIRECTORY
CREATE ANY INDEX
CREATE ANY INDEXTYPE
CREATE ANY LIBRARY
CREATE ANY MATERIALIZED VIEW
CREATE ANY OPERATOR
CREATE ANY PROCEDURE
CREATE ANY SEQUENCE
CREATE ANY SYNONYM
CREATE ANY TABLE
CREATE ANY TRIGGER
CREATE ANY TYPE
CREATE ANY VIEW
CREATE CLUSTER
CREATE DATABASE LINK
CREATE INDEXTYPE
CREATE LIBRARY
CREATE MATERIALIZED VIEW
CREATE OPERATOR
CREATE PROCEDURE
CREATE PROFILE
CREATE PUBLIC DATABASE LINK
CREATE PUBLIC SYNONYM
CREATE ROLE
CREATE ROLLBACK SEGMENT
CREATE SEQUENCE
CREATE SESSION
CREATE SYNONYM
CREATE TABLE
CREATE TABLESPACE
CREATE TRIGGER
CREATE TYPE
CREATE USER
CREATE VIEW
DELETE ANY TABLE
DROP ANY CLUSTER
DROP ANY DIRECTORY
DROP ANY INDEX
DROP ANY INDEXTYPE
DROP ANY LIBRARY
DROP ANY MATERIALIZED VIEW
DROP ANY OPERATOR
DROP ANY PROCEDURE
DROP ANY ROLE
DROP ANY SEQUENCE
DROP ANY SYNONYM
DROP ANY TABLE
DROP ANY TRIGGER
DROP ANY TYPE
DROP ANY VIEW
DROP PROFILE
DROP PUBLIC DATABASE LINK
DROP PUBLIC SYNONYM
DROP ROLLBACK SEGMENT
DROP TABLESPACE
DROP USER
EXECUTE ANY LIBRARY
EXECUTE ANY OPERATOR
EXECUTE ANY PROCEDURE
EXECUTE ANY TYPE
FORCE ANY TRANSACTION
FORCE TRANSACTION
GLOBAL QUERY REWRITE
GRANT ANY PRIVILEGE
GRANT ANY ROLE
INSERT ANY TABLE
LOCK ANY TABLE
MANAGE TABLESPACE
QUERY REWRITE
RESTRICTED SESSION
SELECT ANY DICTIONARY
SELECT ANY SEQUENCE
SELECT ANY TABLE
UNDER ANY TYPE
UNDER ANY VIEW
UNLIMITED TABLESPACE
UPDATE ANY TABLE -
Trying to use grep from within java,using exec command!
Hi all!
I would like to run a grep function on some status file, and get a particular line from it, and then pipe this line to another file.
Then perfom a grep on the new file to check how many of the lines above are present in that file, and then write this value to a new file.
The final file with a numerical value in it, i will read from within java,as one reads normal files!
I can run simple commands using exec, but am kinda stuck with regards to the above!
Maybe i should just do all the above from a script file and then run the script file from exec. However, i dont want to do that, because it kinda makes the system dependent,..what if i move to a new machine, and forget to install the script, then my program wont work!
Any advise?
Thanks
RegardsWith a little creativity, you can actually do all that from the command line with a single command. It'll look a little crazy, but it can be done.
Whether the script exists on the local machine or not has zero to do with platform indpendence. You assumedly have to get the application onto the local machine, so including the script is not really an issue at all. However, you're talking about system independence, yet still wishing to run command line arguments? The two are mutually exclusive. -
Can I use SimpleFdkCredential() from within a servlet?
I have a test program that logs in to content DB using SimpleFdkCredential, and works perfectly well run from the main() method of a Java class from within JDeveloper. When I try to login the same way from within the doGet() method of a servlet, doGet() hangs on the call to ManagersFactory.login() using the same SimpleFdkCredential that works in-process. The login() call doesn't throw any exceptions, it just sits there waiting[I presume], and never returns.
Is it necessary to use S2SFdkCredential for any authentication that originates from a servlet invocation? It seems that SimpleFdkCredential should work in this instance as well.
Thanks.Can you check the Content DB http node log (application.log) with debug log level set, to see if the request from the servlet for the RemoteLoginManager Web Service was received?
I would also check that all libraries are present/accessible from servlet - and that there are no conflicts with existing libraries.
Also, check the servlet log for anything strange.
Finally, you could try remote debugging of your servlet .. e.g -Xdebug java option.
-Matt. -
Cross-component: Call method of using component from within used component?
Hi,
I began diving into cross-component programming.
Meanwhile after having digged into some scenarios some questions came up to my mind that I am not able to answer myself. I would appreciate your help here!
Say we have to components. Comp A uses Comp B (hence, B is a component usage in A)
1) How to make them communicate not on a data level (via context binding) but on a process level, thus...
a) can I call A's method from within B? How is the approach on a general level? - as B can be used from totally different components (like A, A1, A2 ...)
b) perhaps the only way to do this is by firing events? If so, how can I react in A when an event in B (marked as interface event) gets fired? As it seems they do not get registered within A directly...
I guess the question seems to be a bit tricky. Nevertheless, I think there will be plenty of you out there who used to asked them the same questions before and came up with an approach. Would be nice to hear from you.
Best wishes,
Marc @sap1Hi,
thanks for your reply!
Indeed, I think the nature of WDA would be just to somehow map the context from the used component to the other back and forth.
Nevertheless, what if I would like to invoke a method of the using component from inside the used component.
One sample for this requirement could be e.g.:
Component B offers a tree item and a send/verify button.
Component A uses B and has some restraints regarding what the selection should look like.
The user taps the button in B (at runtime in the view container of A), the context gets updated in A and B and in Component A the verifyWithOwnConstraints() method gets called (through B).
Thanks again,
Marc -
Dynamic SQL from within DML - merging syntax issue #2
Further to my previous thread on a SQL - DML merging syntax issue, I have another problem with multiple conditions in the WHERE-clause:
vrb _retval decimal
vrb _val1 text
vrb _val2 text
_val1 = 'value1'
_val2 = 'value2'
SQL SELECT DIM1_ATTR1 FROM MYSCHEMA.DIM1_DIM WHERE COL1 = :_val1, AND COL2 = :_val2, INTO :_retval
The above SQL will return NA. If I use the text literals instead of the OLAP variables, the query just runs fine. Also, with a single condition (on COL1 only) the query returns the expected value.
A note in the help states that OLAP DML objects should clearly be sperated from the rest of the SQL but does not say how. I am using a colon before and a comma after as without them the line would not compile. I could not find any example that would use multiple conditions in the WHERE-clause however the help text indicates that it is possible.
Please help me, how.
Regards,
Csaba
Windows, Oracle10gRel2 Ver. 10.2.0.1.0 eversion: 84090It does work, although I applied the finishing touch by removing the commas as well!
Thanks a lot! Good job!
Could you please have a look at issue #1 too? :-)
Regards,
Csaba -
Hi, I used to have an earthlink account. No longer. But when I'm in a Firefox internet page that has the option to email from that page, it brings up the old account. How do I fix this to reflect my new outgoing mail account?
See this support article - https://support.mozilla.org/en-US/kb/change-program-used-open-email-links
-
Client cookies from 10g Portal
Hello,
Is it possible to set persistent cookies by storing it on user's local hard drive from within Portal? I use a PL/SQL generated portal page to redirect to another web application outside Portal environment. Within this PL/SQL procedure, some cookies are created using owa_cookie.send procedure. But, when redirected to the other web application (same domain), all the cookies are lost. What is the ideal way to achieve this function?
Please help.
Thanks
Sandeep.Ramesh,
This is the forum for Portal Content Areas. Please post your question on the PDK forum.
However, you will likely find the information you're looking for in the white paper Portal Management of Provider Sessions.
Regards,
Jerry -
Oracle 9ias Reports within Portal
We have published several Oracle Reports to Portal by configuring Reports 9ias Reports Services and then by registering the Reports Server and Reports Definition Files within portal, this works as expected.
However, several of our Oracle reports point to another oracle database server, when these are run from within portal an exception is raised (REP-1202: ORACLE logon not specified). I can only assume that this is because the Oracle Reports run from within Portal are unable to connect to the external data source. Our existing portal reports connect work OK using a db link. Does anybody know a way to overcome this problem? We were thinking about Single Sign On or do we have to modify the portal PL-SQL package to provide a connection string for each Oracle Report?
Cheers
DanHow did you try to connect to the remote DB?
Create a TNS entry on the node where your reports server runs, and specify it in the "userid" parameter: scott/tiger@myRemoteDB. -
Hi,
I've got problems using JMX from within an iView. I try to connect to the local MBeanServer using the following code:
[code]
public void doProcessBeforeOutput() throws PageException {
Form myForm = this.getForm();
// Get connection to MBeanServer
InitialContext ctx;
try {
ctx = new InitialContext();
Object objref = ctx.lookup("jmx");
MBeanServer conn = (MBeanServer)objref;
} catch (NamingException e) {
e.printStackTrace();
[/code]
The lookup returns an object of type "com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain" which should implement
the Interface "MBeanServer". Anyhow I get the following error while trying to cast the returned object to type MBeanServer:
[code]
at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:343)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable$1$DoDispatchRequest.run(AsyncIncludeRunnable.java:377)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable.run(AsyncIncludeRunnable.java:390)
at com.sapportals.portal.prt.core.async.ThreadContextRunnable.run(ThreadContextRunnable.java:164)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:729)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanServer
at com.top_logic.sap.JMXTestiView$JMXTestiViewDynPage.doProcessBeforeOutput(JMXTestiView.java:46)
at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:123)
at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
... 7 more
[/code]
I set the "tc/jmx"-library as "Additional Library" using the Right-Mouse-Click-Context-Menu on the Project Node in Netweaver
Developer Studio...
What else needs to be done to get jmx working in an iView-Environment?
Thanks in advance
Thorsten WittmannThank you Maksim,
when specifying a sharing reference like
SAPJ2EE::library:tc/jmx
in the portalapp.xml-File, the server-lookup is working.
Best regards,
Thorsten -
Can you run SQL in the portal and create a drop down list??
Can anyone tell me if its possible to create a drop down list using sql in the portal?
Can I create a drop down list of items via sql and then have those same values be used for a discoverer portlet? I am trying to replicate the same concept using parameter values and discoverer worksheets, but through sql. I dont want to have to cut and past lists on the parameter fields. I want to be able to run sql when I post a discoverer worksheet with a parameter and have the values from the sql pass into the worksheet.
Is that possible???I created a lov but i cannot post it on my portlet. When i go to post a portlet, under the db_link, portlet reposistory it does not show.? Also, how do make the connection to the discoverer worsheets to this lov?
thanks, -
Guidelines for using JPA from an Add-on?
Can somebody post the guidelines for using JPA from within an Add-on?
We are facing issues using JPA (2.0)
Thanks
PramodFrom http://www.sxipper.com/faq#uninstall
To uninstall Sxipper go to your Firefox menu and choose Tools | Add-ons. Select '''Sxipper '''from the list of extensions and click the "Uninstall" button. After restarting your browser Sxipper will be removed.
Sxipper still uses the Firefox Password Manager, so your passwords are all there. Uninstalling Sxipper will restore the default password manager functionality. See http://www.sxipper.com/faq#wherepassword -
I've heard that you can use XPath from within Java instead of having to use it within XSLT, but I'm not sure what the syntax is?
Does anyone know?
Thanks,
Oodiimport org.apache.xerces.parsers.DOMParser;
import org.apache.xpath.XPathAPI;
DOMParser parser = new DOMParser();
parser.parse(inputFile);
doc = parser.getDocument();
/* Search using XPATH */
String xpath = "/XpathToSearch";
NodeIterator nl = XPathAPI.selectNodeIterator(doc, xpath);
HTH,
Joe
Maybe you are looking for
-
Hi, I'm working on a Web Service Project, and i'm trying to deploy Web Services dynamically. Now the problem is, that i have to adapt the Java src-files sometimes before the deployment (Like adding Annotations, Methods or just peaces of code into a M
-
Is there any API or Program to Update GL Journal Header DFF Values
Hi All, Can anyone let me know if we have any API or Program for updating GL Journal Header DFF Values. Any information will be appreciated.. Thank You Gt1942
-
Sales Organization????
Dear all, Because of some technical problem i am not able to download R3 Sales Structure to CRM. Can anybody tell me how can i create Sales Organization manually in the CRM?? Thanks, Jayesh
-
Enter access code in ecc 6 while given create in se38
hello everbody, i am my system i installed ecc 6. while using se38. given program name and create ... it is asking enter access key. plz guide how u use it?
-
Problem found: The Diagnostics Policy Service is not running
Whenever I attempt to run network diagnostics Windows 7 Ultimate response with Problem found: The Diagnostics Policy Service is not running. <o:p></o:p> I usually find my own solution to the network problem. However, not to the inability to run diagn