Regarding the SQL procedure.
HI All,
I had a requirement where I had column which has multiple values seperated by semi-colons.I have to check whether these values are there in another table or not. I had to write this code in a SQL procedure. Can anybody help me out in simple way of doing this.
Any help highly appreciated.
Thanks and Regards,
Venky
set serveroutput on
create or replace procedure testproc (instring varchar2,numval number) as
colpos number;
colvalue varchar2(20);
prevcolpos number := 0;
begin
for cnt in 1..numval loop
colpos:=instr(instring,';',prevcolpos+1);
colvalue:=substr(instring,prevcolpos+1,(colpos-1)-prevcolpos);
dbms_output.put_line(cnt||' '||colpos||' '||prevcolpos||' '||colvalue);
prevcolpos:=colpos;
end loop;
colvalue:=substr(instring,prevcolpos+1,length(instring));
dbms_output.put_line(colvalue);
end;
execute testproc('blah;blah1;blah2;blah3','3');
Output:
execute testproc('blah;blah1;blah2;blah3','3');
This is more of a test case than a resolution, but it should put you on the right track. Probably will want to use a table type to store the data.
Similar Messages
-
Regarding the pricing procedure in SRM
Hi gurus,
Can anybody tell me how the pricing procedure in SRM to be used ???......And can i use this for bid invitation.
Kindly help....
Regds
KumarHi
Please check the in OVKK, weather you have maintained correctly or not.Also check in the Billing document type details what is the Document pricing procedure that has been maintained.
Regards
Srinath -
Find the user that executed the SQL procedure
We are using Oracle 10g R2 on Linux.
I want to know the OS user that executed the purging procedure (PURGE). For this, i am using the following query which is not returning any row:
select *
from DBA_HIST_ACTIVE_SESS_HISTORY ash, DBA_HIST_SQLTEXT s
where ASH.SQL_ID = s.SQL_ID
and UPPER(s.SQL_TEXT) like '%PURGE%';Is the above query fine?Moazzam wrote:
We are using Oracle 10g R2 on Linux.
I want to know the OS user that executed the purging procedure (PURGE). For this, i am using the following query which is not returning any row:Since what you are doing to get the user indirectly is not working would another approach be helpful?
Since you want to know who is running the procedure would a log table you could insert into at the start or end of the procedure help, to store the information you are interesting in seeing?
Or, can you get the information you want from other system views? V$SESSION has the OSUSER column as well as SQL_ID and other join columns for other views (like V$SQL). -
help
You cannot install OS X without using an installer DVD, and that requires a DVD drive (internal or external.) Alternatively, if you have access to another Mac and if both have Firewire ports, then you can use Target Disk Mode: Transferring files between two computers using FireWire.
Your profile indicates you have a MacBook, but are using OS X 10.3.x which is not possible. The first MacBook model used a special Intel-only version of Tiger, 10.4.x. -
Regarding execution of pl/sql procedure using JSP
HI all
Please help me.
i am customizing a jsp page ,which is executing one sql procedure first then selecting data from the table in which procedure is inserting.
How can i pass parameter dynamically to the sql procedure ? ,which i am getting from an HTML page.
Please help me out.
regards
satendrathis is the sample code provided by oracle.
* This sample shows how to call PL/SQL blocks from JDBC.
import java.sql.*;
class PLSQL
public static void main (String args [])
throws SQLException, ClassNotFoundException
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:oci8:@";
try {
String url1 = System.getProperty("JDBC_URL");
if (url1 != null)
url = url1;
} catch (Exception e) {
// If there is any security exception, ignore it
// and use the default
// Connect to the database
Connection conn =
DriverManager.getConnection (url, "scott", "tiger");
// Create the stored procedures
init (conn);
// Cleanup the plsqltest database
Statement stmt = conn.createStatement ();
stmt.execute ("delete from plsqltest");
// Close the statement
stmt.close();
// Call a procedure with no parameters
CallableStatement procnone = conn.prepareCall ("begin procnone; end;");
procnone.execute ();
dumpTestTable (conn);
procnone.close();
// Call a procedure with an IN parameter
CallableStatement procin = conn.prepareCall ("begin procin (?); end;");
procin.setString (1, "testing");
procin.execute ();
dumpTestTable (conn);
procin.close();
// Call a procedure with an OUT parameter
CallableStatement procout = conn.prepareCall ("begin procout (?); end;");
procout.registerOutParameter (1, Types.CHAR);
procout.execute ();
System.out.println ("Out argument is: " + procout.getString (1));
procout.close();
// Call a procedure with an IN/OUT prameter
CallableStatement procinout = conn.prepareCall ("begin procinout (?); end;");
procinout.registerOutParameter (1, Types.VARCHAR);
procinout.setString (1, "testing");
procinout.execute ();
dumpTestTable (conn);
System.out.println ("Out argument is: " + procinout.getString (1));
procinout.close();
// Call a function with no parameters
CallableStatement funcnone = conn.prepareCall ("begin ? := funcnone; end;");
funcnone.registerOutParameter (1, Types.CHAR);
funcnone.execute ();
System.out.println ("Return value is: " + funcnone.getString (1));
funcnone.close();
// Call a function with an IN parameter
CallableStatement funcin = conn.prepareCall ("begin ? := funcin (?); end;");
funcin.registerOutParameter (1, Types.CHAR);
funcin.setString (2, "testing");
funcin.execute ();
System.out.println ("Return value is: " + funcin.getString (1));
funcin.close();
// Call a function with an OUT parameter
CallableStatement funcout = conn.prepareCall ("begin ? := funcout (?); end;");
funcout.registerOutParameter (1, Types.CHAR);
funcout.registerOutParameter (2, Types.CHAR);
funcout.execute ();
System.out.println ("Return value is: " + funcout.getString (1));
System.out.println ("Out argument is: " + funcout.getString (2));
funcout.close();
// Close the connection
conn.close();
// Utility function to dump the contents of the PLSQLTEST table and
// clear it
static void dumpTestTable (Connection conn)
throws SQLException
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select * from plsqltest");
while (rset.next ())
System.out.println (rset.getString (1));
stmt.execute ("delete from plsqltest");
rset.close();
stmt.close();
// Utility function to create the stored procedures
static void init (Connection conn)
throws SQLException
Statement stmt = conn.createStatement ();
try { stmt.execute ("drop table plsqltest"); } catch (SQLException e) { }
stmt.execute ("create table plsqltest (x char(20))");
stmt.execute ("create or replace procedure procnone is begin insert into plsqltest values ('testing'); end;");
stmt.execute ("create or replace procedure procin (y char) is begin insert into plsqltest values (y); end;");
stmt.execute ("create or replace procedure procout (y out char) is begin y := 'tested'; end;");
stmt.execute ("create or replace procedure procinout (y in out varchar) is begin insert into plsqltest values (y); y := 'tested'; end;");
stmt.execute ("create or replace function funcnone return char is begin return 'tested'; end;");
stmt.execute ("create or replace function funcin (y char) return char is begin return y || y; end;");
stmt.execute ("create or replace function funcout (y out char) return char is begin y := 'tested'; return 'returned'; end;");
stmt.close();
} -
How to call Pl/sql procedure from form ?
Hi all,
I need to call a procedure from form after the user has pressed the button to invoke the sql procedure, can anyone please advise me on how to do it ?
Thanks.
LimHi,
Thanks for your reply.
yes, I have include in when-button-pressed trigger as
AIC_PROC_AR_CCID_UPD;
Below is my procedure :-
CREATE OR REPLACE PROCEDURE AIC_PROC_AR_CCID_UPD(errbuf out Varchar2,
retcode out Number ) is
VAR_BUF VARCHAR2(240);
Cursor C1 is
SELECT CONCATENATED_SEGMENTS ACCT,
SEGMENT5 SEG5
FROM AIC_GL_COA AGC
WHERE AGC.CODE_COMBINATION_ID IS NULL;
Rec1 C1%RowType;
BEGIN
FOR Rec1 IN C1 LOOP
BEGIN
UPDATE AIC_GL_COA A SET ( DESCRIPTION, CODE_COMBINATION_ID, SEGMENT5 )=
( SELECT FFVT.DESCRIPTION, GLA.CODE_COMBINATION_ID, GLA.SEGMENT5
FROM GL_CODE_COMBINATIONS_KFV GLA,
FND_FLEX_VALUES_TL FFVT,
FND_FLEX_VALUES FFV
WHERE GLA.CONCATENATED_SEGMENTS = REC1.ACCT
AND FFV.FLEX_VALUE = REC1.SEG5
AND FFV.FLEX_VALUE_ID = FFVT.FLEX_VALUE_ID
AND FFV.FLEX_VALUE_SET_ID = 1002673 )
WHERE A.SEGMENT5 = REC1.SEG5 ;
EXCEPTION
WHEN NO_DATA_FOUND THEN
FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'NO RECORD UPDATE !!');
END;
END LOOP;
COMMIT;
RETURN;
END;
However, when I try to compile it, error prompt :-
Error 306 at line 1, column 1
wrong number or types of arguments in call to 'AIC_PROC_AR_CCID_UPD'
Error 0 at line 1, column 1
statement ignored.
By the way, my form 6i is running at client site and connection to procedure in unix server. Will this is ok ?
Thanks
Rgds
Lim -
Unable to capture the parameter values from a PL/SQL procedure
hi.
i'm trying to capture the parameter values of a PL/SQL procedure by calling inside a anonymous block but i'm getting a "reference to uninitialized collection error" ORA-06531.
Please help me regarding.
i'm using following block for calling the procedure.
declare
err_cd varchar2(1000);
err_txt VARCHAR2(5000);
no_of_recs number;
out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
cntr_var number:=0;
begin
rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
dbms_output.put_line('The error is ' ||err_cd);
dbms_output.put_line('The error is ' ||err_txt);
dbms_output.put_line('The cntr is ' ||cntr_var);
for incr in 1 .. OUT_SIGN_TAB.count
loop
cntr_var := cntr_var + 1 ;
Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN_TAB(incr).txn_type||','||OUT_SIGN_TAB(incr).objid);
end loop;
end;
Error is thrown on "for incr in 1 .. OUT_SIGN_TAB.count" this line
Following is some related information.
the 3rd parameter of the procedure is a out parameter. it is a type of a PL/SQL table (SEARCH_SIGN_TAB_TYPE) which is available in database as follows.
TYPE "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
TYPE "SEARCH_SIGN_TYPE" AS OBJECT
(ref_no VARCHAR2(22),
ciref_no VARCHAR2(352),
ac_no VARCHAR2(22),
txn_type VARCHAR2(301),
objid VARCHAR2(1024))............We don't have your rt843pq procedure, but when commenting that line out, everything works:
SQL> create TYPE "SEARCH_SIGN_TYPE" AS OBJECT
2 (ref_no VARCHAR2(22),
3 ciref_no VARCHAR2(352),
4 ac_no VARCHAR2(22),
5 txn_type VARCHAR2(301),
6 objid VARCHAR2(1024))
7 /
Type is aangemaakt.
SQL> create type "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
2 /
Type is aangemaakt.
SQL> declare
2 err_cd varchar2(1000);
3 err_txt VARCHAR2(5000);
4 no_of_recs number;
5 out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
6 cntr_var number:=0;
7 begin
8 -- rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
9 dbms_output.put_line('The error is ' ||err_cd);
10 dbms_output.put_line('The error is ' ||err_txt);
11 dbms_output.put_line('The cntr is ' ||cntr_var);
12 for incr in 1 .. OUT_SIGN_TAB.count
13 loop
14 cntr_var := cntr_var + 1 ;
15 Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN
TAB(incr).txntype||','||OUT_SIGN_TAB(incr).objid);
16 end loop;
17 end;
18 /
The error is
The error is
The cntr is 0
PL/SQL-procedure is geslaagd.Regards,
Rob. -
In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .
Hi Srinath,
The below blog might be useful
http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
regards,
Harish -
How to use pl/sql procedure or function as part of validate the entity obj?
Hi,
we are migrating from oracle forms to jdeveloper 11g.
I have a req. that,i wanted to use oracle pl/sql procedure to validate a attribute in an entity created with ADF BC?
Is it possible to implement this?
And how to show the error message from pl/sql procedure?
Regards
Murali.Hi,
It is possible by using a method validator for the entity attribute.
Create a transient attribute 'X'.
In the validation section of the attribute to be validate, choose method validator.
In the Error Message tab set error message as {0}.
Below the value for tokentoken should source.X (X is the transient attribute name)
In the java code of method validator, call the stored procedure and set the value of transient attribute X with the error message from SP.
Use setX("ErrorMessage").
Regards,
Srinidhi -
DBMS_METADATA.GET_DDL inside the pl/sql procedure
We have a requirement to drop certain materialized view and need to recreate based on certain condition inside the
pl/sql procedure.i am using the dbms_metadata to get the Mv ddls.
var1 := 'SELECT DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW,'MV_NAME','OWNER')'|| 'from dual' || ';' ;
dbms_output.put_line(var1);
But i am unable to get the create ddl syntax in var1.
Can anyone help me on thisHi Deepu,
you are not helping us too much. You information are coming drop by drop.
Anyway, I don't have a materialized view but I have tried with a table.
Here is my test and output (what I expect you too show us too):
First test using normal SELECT FROM DUAL:
SET LONG 2000000
SET HEAD OFF
SET ECHO ON
SELECT DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS') FROM DUAL;
Output:
SQL>
SQL> SELECT DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS') FROM DUAL;
CREATE TABLE "SYS"."ALERT_QT"
( "Q_NAME" VARCHAR2(30),
"MSGID" RAW(16),
"CORRID" VARCHAR2(128),
"PRIORITY" NUMBER,
"STATE" NUMBER,
"DELAY" TIMESTAMP (6),
"EXPIRATION" NUMBER,
"TIME_MANAGER_INFO" TIMESTAMP (6),
"LOCAL_ORDER_NO" NUMBER,
"CHAIN_NO" NUMBER,
"CSCN" NUMBER,
"DSCN" NUMBER,
"ENQ_TIME" TIMESTAMP (6),
"ENQ_UID" VARCHAR2(30),
"ENQ_TID" VARCHAR2(30),
"DEQ_TIME" TIMESTAMP (6),
"DEQ_UID" VARCHAR2(30),
"DEQ_TID" VARCHAR2(30),
"RETRY_COUNT" NUMBER,
"EXCEPTION_QSCHEMA" VARCHAR2(30),
"EXCEPTION_QUEUE" VARCHAR2(30),
"STEP_NO" NUMBER,
"RECIPIENT_KEY" NUMBER,
"DEQUEUE_MSGID" RAW(16),
"SENDER_NAME" VARCHAR2(30),
"SENDER_ADDRESS" VARCHAR2(1024),
"SENDER_PROTOCOL" NUMBER,
"USER_DATA" "SYS"."ALERT_TYPE" ,
"USER_PROP" "SYS"."ANYDATA" ,
PRIMARY KEY ("MSGID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "SYSAUX" ENABLE
) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGIN
G
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "SYSAUX"
OPAQUE TYPE "USER_PROP" STORE AS LOB (
ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
CACHE
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
{code}
Now with the procedure storing in CLOB variable
{code:sql}
SET SERVEROUTPUT ON SIZE UNLIMITED
SET LIN 5000
SET LONG 20000000
SET ECHO ON
DECLARE
l_clob CLOB;
BEGIN
l_clob := DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS');
DBMS_OUTPUT.put_line (l_clob);
END;
Output:
SQL>
SQL> DECLARE
2 l_clob CLOB;
3 BEGIN
4 l_clob := DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS');
5 DBMS_OUTPUT.put_line (l_clob);
6 END;
7 /
CREATE TABLE "SYS"."ALERT_QT"
( "Q_NAME" VARCHAR2(30),
"MSGID" RAW(16),
"CORRID" VARCHAR2(128),
"PRIORITY" NUMBER,
"STATE" NUMBER,
"DELAY" TIMESTAMP (6),
"EXPIRATION" NUMBER,
"TIME_MANAGER_INFO" TIMESTAMP (6),
"LOCAL_ORDER_NO" NUMBER,
"CHAIN_NO" NUMBER,
"CSCN" NUMBER,
"DSCN" NUMBER,
"ENQ_TIME" TIMESTAMP (6),
"ENQ_UID" VARCHAR2(30),
"ENQ_TID" VARCHAR2(30),
"DEQ_TIME" TIMESTAMP (6),
"DEQ_UID" VARCHAR2(30),
"DEQ_TID" VARCHAR2(30),
"RETRY_COUNT" NUMBER,
"EXCEPTION_QSCHEMA" VARCHAR2(30),
"EXCEPTION_QUEUE" VARCHAR2(30),
"STEP_NO" NUMBER,
"RECIPIENT_KEY" NUMBER,
"DEQUEUE_MSGID" RAW(16),
"SENDER_NAME" VARCHAR2(30),
"SENDER_ADDRESS" VARCHAR2(1024),
"SENDER_PROTOCOL" NUMBER,
"USER_DATA" "SYS"."ALERT_TYPE" ,
"USER_PROP" "SYS"."ANYDATA" ,
PRIMARY KEY ("MSGID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "SYSAUX" ENABLE
) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "SYSAUX"
OPAQUE TYPE "USER_PROP" STORE AS LOB (
ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
CACHE
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
{code}
It should be nice if you could post your tests too if they are not working.
Regards.
Al -
Sender JDBC support the stored procedure in SQL Server 2005
Dear All,
My question here is , Sender is JDBC adpter support to call the Stored procedure in Microsoft SQL Server 2005?
I followed the below thread before posting this question
Sender JDBC Adapter Supports Stored Procedures????
In the thread Suraj response has mentioned SAP note: 941317, I checked the note, Note says it supported only ORACLE DBMS versions.
Could you please clarify about this to possibility to call the stored procedure in Microsoft SQL server 2005?
Thank you in Advance
SateeshHi Sateesh,
To answer your query, Yes it does. SP call works with SQL Server 2005 as well, the SP call should be "execute SPNAME <paramas>". In the place of update statement put any junk value as mentioned in the earlier comment.
But just one thing to be noted, the select or any other query returning the desired resultset must be the first statement in youre SP returning value to the calling app. Means if there are any update, deletion or intermediate select queries to be used with in your SP, those all should be placed after the Main Select query that returns the desired resultset. Variable declarions and assignments are allowed.
But if the seq of statements in your SP are like:
@var1 Varchar
Update <tablename>....
Select * from <tablename>
Then the output of the SP is :
1 row updated
<the resultset from select>
In such cases, PI can recognise the first value returned only, that is "1 row updated" and hence the returned resultset wouldn't be seen by PI or not be passed to integration engine. Hence the update should come after the main Select.
One more interesting piece of information, even if you copy and paste the entire SP code in place of the query string of Sender JDBC adapter, that too will work with all your variable declarations, multiple queries and updates and everything. Just have to follow the above rule.
Let us know what you find.
Regards,
Suddhasatta -
How to secure a PL/SQL procedure that is called from the web browser
If you have ever seen the sample document management application, and tried to download a file that was stored in the system, you are probably familiar with the apex_util.count_click URL that is used to download the file. If you copy that URL and paste it into a new browser, you will not be prompted to login to download the requested file. I'm using SSO with Apex as a partner application. How can I secure a pl/sql procedure like this to redirect to the login page before beginning the download?
Thanks,
KrisYou can use the second method described here:
http://apex.oracle.com/pls/otn/f?p=31517:15
You would use an application process instead of pasting the procedure call in the browser. In the case I describe, you don't need to grant execute to public on the download procedure.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Error when try to call a pl/sql procedure from the .xsql file
I tried to call a pl/sql procedure like this:
<?xml version="1.0"?>
<page connection="omtest5" xmlns:xsql="urn:oracle-xsql">
<xsql:include-owa>
sampleowaxml.testone
</xsql:include-owa>
</page>
but I got the following error message:
<?xml version="1.0" ?>
- <page>
- <xsql-error action="xsql:include-owa">
<statement>declare buf htp.htbuf_arr; param_names owa.vc_arr; param_values owa.vc_arr; rows integer := 32767; outclob CLOB;begin param_names(1) := 'HTTP_COOKIE'; param_values(1) := ''; param_names(2) := 'SERVER_NAME'; param_values(2) := 'mxfang-nt.us.oracle.com'; param_names(3) := 'SERVER_PORT'; param_values(3) := '80'; param_names(4) := 'SCRIPT_NAME'; param_values(4) := '/servlets/oracle.xml.xsql.XSQLServlet'; param_names(5) := 'PATH_INFO'; param_values(5) := '/xsql/test/myproject.xsql'; param_names(6) := 'HTTP_USER_AGENT'; param_values(6) := 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)'; owa.init_cgi_env(6,param_names,param_values); sampleowaxml.testone owa.get_page(buf,rows); dbms_lob.createtemporary(outclob,true,dbms_lob.session); for i in 1..rows loop dbms_lob.writeappend(outclob,length(buf(i)),buf(i)); end loop; ? := outclob; ? := DBMS_LOB.INSTR(outclob,CHR(10)| |CHR(10));end;</statement>
<message>ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "OWA" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "OWA" to continue.</message>
</xsql-error>
- <xsql-error action="xsql:include-owa">
<message />
</xsql-error>
</page>
This error message is very similiar to the message that Shanthir posted on Jan, 21. I did run the dbmslob.sql, but it doesn't help. Anybody has ideas how to solve it?
I used the PL/SQL web toolkit provided by OAS4.0.8.1. I believe oracle web agent is replaced by this toolkit.
Thanks,
Min
nullHi,
Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
By the way if anybody got this solution and got any workaround, please help me too.
I am still waiting for the solution to that.
Shanthi -
How to start a report on the reports server from a pl/sql procedure
I would like to start or queue a report on the reports server / cartridge from within a serverside pl/sql procedure along with passing report parameters.
Can I use the package utl_http and if yes, how?
nullHi,
Before this you have to prepare your internal table with tab delimeter structure with data.
data: wa_appl_title like line of appl_title.
concatenate fhdr '/file_details_'
sy-datum '_' sy-uzeit '.txt' into fhdr.
*MOD01 - start.
open dataset fhdr for output in text mode." ENCODING DEFAULT.
open dataset fhdr for output in text mode ENCODING DEFAULT.
*MOD01 - end.
if sy-subrc = 0.
clear wa_appl_title.
read table appl_title into wa_appl_title index 1.
if sy-subrc = 0.
transfer wa_appl_title to fhdr.
endif.
loop at appl_it.
transfer appl_it to fhdr.
endloop.
close dataset fhdr.
write: / text-t05.
else.
write: / text-t04.
endif.
After this you view in AL11 tranx.
let us know any thing else you need.
Thanks,
Deepak. -
Get the report list in a PL/SQL procedure
Hi to all,
I need to get the list of the personal report of a specified user in a PL/SQL procedure, is this possible?
My procedure should delete not "standard" report of a specified portal user.
Then i must have the list of all user's reports and after do my delete logic.
Jhon DhonJhon -
It sounds to me that what you want to do is have a list that is generated based upon the identification of an individual. You can do this a number of ways, but I think you would want to write a straight query to accomplish this rather than a PL/SQL procedure. A query to accomplish what you're looking to do would look something like this:
SELECT
person_name,
person_id_number,
other info you need to see in the output
FROM
table_name (that contains the info you need to see)
WHERE
conditional clauses to obtain only data you wish to see
AND :p_person_id = table_name.person_id_number
The AND clause line will return the employee the user wishes to see based upon that person's ID number. This information is asked for in a parameter form before the report is run. The :p_person_id is referred to as a bind variable. You can read more about this on Metalink or OTN.
HTH,
Steve
Maybe you are looking for
-
Purchase Order Import inserts duplicate records in po_line_locations
Hi, I'm running standard Purchase Order Import program to import few PO's. We have only one shipment for each item, so its only one record for each line in po_line_locations. But after running the import, it inserts a duplicate record with same qty i
-
Queries on Call Function In update Task
Hi , I have a requirement where I have to update a ztable in background once I execute the report.THe requirement is to exceute the updation in background.Will Call funtion in update task help me?If yes, I have never used call function in update
-
New ios7 alarm snooze button right beside off button. This will cause me problems . Will hit off a often as I hit snooze. Taught this was sorted on ios6 .
-
Can I attend Oracle 10g DBA course & attempt DBA Certification for 11g
Hi, I am already OCP-PLSQL and want to attempt OCP-DBA stream. I enquired at various oracle education centers and came to know that all are conducting courses for Oracle-10g. So can I attend Oracle 10g DBA course (Mandatory Course) and attempt DBA Ce
-
PSE 4.0 with photos on EHD; getting new computer
Hi- I'm using PSE 4.0 on a PC running XP. I have all of my photos on an external hard drive, but the software and catalog info is on the internal hard drive. I want to order a new PC that will run Vista, and I'd like to keep my photos on the external