[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2012-04-13
2
Medium Priority
?
1,075 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

650 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