Solved

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

Posted on 2012-04-13
2
1,010 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
  • 2
2 Comments
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
do you have the t_varchar2_tab   object type created?
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This is about my first experience with programming Arduino.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video shows how to recover a database from a user managed backup
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now