Oracle Error Pls 00386
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 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PLS-00386: type mismatch found between FETCH cursor and INTO variables up vote 2 down vote favorite 1 The following package throws : PLS-00386: type mismatch found at 'V_STUDYTBL' between FETCH cursor and INTO variables Purpose of the code: Define two types outside the package, one is used to send a bunch of numbers into the stored proc and the other is used to return the corresponding rows from my_table Thank you in advance for the inputs. Create OR REPLACE Type InputTyp AS VARRAY(200) OF VARCHAR2 (1000); CREATE TYPE OBJTYP AS OBJECT ( A NUMBER, B VARCHAR2 (1000), C VARCHAR2 (100) ); CREATE TYPE OutputTyp IS VARRAY (2000) OF OBJTYP; / CREATE OR REPLACE PACKAGE my_package AS PROCEDURE my_procedure(p_StudyNum IN InputTyp, p_StdyDtl OutputTyp); END my_package; / CREATE OR REPLACE PACKAGE BODY my_package AS PROCEDURE MyProcedure(p_StudyNum IN InputTyp, p_StdyDtl OutputTyp) IS i BINARY_INTEGER := 1; j BINARY_INTEGER := 1; CURSOR c_StudyTbl IS SELECT A, B, C FROM my_table WHERE Study_Number = p_StudyNum(i); v_StudyTbl OBJTYP; BEGIN p_StdyDtl := OutputTyp (); LOOP -- This is the first cursor opened for each of the items in the list. EXIT WHEN i > p_StudyNum.count; OPEN c_StudyTbl; LOOP FETCH c_StudyTbl INTO v_StudyTbl; EXIT WHEN c_StudyTbl%NOTFOUND; p_StdyDtl.EXTEND (); p_StdyDtl (j).A := v_StudyTbl.A; p_StdyDtl (j).B := v_StudyTbl.B; p_StdyDtl (j).C := v_StudyTbl.
Library mySQL Code Library PHP Code Library JavaScript Code Library Oracle Terms & Definitions Oracle Error Codes PSOUG Community Blogs Oracle Jobs Board PSOUG Forum Oracle User Group Directory Free Oracle Magazines Online Learning Center PSOUG Presentations Advanced Code Search News and Events Sponsors Page http://stackoverflow.com/questions/15503720/pls-00386-type-mismatch-found-between-fetch-cursor-and-into-variables Submit Code Contact Us Oracle Error: PLS-00386 Error Description: Type mismatch found at "string" between FETCH cursor and INTO variables Error Cause: An assignment target in the INTO list of a FETCH statement does not match in datatype http://psoug.org/oraerror/PLS-00386.htm with the corresponding column in the select list of the cursor declaration, and it is unclear which implicit conversion is required to correct the mismatch. Action: Change the cursor declaration or change the datatype of the assignment target. You might want to use datatype conversion functions in the select list of the query associated with the cursor. There haven't been any comments added for this error yet. You may add one if you like. Add a comment Name: Email: URL: Chars left:1000 (1000 max) (No HTML, but newlines will be preserved) Home : Code Library : Sponsors : Privacy : Terms of Use : Contact Us 82 users online © 2009 psoug.org PSOUG LOGIN Username: Password: Forgot your password?
from GoogleSign inHidden fieldsSearch for groups or messages
TYPE MF_TABLE_TYPE IS TABLE OF mf_record_type; Then in my stored procedure: v_mf_record MF_TABLE_TYPE := MF_TABLE_TYPE(); . . OPEN mf_detail; FETCH mf_detail BULK COLLECT INTO v_mf_record; CLOSE mf_detail; [code].... I am getting the error: PLS-00386: type mismatch found at 'V_MF_RECORD' between FETCH cursor and INTO variables. The thing is, that type I defined is like 90 columns, and I'm trying to avoid having to list all those columns individually in the FETCH or when I retrieve the data. View 2 Replies Similar Messages: Application Express :: Display Not-found.png For Image Type When Data Not Found? Client Tools :: ORA-31180 / Type Mismatch In Invalid PL/SQL DOM Handle Mismatch In Counts ASM Kernel Mismatch? Compare Current With Previous Row Until Mismatch Print Mismatch Values From Two Tables? Windows :: Oracle Version Mismatch Record Count Mismatch Between Select And Insert Oracle Listener Version Mismatch (10g / 11g) After 11g Upgrade? PL/SQL :: ORA-06525 - Length Mismatch For CHAR Or RAW Data SQL & PL/SQL :: Record Count Mismatch In Dataset And Query Executed Performance Tuning :: Compare Current Row Values With Previous One Until Mismatch RMAN :: Rc-datafile Mismatch Sizes - Column Bytes Shows Data Different From Real Of Files? SQL & PL/SQL :: Backward Accessing Super Type Attributes From Sub-type Body In Oracle Collection? Server Administration :: Functions To Convert The Long Type Field Data To Varchar2 Type SQL & PL/SQL :: Passing Values From Oracle Object Type To PLSQL Type SQL & PL/SQL :: ORA-02303 - Cannot Drop Or Replace A Type With Type Or Table Dependents PL/SQL :: Passing Values From Table Type To Oracle Object Type PL/SQL :: How To Call A Function Having OBJECT Type As Return Type SQL & PL/SQL :: Cannot Drop Or Replace A Type With Type Or Table Dependents PL/SQL :: Type Attribute With Object Type Or Nested Table? SQL & PL/SQL :: Converting Record Type In Table Type SQL & PL/SQL :: Using Record Type And Object Type? XML DB :: Populate Collection Type From XML Type Get Table Name / Constraint Name / Constraint Type With Join Processes In String Type PL/SQL :: How To Access Type Object Variable Declared Inside Another Type Object PL/SQL :: ORA-02267 / Column Type Incompatible With Referenced Column Type (No Deserializer Found) Using UTL_DBWS? Forms :: Getting Error 404 Not Found ADVERTISEMENT Application Express :: Display Not-found.p