Get the result of the procedure
Hi all
I have a procedure using storeb from the collection in an object of type as:
create or replace type calc_type as object ( field1 number, field2 number, field3 varchar2); create or replace type calc_table as table of calc_type; procedure make_calc_sched(v_id in number, v_user_id in varchar2) is table_calc calc_table; begin select s.id, s.price, s.desc bulk collect into table_calc from tableA s inner join tableB d on d.id = s.id --..... end;
How can I get the result of the procedure?
procedure make_calc_sched(v_id in number, v_user_id in varchar2, v_table in out ????) is
I plan to put up-to-date and inserts using the FORALL sentence.
Can I use slider? Maybe is a better way to do it.
With the help of Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0
Thank you
I think I got it:
procedure make_calc_sched(v_id in number, v_user_id in varchar2, v_table out calc_table) is begin select calc_type(s.id, s.price, s.desc) bulk collect into v_table from tableA s inner join tableB d on d.id = s.id --..... end;
I'll look to materialize views more later. Someone at - it examples?
Best,
Tags: Database
Similar Questions
-
Original title: ? _xmem@tri@std@@yaxxz error
I'm running kies 3 so I can move video from my phone to my computer, I downloaded the program and I get this error message... [THE PROCEDURE ENTRY POINT? _XMEM@TRI@STD@@YAXXZ WAS NOT FOUND IN THE DYNAMIC LINK LIBRARY MSVCP90.] DLL.] I have installed and uninstalled this program a few times now and keep the same error, I also ran Guest [sfc/scannow] and there was no breach of integrity don't know what else to do, I'm running vista 64 premium.
This fix by installing the following:
http://www.Microsoft.com/en-US/Download/details.aspx?ID=5582
-
Can't get the procedure to update - PLS - 00306:Wrong number or types of arguments
I'm in a situation where I think that despite the correct number of parameters by the way my local procedure (which has been "forward declarations" in addition to logical writing for her; I use all this in a package) fails to compile in SQL * faster due to the error PLS - 00306:Wrong number or types of arguments in the call to P_SENDMAIL.
I'm passing 5 parameters in the area of forward declarations and also in the logic/header inside in addition to calling the procedure in the package. Can one of you help mewith this and tell me where exactly the error might be. Here is the code:
[code]
-Local variable
CRLF VARCHAR2 (2) CONSTANT: = CHR (13) | CHR (10);
-- --------------------------------------------------------------------------------
-FORWARD DECLARATIONS
-- -----------------------------------------------------------------------------
PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,
P_FROM IN VARCHAR2,
p_to IN VARCHAR2,
msg_subject IN VARCHAR2 DEFAULT NULL,
p_msg_body IN LONG DEFAULT NULL);
[/ code]
The procedure itself:
[code]
PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,
P_FROM IN VARCHAR2,
p_to IN VARCHAR2,
msg_subject IN VARCHAR2 DEFAULT NULL,
p_msg_body IN LONG DEFAULT NULL) is
LONG v_to_list;
LONG v_cc_list;
LONG v_bcc_list;
T_DATE VARCHAR2 (255) DEFAULT TO_CHAR(SYSDATE, 'DD MON YYYY HH24:MI:SS PM');
g_mail_conn UTL_SMTP. CONNECTION;
SMTP_HOST CONSTANT VARCHAR2 (256): ='smtp - abc.defg.ca';
SMTP_PORT CONSTANT PLS_INTEGER: = 25;
BEGIN
g_mail_conn: = UTL_SMTP. OPEN_CONNECTION (SMTP_HOST, SMTP_PORT);
UTL_SMTP. HELO (g_mail_conn, SMTP_HOST);
UTL_SMTP.mail (g_mail_conn, p_sender_email);
UTL_SMTP. RCPT (g_mail_conn, p_to);
UTL_SMTP.open_data (g_mail_conn);
UTL_SMTP.write_data (g_mail_conn, "|) CRLF);
UTL_SMTP.write_data (g_mail_conn, p_msg_body);
UTL_SMTP.close_data (g_mail_conn);
UTL_SMTP. Quit (g_mail_conn);
EXCEPTION
WHEN utl_smtp.transient_error THEN
Dbms_output.put_line ('TransientError: invalid operation in the service may not be available.) ") ;
WHEN utl_smtp.permanent_error THEN
Dbms_output.put_line (' permanent error: the entered email is invalid or recepients mailbox is full.) ») ;
WHILE others THEN
Dbms_output.put_line ('Unable to send an email' |') '|| SQLERRM);
END p_sendmail;
[/ code]
Now by calling the procedure to send an email:
[code]
p_sendmail (p_sender_email = > ' [email protected]'-, send an E-mail to the donor )
p_from = > ' ADS < [email protected] > ',
p_to = > v_store_email_address,
p_msg_subject = > 'anonymous user ',.
p_msg_body = > 'thank you ' |
CRLF.
"Email confirms that we have received your promise |
CRLF.
CRLF.
' Name: '. v_full_name |
CRLF.
' Temporary ID: ' | v_azbwccp_id |
CRLF.
"Reference number: ' |" MTID |
CRLF.
"Amount: ' | '. TO_NUMBER (campaign_desg_amt1) |
CRLF.
"Campaign: ' | '. campaign |
CRLF.
' Description: ' | '. adbdesg_rec.adbdesg_name |
CRLF.
' Type: ' | atvpldg_rec.atvpldg_desc |
CRLF.
' Duration: ' | '. atvpdur_rec.atvpdur_desc |
CRLF.
"Frequency: ' | '. atvfreq_rec.atvfreq_desc |
CRLF.
"Start date: ' | '. bill_date2 |
CRLF.
CRLF.
'Your commitment is processed.' |
CRLF.
"At the same time, if you want to change this transaction, please contact us.
CRLF.
CRLF.
"Thank you for your support." |
CRLF.
CRLF.
CRLF.
CRLF.
' * This is an automated message system. Please, do not respond to this email. *** ') ;
[/ code]
I've also attached a screenshot of the error message below:
Please help me if you can. I just can't understand the question.
Thanks in advance
Sandeep
In the header of the procedure, I spent my parameter as msg_subject and during the call, he was p_msg_subject. The minute that I corrected the error, I was able to correctly compile the whole package body.
The question can be now closed.
-
To get worng result form Strored procedure
I dropped the following partitions-
Schema name-scpdat
Name of table-basetab_pps
Partitions-
partitions-
Y2009M12D21
Y2009M12D22
Y2009M12D23
I created a procedure is as
My concern is the reason why the procedure give me worng result with duplicates...CREATE OR REPLACE PROCEDURE purge_partition ( schema_name IN VARCHAR2, table_name IN VARCHAR2, active_partitions IN NUMBER ) IS CURSOR PARTITION_CURSOR IS SELECT DISTINCT (partition_name) FROM dba_tab_partitions WHERE table_owner = UPPER (schema_name) AND table_name = UPPER (table_name) AND TO_DATE (( SUBSTR (partition_name, 2, 4) || SUBSTR (partition_name, 7, 2) || SUBSTR (partition_name, 10, 2) ), 'YYYYMMDD' ) < SYSDATE - active_partitions ORDER BY partition_name; BEGIN FOR part_name IN PARTITION_CURSOR LOOP DBMS_OUTPUT.put_line ( part_name.partition_name); END LOOP; DBMS_OUTPUT.put_line ('-------------------------------------'); END purge_partition; / SQL> exec purge_partition(schema_name=>'scpdata', table_name=>'basetab_pps',active_partitions=>55); Y2009M12D21 Y2009M12D21 Y2009M12D22 Y2009M12D22 Y2009M12D23 Y2009M12D23 ------------------------------------- PL/SQL procedure successfully completed. SQL> SELECT DISTINCT (partition_name) 2 FROM dba_tab_partitions WHERE table_owner = UPPER ('scpdata') AND table_name = UPPER ('basetab_pps') AND TO_DATE (( SUBSTR (partition_name, 2, 4) || SUBSTR (partition_name, 7, 2) || SUBSTR (partition_name, 10, 2) ), 'YYYYMMDD' ) < SYSDATE - 55 ORDER BY partition_name; 3 4 5 6 7 8 9 10 11 no rows selected SQL> exec purge_partition(schema_name=>'scpdata', table_name=>'basetab_pps',active_partitions=>53); Y2009M12D21 Y2009M12D21 Y2009M12D22 Y2009M12D22 Y2009M12D23 Y2009M12D23 Y2009M12D24 Y2009M12D24 Y2009M12D24 Y2009M12D25 Y2009M12D25 Y2009M12D25 ------------------------------------- PL/SQL procedure successfully completed. SQL> SELECT DISTINCT (partition_name) 2 FROM dba_tab_partitions WHERE table_owner = UPPER ('scpdata') AND table_name = UPPER ('basetab_pps') AND TO_DATE (( SUBSTR (partition_name, 2, 4) || SUBSTR (partition_name, 7, 2) || SUBSTR (partition_name, 10, 2) ), 'YYYYMMDD' ) < SYSDATE - 53 ORDER BY partition_name; 3 4 5 6 7 8 9 10 11 PARTITION_NAME ------------------------------ Y2009M12D24 Y2009M12D25 SQL>
Concerning
FahmedThe problem lies in this line:
AND table_name = UPPER (table_name)
It is what originally is the procedure to retrieve rows from other tables than simply that you are interested in.
I hope you can see why a) the problem occurred and b) why you should not use the same name for different types of identifier.
A common practice is that the parameters are prefixed with p (or p_) and variable (_) v (or a variant which differentiates between local and global variables) etc. to avoid the kind of scope shock you meet here precisely.
Replace your settings p_schema_name and nom_table_p and you will find that your procedure works as expected.
-
I face this big mistake:-failed to get address of procedure for d3dperf_setoption (d3d9.dll)
... when I start my pc, then show this msg my Skype software does not work. installation of the software is no longer. Please solve my problem. thanking you...
Hello jassi8,
Often we see errors as the result of a program from loading at startup.
To solve these, we use the clean boot troubleshooting.
The following describes this process:
http://support.Microsoft.com/kb/310353
http://support.Microsoft.com/kb/316434
Best regards
Matthew_Ha
-
still not get the procedure to compile and run
Sorry again for the problems.
Here is the entire SQL, but I suspect seriously the problem is originally somewhere, with one of the statements.
Any help would be appreciated. Given that I get do this work without a stored procedure (all except the statement execute immediate), then I guess my logic is ok, but as I said, something is not upward.
Thank you
Floyd
The sql is:
coil proc.err
CREATE OR REPLACE PROCEDURE floydw.loadtable_config AS
I have pls_integer;
sql_stmt VARCHAR2 (4000);
all_names VARCHAR2 (4000);
all_names2 VARCHAR2 (4000);
TYPE typ_coltab IS TABLE OF dba_tab_columns % ROWTYPE INDEX BY pls_integer;
coltab_table typ_coltab;
coltab_table2 typ_coltab;
coltab_rec dba_tab_columns % ROWTYPE;
CURSOR cur is SELECT *.
FROM dba_tab_columns where owner = 'GWSTAGING_SENTRYPROD' and table_name = 'CONFIG ';
BEGIN
I: = 0;
Heart OPEN;
LOOP
EXTRACT the heart in coltab_rec;
When the output cur % notfound;
i: = i + 1;
coltab_table (i): = coltab_rec;
coltab_table2 (i) .column_name: = "" ' | " coltab_table (i) .column_name | '"' ;
END LOOP;
all_names: = NULL;
all_names2: = NULL;
FOR j IN 1... I have
LOOP
all_names: = all_names | ',' || coltab_table (j) .column_name;
all_names2: = all_names2 | ',' || coltab_table2 (j) .column_name;
END LOOP;
all_names: = SUBSTR (all_names, 2); -Delete ',' start of list
all_names2: = SUBSTR (all_names2, 2); -Delete ',' start of list
sql_stmt: = 'insert ' | coltab_rec.table_name | ' (' | all_names |) ') SELECT ' | all_names2 | 'OF' config"@sentry_l;';
-dbms_output.put_line ('run' | sql_stmt);
run immediately sql_stmt;
END;
/
If I try to create such what, I get:
SQL > show errors
Errors of PROCEDURE FLOYDW. LOADTABLE_CONFIG:
LINE/COL ERROR
-------- -----------------------------------------------------------------
7/3 PL/SQL: ignored element
7/31 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared
10/14 PL/SQL: ignored element
10/14 PLS-00201: identifier 'DBA_TAB_COLUMNS' must be declared
11/18 PL/SQL: statement ignored
12/8 PL/SQL: ORA-00942: table or view does not exist
18/5 PL/SQL: statement ignored
18/20 PLS-00320: the declaration of the type of this expression is
incomplete or incorrect
21/5 PL/SQL: statement ignored
LINE/COL ERROR
-------- -----------------------------------------------------------------
21/24 PLS-00320: the declaration of the type of this expression is
incomplete or incorrect
22/5 PL/SQL: statement ignored
22/22 PLS-00487: Invalid reference to variable
"DBA_TAB_COLUMNS % ROWTYPE.
30/7 PL/SQL: statement ignored
PLS-00487 30/56: Invalid reference to variable
"DBA_TAB_COLUMNS % ROWTYPE.
LINE/COL ERROR
-------- -----------------------------------------------------------------
31/7 PL/SQL: statement ignored
31/61 PLS-00487: Invalid reference to variable
"DBA_TAB_COLUMNS % ROWTYPE.
37/3 PL/SQL: statement ignored
37/33 PLS-00320: the declaration of the type of this expression is
incomplete or incorrectHello
Apparently, there is something wrong with the dynamic SQL statement sql_stmt.
sql_stmt := 'insert into ' || coltab_rec.table_name ||' (' || all_names || ') SELECT ' || all_names2 || ' FROM "config"@sentry_l ;' ;
I see an error: sql_stmt must not end with a semicolon. Try:
sql_stmt := 'insert into ' || coltab_rec.table_name || ' (' || all_names || ') SELECT ' || all_names2 || ' FROM "config"@sentry_l' ;
Looks like you have a commented line scheduled for debugging sql_stmt:
--dbms_output.put_line ('executing ' || sql_stmt) ;
This could be a good time to use it.
Remember that the names inside quotation marks are not automatcially converted to uppercase.
So, if you say... || ' FROM "config"@sentry_l' ;
then the table name config (all lowercase letters) should work on sentry_l.
-
How to perform this procedure and get the result?
I created a procedure, the source code for the same thing is provided below.
create or replace procedure vin_test (p_deptno in number
p_cursor ON SYS_REFCURSOR)
as
v_res Emp % rowtype;
Start
Open the p_cursor FOR
Select *.
WCP
where deptno = p_deptno;
end vin_test;
Now, if I want to see that the out put of this Proc
I first put the Serveroutput on and then...
Exec vin_test (10);
I get an error message indicating an incorrect number of arguments, then someone can tell me what is the value of the parameter I should move on so that I can get the desired output.
Thanks in advance
OraCrazyIn sqlplus you can do like this.
SQL> create or replace procedure vin_test( p_deptno IN number, p_cursor OUT SYS_REFCURSOR) 2 as 3 v_res Emp%rowtype; 4 begin 5 open p_cursor for 6 select * 7 from emp 8 where deptno = p_deptno; 9 end; 10 / Procedure created. SQL> var lcur refcursor SQL> exec vin_test(30,:lcur) PL/SQL procedure successfully completed. SQL> print lcur EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO DIV ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ---------- 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 10 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 10 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 10 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 10 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 10 7900 JAMES CLERK 7698 03-DEC-81 950 30 10 6 rows selected.
Thank you
Knani. -
I get the above answer everytime I turn on the computer. (This is with AutoCorrect blocks checked). If I leave blocks unchecked, it follows a procedure 3 pass without rebooting and does not produce a result.
* original title - to try to start the procedure of checking disk I get the answer, "cannot open volume for direct access. How can I fix? I ran the GET Microsoft virus check tnd an own result.*
The application-specific permission settings do not authorization for the application server COM with the CLSID{DCBCA92E-7DBE-4EDA-8B7B-3AAEA4DD412B}the user NT AUTHORITY\SYSTEM SID (S-1-5-18). This security permission can be modified using the Component Services administrative tool.In the opposite case
http://blog.ray1.NET/2008/01/WinXP-SP3-DCOM-system-error-dcbca92e.html
http://TechNet.Microsoft.com/en-us/network/bb545879
http://www.blackviper.com/wiki/Network_Access_Protection_Agent
-
Need to get the result of joing the views dba
Hello
need to get the result of the fileds below in a database
TABLE_NAME NOM_PARTITION NOM_TABLESPACE PARTITION_TYPE (RANGE?) PARTITION_RANGE_CONDITION SPACE_OCCUPIED_AS_OF_DATE (IN GB)
can I know what are the points of view that I can use and application
apprecaited for assistance
Thank you
Published by: user12266475 on November 2, 2011 11:33LONG data type is NOT friendly SQL.
Consider the following:SQL> @long SQL> drop table test; Table dropped. SQL> create table test (id LONG); Table created. SQL> insert into test values(q'[RANGE TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')]'); 1 row created. SQL> set serveroutput on SQL> DECLARE 2 long_var LONG; 3 var_var VARCHAR2(2000); 4 BEGIN 5 dbms_output.enable(10000); 6 SELECT id INTO long_var FROM test ; 7 var_var := substr(long_var,19,19); 8 dbms_output.put_line(var_var); 9 END; 10 / 2009-01-01 00:00:00 PL/SQL procedure successfully completed.
-
Hi all
Let me explain my requirment.
I created a custom workflow where the order goes to the approver for counterpart he can accept or reject that.
If the notification that the approver receives have a result with approve and reject values. The notification activity, I've written a procedure that will update the database columns that are based on the result.
But how do we get this result value
I need something like below
x_result: result of get value =
If x_result = "Approve" then
Update of table with approved status
on the other
Update of table with the status rejected
Kind regards
Kumar.Use the RESULT attribute
x_result: = Wf_Notification.GetAttrText (
, 'RESULT'); -
How to get the results of the UK instead of the default USA?
I live in the United Kingdom and would like to be able to search for UK results. for example, Amazon UK results when I search a product, etc.
with the option of a search in the world so I don't get the results I wantTo add plugins to search for sites such as Amazon.co.UK and Google.co.uk to Firefox, open this page in Firefox and then search or click the sites that interest you: http://mycroft.mozdev.org/
When you click on one of the listed search plugins, Firefox will ask you if you want to install it.
After that, you can open the Firefox Add-ons Manager and click on disable one of the search engine integrated you want to use.
-
I get this message when you try to open Mozilla: the procedure entry point sqlite3_db_status could not be located in the dynamic link library mozsqlite3.dll.
Do a clean reinstall.
Download a new copy of Firefox and save the file to the desktop.
- Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
- Uninstall your current version of Firefox.
- Do not remove the data of a personal nature when you uninstall the current version.
Delete the program folder Firefox before installing newly downloaded copy of the Firefox installer.
- It is important to remove the Firefox program folder to delete all the files and make sure that there is no problem with the files that were the remains after uninstallation.
Your bookmarks and other profile data is stored in the Firefox profile folder and will not be affected by a relocation, but make sure that you do not select delete data of a personal nature if you uninstall Firefox.
-
When I type a word in the address/url/awesome bar it's a word that I know that I used as a tag on several pages of a bookmark, only 4 results in the menu drop-down are marked pages of a bookmark. The rest of the pages in the menu drop-down are other pages available on the web. Because only 4 results are pages I tagged, the page I want to (and scoring) often does not appear. Is there a setting I can change to make it show more results? Or is there a way once I get the original results to add extra elements containing the tag / my favorites?
This may be a problem with the Fastestfox extension.
See Troubleshooting extensions and themes and problems of hardware acceleration to resolve common Firefox problemsIn the FastestFox Options, uncheck the 'Awesomebar improving '.
See the 10 image in the image gallery: https://addons.mozilla.org/firefox/addon/9825
https://addons.Mozilla.org/IMG/uploads/previews/thumbs/37/37975.PNG
-
Hi all
I just bought a Thunderbolt Apple display to use with my 2012 15 "27" Macbook Pro Win10/Boot Camp running. Is anyone know the procedure to get the display to work with Bootcamp/Windows 10? Is there a setting in the training Camp that must be turned on to make it work? I have connected screen but could not get a desktop display. Any help would be really appreciated! TY
The monitor should have a TB and adapter power connector. The monitor works on both OSX. ? If so, shut down of windows, connect monitor and start Windows. Your TB 2012 monitor is not plug-and-play with Windows.
Please see ports Thunderbolt and views: frequently asked questions (FAQ) - Apple Support .
1. the "hot pluggable" Thunderbolt devices using Windows with Boot Camp?
Thunderbolt hot plugging is supported under Windows 8 or 8.1 on all Macs from 2014 and later.
For all other Mac computers, Windows 7, 8 and 8.1 scans and active them Thunderbolt devices connected to ports Thunderbolt during the Windows startup process. If your device has been plugged in not at startup, Windows detects not without a reboot.
-
Get the result active configuration in the processing API
Is there a simple way to get the configuration of processing active result during execution? I would like to know in my plugin which configuration is active, it is a part of. I don't want to read the file ResultProcessing.cfg directly to get this info (but it is an option).
That value is not stored in memory after loaded configuration, so I think that you will need to do it from the file.
Maybe you are looking for
-
STRANGE Exchange on Qosmio G30-178
Is it possible to change the dvd with blu ray burner drive?What is the model? Thank you for advance
-
Not all video/audio, transfer to published film forms
Hello I created a movie in Windows Movie Maker, with a video montage to music at the beginning, followed by video clips (w / their own audio). He always plays smoothly and perfectly all the way through in the Wondows Movie Maker each time I saw it.
-
BlackBerry Z10 BBZ10 and Outlook 2010 - sync
New BBZ10. I can't find how to synchronize my Outlook 2010 (calendar and contacts). I used to have "BOLD" and could be done by USB on DesktopManager. Now, can't figure out how? Help?
-
What is the serial number on HP psc 2210?
I'm trying to download the manual for my 2210 all in one. We must enter the model and serial number. What is the serial number?
-
How to find the sql queries executed in one day with the sql and runtime text
Hi Experts,Please tell me the sql query to find out the queries executed on a particular day and the runtime and the sql text of the query.Please reply urgent.Thanks in advance