Solved

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

Posted on 2012-04-13
2
1,017 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
ID: 37843594
do you have the t_varchar2_tab   object type created?
0
 
LVL 73

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

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.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This is about my first experience with programming Arduino.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

920 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

13 Experts available now in Live!

Get 1:1 Help Now