Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7566117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:19:49+00:00 2026-05-30T14:19:49+00:00

I have the following custom RECORD TYPE : TYPE TB48_RECTYPE IS RECORD ( codpo

  • 0

I have the following custom RECORD TYPE:

TYPE TB48_RECTYPE IS RECORD ( 
                             codpo varchar2(5 BYTE),
                             codco varchar2(5 BYTE),
                             quadr varchar2(5 BYTE),
                             espec varchar2(5 BYTE),
                             aperf varchar2(5 BYTE),
                             subes varchar2(5 BYTE),
                             datin date);

And now a function that returns the exact same type.

function retorna_infos_tabela_48(i_nip in varchar2) return TB48_RECTYPE is

retorno_REC TB48_RECTYPE;


begin
    select m.CODPO,
           m.CODCO,
           m.QUADR,
           m.ESPEC,
           m.APERF,
           m.SUBES,
           m.DATIN 
    into retorno_REC
    from TB48_M m
    where m.NRO = i_nip;

    return retorno_REC;

end retorna_infos_tabela_48; 

However, (and this has cost me more than 4 hours already), when I try and run it like this:

    DECLARE 
    TYPE TB48_RECTYPE IS RECORD (
                             codpo varchar2(5 BYTE),
                             codco varchar2(5 BYTE),
                             quadr varchar2(5 BYTE),
                             espec varchar2(5 BYTE),
                             aperf varchar2(5 BYTE),
                             subes varchar2(5 BYTE),
                             datin date);
  RetVal TB48_RECTYPE;
  I_NIP VARCHAR2(200);

  BEGIN 
    I_NIP := '88888888';
    RetVal := RETORNA_INFOS_TABELA_48 ( I_NIP );
    COMMIT; 
  END;

I get the following error message: PLS-00382: expression is of wrong type. (on the line that I assign the function returned value to the RetVal variable)

I mean, the function returns a RECORD which is of the exact same type as the variable I’ve declared!! What am I missing here???

Thanks (and a few REP points) in advance.!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:19:51+00:00Added an answer on May 30, 2026 at 2:19 pm

    I suspect your problem is that you attempting to place a globally declared type into a locally declared one.

    I think if you change your procedure to the following it should work.

    declare
    
      RetVal TB48_RECTYPE;
      i_nip varchar2(200);
    
    begin
    
       i_nip := '86583557';
       RetVal := USERTEMPOS.PKG_ESTRANG_NOVA.RETORNA_INFOS_TABELA_48 ( I_NIP );
    
       commit;
    
    end;
    

    Currently your commit is doing nothing…

    You haven’t provided how you created your global type, but if you didn’t do it in a package then the provided syntax is incorrect; are you sure it compiled?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom control that has the following prototype. Type.registerNamespace('Demo'); Demo.CustomTextBox = function(element)
I have the following html in my site: <link type=text/css href=/Styles/ui-lightness/jquery-ui-1.8.2.custom.css rel=Stylesheet /> <link
I have the following XElement <Issue Type=Duplicate Distance=1> <Record> <ID>6832</ID> <Name_First>JAMES </Name_First> <Name_Last>SMITH</Name_Last> <Company>SMITH
I have the following methods in my simple Custom Parser Class, when I execute
I have the following situation: There is one custom view inside of the first
I have the following code in WCF service to throw a custom fault based
I have the following lines in my ~/.emacs.d/init.el (custom-set-variables '(flymake-allowed-file-name-masks (quote ( (\\.cc\\' flymake-simple-make-init)
I have used the following article as a guide to creating a custom EditorPart
What I am attempting to do is the following: I have a custom object
I have a custom sharepoint web part that is throwing the following exception: System.Security.SecurityException:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.