Error Pls 00497
E-mail to friend PLS-00497: cannot 00497 country code mix between single row and multi-row (BULK) in bulk collect example [message #546703] Thu, 08 March 2012 05:14 sundarfaq Messages: 235Registered: October 2007 Location: 0049 country code Chennai Senior Member Hi, Please resolve this problem CREATE OR REPLACE PACKAGE pkg_mkt_hub_load_collection AS PROCEDURE sp_final_load_mkt_hub; END pkg_mkt_hub_load_collection; / CREATE OR REPLACE PACKAGE BODY pkg_mkt_hub_load_collection AS c_default_limit CONSTANT PLS_INTEGER:=5000; PROCEDURE sp_final_lvl_idx_mon_hub; PROCEDURE sp_final_lvl_idx_mon_hub AS CURSOR cur_lvl_idx_mon IS SELECT idxmap.ssia_index_code,idxstg.start_date,idxstg.currency,idxstg.level1,idxstg.type, idxstg.return_month,idxstg.return_3months, idxstg.return_6months, idxstg.return_ytd, idxstg.return_1year, idxstg.return_3years, idxstg.return_5years,idxstg.return_10years,idxstg.market_cap, idxstg.mkt_file_id FROM mkt_total_lvl_indx_mon_stg idxstg, md_vendor_index_map idxmap WHERE idxmap.source = idxstg.source AND idxmap.base_currency = idxstg.currency AND idxmap.return_type = idxstg.type AND idxmap.mkt_index_id = idxstg.vendor_code AND idxmap.monthly = 'Y' AND idxmap.file_type = 'T'; cur_lvl_idx_rec cur_lvl_idx_mon%ROWTYPE; BEGIN OPEN cur_lvl_idx_mon; LOOP FETCH cur_lvl_idx_mon BULK COLLECT INTO cur_lvl_idx_rec LIMIT c_default_limit; EXIT WHEN cur_lvl_idx_mon%NOTFOUND; END LOOP; CLOSE cur_lvl_idx_mon; END sp_final_lvl_idx_mon_hub; PROCEDURE sp_final_load_mkt_hub AS BEGIN NULL; END sp_final_load_mkt_hub; END pkg_mkt_hub_load_collection; / show error error : 30/44 PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list when i removed bulk collect from fetch commands, it works fine. please give an idea about it Report message to a moderator Re: PLS-00497: cannot mix between single row and multi-row (BULK) in [message #546704 is a reply to message #546703] Thu, 08 March 2012 05:17 Michel Cadot Messages: 63874Registered: March 2007 Location: Nanterre, France, http://... Senior MemberAccount Moderator
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to insert multiple rows in a variable PL/SQL up vote -1 down vote favorite I am trying to collect the member_id and http://www.orafaq.com/forum/t/179546/ how many different books that guy rented. Then i want this data put inside a variable so i can use it after . i am trying to do it like this DECLARE nr_imprumuturi RECORD%ROWTYPE; nr_total_titluri Number(4); procent Number(3); BEGIN select count(*) into nr_total_titluri from title; select count(distinct r.title_id),r.member_id bulk collect into nr_imprumuturi from member m, rental r group by r.member_id; select nr_imprumuturi.Nr_impr/nr_total_titluri *100 into procent from dual; END; / i want the data to be http://stackoverflow.com/questions/26550639/how-to-insert-multiple-rows-in-a-variable-pl-sql put in nr_imprumuturi but i get this error : Error report: ORA-06550: line 11, column 67: PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list ORA-06550: line 12, column 3: PL/SQL: ORA-00904: : invalid identifier ORA-06550: line 11, column 3: PL/SQL: SQL Statement ignored 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: The table record looks like this : create table record( nr_impr Number(3), member_id Number(3), procent Number(3) ) sql oracle plsql share|improve this question asked Oct 24 '14 at 15:00 Lucian Tarna 523317 1 So you want a PL/SQL collection? Why aren't you just doing a simple count - why do you need PL/SQL at all? Are you trying to populate record? And did you mean to cross-join the two tables? –Alex Poole Oct 24 '14 at 15:04 You need data for 1 guy or for each guy in the table? –Multisync Oct 24 '14 at 15:06 to be honest i am not sure what i want. I want a variable like a table with multiple rows so i can use it in an Update Statement like a normal table –Lucian Tarna Oct 24 '14 at 15:06 for all the guys in the table. I also tried with a record and then from it i
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not https://community.oracle.com/thread/3895542 work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in PL/SQL XML Programming All PlacesDevelopment ToolsXMLPL/SQL XML Programming This discussion country code is archived 1 Reply Latest reply on Feb 9, 2016 11:58 AM by Paulzip PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list user597769 Feb 8, 2016 4:30 PM