Solved

Create Fuction Error PLS-00201: identifier 'T_VARCHAR2_TAB' must be declared

Posted on 2012-04-13
2
1,033 Views
Last Modified: 2012-04-13
I'm trying to create function received from vendor and it will not compile.  I've googled but can't seem to find out why?

CREATE OR REPLACE FUNCTION CLARITY.tab_to_string_2
(p_varchar2_tab  IN  t_varchar2_tab, p_delimiter     IN  VARCHAR2 DEFAULT ',')
RETURN VARCHAR2 IS l_string VARCHAR2(32767);
l_str varchar2(32767) := ' ';
BEGIN

  if p_varchar2_tab.First is NULL and p_varchar2_tab.Last is NULL then
    return l_string;
  end if;
  FOR i IN p_varchar2_tab.FIRST .. 5 LOOP
    IF i != p_varchar2_tab.FIRST THEN
      l_string := l_string || p_delimiter;
    END IF;
    if i > p_varchar2_tab.LAST then
        l_str := i || ' ';
    else
        l_str := i || p_varchar2_tab(i);
    end if;
    l_string := l_string || l_str;
  END LOOP;
  RETURN l_string;
END tab_to_string_2;
/

Warning: Function created with compilation errors.

>  show errors
Errors for FUNCTION TAB_TO_STRING_2:

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      PL/SQL: Compilation unit analysis terminated
2/22     PLS-00201: identifier 'T_VARCHAR2_TAB' must be declared
0
Comment
Question by:diannagibbs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 37843594
do you have the t_varchar2_tab   object type created?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 37843598
I'm going to guess you probably need something like this..


create or replace type clarity.t_varchar2_tab as table of varchar2(4000);
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pivoting oracle table 9 74
Oracle Errors 11 52
Java array 10 63
How to write a *nix script in the most generic and compatibile way 2 24
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question