How to run SQL in BI procedures
Hi allI am a consultant JDE E1 technique. I have a requirement to build a report of BI Publisher using XMl code generated by report JDE. In some cases, I have to get the raising of basic data. For this I must run a stored SQL procedure to get these values and print the report of BI Publisher. I tried to do, but I do not understand. Can someone help me with this.
Thanks in advance
Naveen
You cannot have a SQL in RTF as such. RTF is just for the presentation.
You want to filter some data from an xml file and display them?
Tags: Business Intelligence
Similar Questions
-
How to run SQL "Issued" BI answers using a query tool?
How take the 'SQL Issued' in the tab 'Advanced' in demand in BI answers and run its equivalent on the tables of the database, by using a tool like in SQL Developer?
For example, BI answers shows "SQL to show" of:
SELECT Team2. Team2 PIF"saw_0, an2. "' Year ' saw_1, Cube2.Hr saw_2
OF 'AW_BALL2 Cube2.
WHERE Year2.Decade = '2000's
ORDER BY saw_0, saw_1, saw_2
How translate this into something that will run in SQL Developer and show me the same data that takes demand? Thank you.the SQL code that you quoted is the SQL logic.
It was sent to presentation services through ODBC to the BI server, which translates using the RPD in 'real' SQL, which is fire to the database.
As said, you need for the level of logging to see the 'real' SQL that runs the BI server... This in the administration in respect of security tool. See the Administration Guide for more information.FWIW, if you really want to run SQL that you mentioned and then launch an ODBC client (Microsoft query, TOra, etc.) and direct him to a system DSN you set type Oracle BI pointing to your Oracle BI server.
-
How to run SQL and export the results to Excel
My task is to run a custom SQL script and create an Excel file through SQL Developer running from the command line (called by a scheduled script). Is this possible using SQL Developer?
First, the thing I will try is to run a report user-defined in SQL Developer and save the results in an Excel file. Only 16000 result lines, but took 10 minutes to do the export and still cannot complete. Is there another way to do it?
Thank you very much.Can't be done, but this is requested already exchanging SQL Developer, you can vote here and add weight to the possible future implementation.
Kind regards
K. -
How to run SQL scripts using OWB process flows?
Hello
I have a few SQL Scripts. I run them using process flow OWB.
Can I get a document or a link that helps me to achieve this?
Thanks in advance,
SriGPHi SriGP,
You can call SQLPLUS using the external process activity.
Order: Give the full path of the SQLPLUS executable
Script: specify what you want to do in SQLPLUSThank you
Fati -
How to run a procedure with parameters in pl/sql collections?
I created a procedure with parameter from the collection. Can somone help me how to run a procedure in passing the parameters in the collection.
Package and how to create is successful. But I get the error message when executing the procedure.
ORA-06550: line 3, column 19:
PLS-00222: no function with name 'T_TAB' does exist in this scope
I gave the example of code here. Can someone please help me solve this problem.
-Spec package
create or replace package pkg_dist is
TABLE index IS THE NUMBER of t_tab_num TYPE of PLS_INTEGER;
procedure prc_test (a t_tab_num IN,
b IN t_tab_num,
c IN OUT t_tab_num);
end pkg_dist;
-Package body
create or replace package body is pkg_dist
procedure prc_test (a t_tab_num IN,
b IN t_tab_num,
c IN OUT t_tab_num) is
Start
IF (a (16) = 0) then
(16) c: = 0;
c (17): = 0;
c (18): = 0;
end if;
c (15): = (14)-(15)-a (16);
(16) c: = b (16) /b (17);
c (17): = 50;
(18) c: = a (16) * 2;
end prc_test;
end pkg_dist;
-executeing procedure
declare
TABLE index IS THE NUMBER of t_tab TYPE of PLS_INTEGER;
x t_tab: = t_tab (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
y t_tab: = t_tab (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500);
z t_tab;
BEGIN
pkg_dist.prc_test (x, y, z);
dbms_output.put_line (z (18));
END;
Error:
--------------------------------------------------------------------------------
ORA-06550: line 3, column 19:
PLS-00222: no function with name 'T_TAB' does exist in this scopeMy suggestion would be:
CREATE OR REPLACE PACKAGE pkg_dist IS PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist); END pkg_dist; CREATE OR REPLACE PACKAGE BODY pkg_dist IS PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist) IS BEGIN IF (a (16) = 0) THEN c (16) := 0; c (17) := 0; c (18) := 0; END IF; c (15) := a (14) + a (15) + a (16); c (16) := b (16) / b (17); c (17) := 50; c (18) := a (16) * 2; END prc_test; END pkg_dist; / DECLARE x SYS.odcinumberlist; y SYS.odcinumberlist; z SYS.odcinumberlist; BEGIN x := sys.odcinumberlist (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); y := sys.odcinumberlist (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500); z := sys.odcinumberlist (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); pkg_dist.prc_test (x, y, z); DBMS_OUTPUT.put_line (z (18)); END; /
See you soon,.
Manik. -
How to run a procedure with refcursor to more
an entry is User_id = CMSH_USER; p_Ot-num =-9999; p_ppst_flag = 'P' and I want to take the trace by running this procedure, and any1 help me, how to run this procedure below and how to use these 5 on refcursor...
procedure Pr_get_mny(p_ot_Num IN NUMBER, p_User_Id IN VARCHAR2, p_Ppst_Flag IN VARCHAR2, Ref_Cur OUT Ref_Cursor, CUR_OPT OUT Ref_Cursor, CUR_TAXRATE OUT Ref_Cursor, CUR_TAXHOLD OUT Ref_Cursor, CUR_PENDGAACNT OUT Ref_Cursor ) IS
If the goal is to Test, the best tool is SQL
var ref_cur refcursor var cur_opt refcursor var cur_taxrate refcursor var cur_taxhold refcursor var cur_pendgaacnt refcursor exec pr_get_mny(-9999,'CMSH_USER','P',:ref_cur,:cur_opt,:cur_taxrate,:cur_taxhold,:cur_pendgaacnt) print ref_cur print cur_opt print cur_taxrate print cur_taxhold print cur_pendgaacnt
-
How to run a procedure with the object as OUTPUT parameter
Hello
I have a procedure and it composed of 2 parameters, there is an input parameter and it's some ID (NUMBER datatype) and 2nd parameter is an output parameter and it an object type. I want to run this procedure, but not able to do the same thing. Can someone please suggest me how to run a procedure that got the object as output parameter.
Thank you very much in advance for your support.Example:
SQL> create or replace type t_obj as object (ename varchar2(10), deptno number); 2 / Type created. SQL> ed Wrote file afiedt.buf 1 create or replace procedure myproc (p_empno in number, obj out t_obj) is 2 begin 3 select t_obj(ename, deptno) 4 into obj 5 from emp 6 where empno = p_empno; 7* end; SQL> / Procedure created. SQL> set serverout on SQL> declare 2 v_obj t_obj; 3 begin 4 myproc(7788, v_obj); 5 dbms_output.put_line(v_obj.ename||','||v_obj.deptno); 6 end; 7 / SCOTT,20 PL/SQL procedure successfully completed.
-
How to call the PL/SQL of EntityImpl procedure
Hello
I have a page that can create/update visitors. When a new customer is created themselves, a line gets inserted into the database table. I use EO for this feature.
I need to create lines to two or three other table also when a new line is created in the main table. What is the best practice for this feature?
The 2 options that I know:
1 create a trigger on the main table and the appeal of trigger for inserting rows in other tables.
2. call a PL/SQL of EntityImpl procedure after the permanent data is committed to the table. (If this is the best approach, could you please let me know how to get there)
See you soon
AJ
In fact, Java Mail API is included in WLS and JDev, then you can simply add %MIDDLEWARE_HOME%\Oracle_Home\oracle_common\modules\javax.mail_2.0.0.0_1-4-4.jar to your project.
Dario
-
How to run DBMS_SQLTUNE.report_sql_monitor of SQL Developer 4.0
Hello-
We have new SQL Developer 4.0 as a single stop for all reports of performance tuning.
(So far, we know how to generate the AWR and ASH ADDM directly from SQL DEV 4.0 and we can do as a NON-privileged user)
Now, the question is how to run DBMS_SQLTUNE.report_sql_monitor API SQL DEV 4.0?
I tried this way:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SELECT DBMS_SQLTUNE.report_sql_monitor)
sql_id = >: SQL_ID
Type = > 'TEXT ',.
report_level = > 'ALL') AS myreport
DOUBLE;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and then right button click of the mouse on the line "myreport" and the EXPORT of 'text' in the menu drop down and save in the. FichierTSV on the local file system.
It works this way, as expected, but seems to be a lot of hassle: too many steps.
Then I tried the HTML format:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SELECT DBMS_SQLTUNE.report_sql_monitor)
sql_id = >: SQL_ID
Type = > 'HTML. "
report_level = > 'ALL') AS myreport
DOUBLE;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and it didn't work well at all SQL dev 4.0
Any help will be greatly appreciated.
(once again, the idea here is to set up our development and QA groups with full access to performance all reports without having them call DBA for help in the production of any SQL tuning report).
Thank you
VR
There is certainly a 'room' to improve the interface, just tell me what you would like to be like him. For example, you want an overview of the SGS of all SQLIDs running on the nodes you could then select this option to run a report for? Don't say it is what we would do, but I was wondering what it is that you ask for.
-
How to run wfstatus.sql for i-expenses
How to run wfstatus.sql i-expenses in EBS 11i.Select this check box, hope it helps.
How to find and solve the reports on Internet expenditures within workflow [ID 185004.1]
How wfstatus.sql to run on a statement of expenses Internet [134895.1 ID]
-
How to run the PL SQL function on click of a button
Hello
I have problem with run SQL PS function on click of a button. I have create a new button and call the function STANJA.insert_into_log_fun1('cc'); "Value of the button application", a Type of Source select button request = 'SQL PL Expression or function.
Problem is that this function is executed at the loading of the page, but not to the click. I don't want to perform this function on loading the page, only when I click the button.
Does anyone have idea how can I solve this problem?
Thank you very much.Alter this process > status > when you press the button > choose the button you want the pcoss to run on.
RAL
-
How to run a sql on page load.
I am trying to run sql that populates a field when the page loads. How can I do this on the page attributes-area html header and body attributes?You can create a process plsql as follows:
Process > PLSQL > On Load (after the header) > put your code
Sam
-
How to run the packaged procedure with Ref Cursor
Hello.
The question may be very simple for you... but I was confused how to run
I have the following package
But I want to test (run) this procedure...CREATE OR REPLACE PACKAGE CURSPKG AS TYPE T_CURSOR IS REF CURSOR; PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, IO_CURSOR IN OUT T_CURSOR); END CURSPKG; / CREATE OR REPLACE PACKAGE BODY CURSPKG AS PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, IO_CURSOR IN OUT T_CURSOR) IS V_CURSOR T_CURSOR; BEGIN IF N_EMPNO <> 0 THEN OPEN V_CURSOR FOR SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME FROM EMP, DEPT WHERE EMP.DEPTNO = DEPT.DEPTNO AND EMP.EMPNO = N_EMPNO; ELSE OPEN V_CURSOR FOR SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME FROM EMP, DEPT WHERE EMP.DEPTNO = DEPT.DEPTNO; END IF; IO_CURSOR := V_CURSOR; END OPEN_ONE_CURSOR; END CURSPKG; /
But confused how to have Ref Cursor
Could you help me in this...
Thank youYou must declare a variable of type T_CURSOR and pass it to the procedure like this.
declare lOutCursor CURSPKG.T_CURSOR; begin CURSPKG.OPEN_ONE_CURSOR(
, lOutCursor); end; -
How to run the type of object...
HI team,
Please let me know how to run pl/SQL object type.
create or replace TYPE T_PARTY_ID_LIST AS TABLE OF T_PARTY_ID; create or replace TYPE T_PARTY_ID AS OBJECT (SEQ NUMBER(10,0) ,COUNTRY_ID CHAR(2) ,ID VARCHAR2(50) ,ID_TYPE VARCHAR(3) ,DATE_FROM DATE ,DATE_TO DATE ); create or replace PROCEDURE P_UPDATE_RICA_COUNT_ID (A_PARTY_IDS IN T_PARTY_ID_LIST ,A_ICAP_ID IN number ) as v_id sa_id_registration_counts.id%TYPE; -- BEGIN FOR C IN (SELECT X.id_type, X.ID FROM TABLE (CAST(A_party_ids AS T_PARTY_ID_LIST)) X WHERE X.ID_Type IN ('N','P','B') ORDER BY X.ID_Type) LOOP -- BEGIN -- UPDATE sa_id_registration_counts SET no_of_registrations = no_of_registrations-1 WHERE id = V_ID AND id_type = C.ID_Type; -- IF SQL%ROWCOUNT < 1 THEN RAISE NO_DATA_FOUND; END IF; -- EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN -- INSERT INTO sa_id_registration_counts (id ,id_type,exclude_yn,no_of_registrations) SELECT V_ID,C.ID_Type,'N',1 FROM dual; -- EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20000,'Error updating RICA ID count ['||SQLERRM||']'); END; END; -- END LOOP; -- END; --
I'm trying, but receive an error message
DECLARE A_PARTY_IDS SCOTT.T_PARTY_ID_LIST; A_ICAP_ID NUMBER :=12323; BEGIN A_PARTY_IDS.extend(1); SELECT T_PARTY_ID(1,'1','1','1',null,null) INTO A_PARTY_IDS(1) FROM DUAL; P_UPDATE_RICA_COUNT_ID( A_PARTY_IDS => A_PARTY_IDS, A_ICAP_ID => A_ICAP_ID ); END; Error report - ORA-06531: Reference to uninitialized collection
I do not know why you do what you do that is row-by-row (aka slow-by-slow), when you could do all this in a single merge - something like statement:
create or replace PROCEDURE P_UPDATE_RICA_COUNT_ID (A_PARTY_IDS IN T_PARTY_ID_LIST, A_ICAP_ID IN number) as begin merge into sa_id_registration_counts tgt using (select x.id_type, x.id, count(*) cnt from table(cast(a_party_ids as t_party_id_list)) x where x.id_type in ('N', 'P', 'B') group by x.id_type, x.id) src on (tgt.id_type = src.id_type and tgt.id = src.id) when matched then update set no_of_registrations = no_of_registrations - src.cnt when not matched then insert (tgt.id, tgt.id_type, tgt.exclude_yn, tgt.no_of_registrations) values (src.id, src.id_type, 'N', 1); end; /
You v_id in your procedure, but you never defined anywhere, for as far as I could tell, so I made a few assumptions about the join condition. You will need to change if necessary.
Meanwhile, for your procedure, you should do something like:
DECLARE A_PARTY_IDS T_PARTY_ID_LIST := t_party_id_list(); -- initialised the collection here A_ICAP_ID NUMBER :=12323; BEGIN A_PARTY_IDS.extend(1); A_PARTY_IDS(1) := T_PARTY_ID(1,'1','1','1',null,null); P_UPDATE_RICA_COUNT_ID( A_PARTY_IDS => A_PARTY_IDS, A_ICAP_ID => A_ICAP_ID ); end; /
Another thing - you seem to like selection of the many double - if you're in PL/SQL, then you can just assign variables directly (overall; there are a few exceptions, depending on your version of the database).
-
How to run execute immediate with variables
Hi friends,
How to run execute immediate with variables in v_stmt below?
I don't know how to declare value I have here.
Regds,Set serveroutput on; DECLARE i VARCHAR (20); v_stmt VARCHAR2 (100); CURSOR c IS SELECT sqlid FROM temp1; BEGIN OPEN c; LOOP FETCH c INTO i; EXIT WHEN c%NOTFOUND; DBMS_OUTPUT.put_line (i); v_stmt := 'select * from table(dbms_xplan.display_cursor('&i',null))' execute immediate v_stmt; END LOOP; CLOSE c; END; /
Kunwar.You must first use a variable binding (named ': v' in the SQL statement in my example):
set serveroutput on; DECLARE i VARCHAR (20); v_stmt VARCHAR2 (100); CURSOR c IS -- modified for a quick test SELECT sql_id FROM v$sql where child_number > 2; BEGIN OPEN c; LOOP FETCH c INTO i; EXIT WHEN c%NOTFOUND; DBMS_OUTPUT.put_line (i); v_stmt := 'select * from table(dbms_xplan.display_cursor(:v,null))'; execute immediate v_stmt using i; END LOOP; CLOSE c; END; /
However because your SELECT statement returns multiple lines, you need to adapt your code to process all rows returned (as already suggested in first response to your message).
Instead of using the PL/SQL, I recommend you to generate a SQL file using only SQL, and then run the generated SQL file.
For example:spool edx.sql set serveroutput on declare v_stmt varchar2(100); v_q char(1):=''''; begin dbms_output.put_line('spool edx.log'); for s in (select sql_id from v$sql where child_number >2) loop dbms_output.put_line('select * from table(dbms_xplan.display_cursor(' || v_q || s.sql_id || v_q || ',null));'); end loop; dbms_output.put_line('exit'); end; / spool of
This generates a file similar to:
spool edx.log select * from table(dbms_xplan.display_cursor('5rygsj4dbw6jt',null)); select * from table(dbms_xplan.display_cursor('5rygsj4dbw6jt',null)); select * from table(dbms_xplan.display_cursor('5rygsj4dbw6jt',null)); select * from table(dbms_xplan.display_cursor('fsbqktj5vw6n9',null)); select * from table(dbms_xplan.display_cursor('6q42j0018w7t8',null)); select * from table(dbms_xplan.display_cursor('a5mmhrrnpwjsc',null)); select * from table(dbms_xplan.display_cursor('3c1kubcdjnppq',null)); select * from table(dbms_xplan.display_cursor('3c1kubcdjnppq',null)); select * from table(dbms_xplan.display_cursor('9gkq7rruycsjp',null)); select * from table(dbms_xplan.display_cursor('f0wj261bm8snd',null)); select * from table(dbms_xplan.display_cursor('ab3swhv5g138y',null)); select * from table(dbms_xplan.display_cursor('6vgvyh4xw9c5g',null)); select * from table(dbms_xplan.display_cursor('ak5crjygnpk60',null)); select * from table(dbms_xplan.display_cursor('9p6bq1v54k13j',null)); select * from table(dbms_xplan.display_cursor('19x1189chq3xd',null)); select * from table(dbms_xplan.display_cursor('7sx5p1ug5ag12',null)); select * from table(dbms_xplan.display_cursor('730vdzhng6m6g',null)); select * from table(dbms_xplan.display_cursor('730vdzhng6m6g',null)); select * from table(dbms_xplan.display_cursor('0v3dvmc22qnam',null)); select * from table(dbms_xplan.display_cursor('0v3dvmc22qnam',null)); select * from table(dbms_xplan.display_cursor('a1zv6wju3ftgv',null)); select * from table(dbms_xplan.display_cursor('7ng34ruy5awxq',null)); select * from table(dbms_xplan.display_cursor('7ng34ruy5awxq',null)); select * from table(dbms_xplan.display_cursor('b2gnxm5z6r51n',null)); select * from table(dbms_xplan.display_cursor('b2gnxm5z6r51n',null)); select * from table(dbms_xplan.display_cursor('g4gp07gt2z920',null)); select * from table(dbms_xplan.display_cursor('1gu8t96d0bdmu',null)); select * from table(dbms_xplan.display_cursor('g00cj285jmgsw',null)); select * from table(dbms_xplan.display_cursor('g00cj285jmgsw',null)); select * from table(dbms_xplan.display_cursor('g00cj285jmgsw',null)); select * from table(dbms_xplan.display_cursor('bn4b3vjw2mj3u',null)); select * from table(dbms_xplan.display_cursor('38243c4tqrkxm',null)); select * from table(dbms_xplan.display_cursor('2abjfnvy5rkyg',null)); select * from table(dbms_xplan.display_cursor('350f5yrnnmshs',null)); select * from table(dbms_xplan.display_cursor('350f5yrnnmshs',null)); select * from table(dbms_xplan.display_cursor('3s1yukp05bzg6',null)); select * from table(dbms_xplan.display_cursor('3s1yukp05bzg6',null)); select * from table(dbms_xplan.display_cursor('1tgukkrqj3zhw',null)); exit PL/SQL procedure successfully completed.
Edited by: P. Forstmann March 20, 2013 19:06
Edited by: P. Forstmann March 20, 2013 19:33
Maybe you are looking for
-
Number of words in text edit document?
Is it possible in a TextEdit document that you can perform a number of words similar to Microsoft Word? I am more and more using this bit cannot find a wat to do this. Any help is greatly appreciated... J
-
I tried to update my son ipad mini, however, whenever I type the parameters it automatically re starts itself and only shows the apple logo. tried so many times to update the ios, but nothing helps, please help. I have so no way of knowing what ios o
-
Satellite A200-1TW - slow performance even with a SSD HARD drive
I replaced the HARD drive of 160 GB for a Seagate Momentus XT 500 GB and even a Samsun 830 256 GB SSD, but my HARD drive performance is very slow. How can I increase the performance of my HARD drive? I have 4 GB of RAM and I am using Windows 7 Home.
-
HP Pavilion Notebook - 17-f207nm drivers
Had to reinstall windows to 8.1, so I have a few missing drivers, if you can help me: HP Pavilion Notebook - 17-f207 1. ACPI\VEN_HPQ & DEV_6007ACPI\HPQ6007* HPQ6007 2. ACPI\VEN_SMB & DEV_0001ACPI\SMB0001* SMB0001 Thnx
-
While trying to reinstall Windows 7 on my Dell Inspiron 1545 of the reinstall DVD after you have installed a hard drive again, I got this message: error message "the computer restarted unexpectedly or encountered an unexpected error" after starting t