Split function does not

Hi all

I found this in this forum to split a string into a pl/sql table
(I need to be a pl/sql table)

CREATE OR REPLACE PACKAGE pack_test IS
 
    TYPE T_ARRAY IS TABLE OF VARCHAR2(255) index by binary_integer;
 
    FUNCTION get_array_from_string(p_string    IN VARCHAR2,
                                   p_separator IN VARCHAR2) RETURN T_ARRAY;
END pack_test;
/ 
CREATE OR REPLACE PACKAGE BODY pack_test IS
 
    FUNCTION get_array_from_string(p_string    IN VARCHAR2,
                                   p_separator IN VARCHAR2) RETURN T_ARRAY IS
        v_string      VARCHAR2(4000);
        v_initial_pos NUMBER(9) := 1;
        v_position    NUMBER(9) := 1;
        v_arr_string  T_ARRAY := T_ARRAY();
    BEGIN
        v_string := p_string || p_separator;
        LOOP
            v_position := INSTR(v_string, p_separator, v_initial_pos, 1);
            EXIT WHEN(NVL(v_position, 0) = 0);
        
            v_arr_string.EXTEND;
            v_arr_string(v_arr_string.COUNT) := SUBSTR(v_string, v_initial_pos, v_position - v_initial_pos);
            v_initial_pos := v_position + 1;
        END LOOP;
    
        RETURN v_arr_string;
    END get_array_from_string;
END pack_test;
/ 
has tried this:
declare
  TYPE T_ARRAY IS TABLE OF VARCHAR2(255) index by binary_integer;
  lv_elements   t_array;
begin
  lv_elements := pack_test.get_array_from_string('1,2,3,4', ',');
end;  
and it gives me:
ORA-06550: Regel 5, kolom 18:
PLS-00382: Uitdrukking heeft onjuist type..
ORA-06550: Regel 5, kolom 3:
PL/SQL: Statement ignored.
expression is of the wrong type

what I am doing wrong



KR
Martin

Hello

The t_array type defined in the package is not the same as the t_array type defined in your anonymous block. They may have the same name and the same characteristics, but they are both distinct and non-interchangeable.

Change the call block so that it uses the type declared in the package:

declare
 TYPE T_ARRAY IS TABLE OF VARCHAR2(255);     -- Not needed, you can delete this line
  lv_elements   pack_test.t_array;          -- This line has been changed
begin
  lv_elements := pack_test.get_array_from_string('1,2,3,4', ',');
end;

Tags: Database

Similar Questions

  • Audition Audio 'Split function' does not?

    Have no idea why, but on my old Adobe audition 3.0 version (which works perfectly), when I go to multitrack view and want to change a track - requiring the split function - it does not work.   I pull up the menu and 'split' is one of the options (normal) - then I left click on the position where I want to change the audio track.  (normal)  THEN, when I use the right click and HOLD function on the mouse to "drag" the piece of splitting the audio down in another (normal) track, now it does not work - nothing happens.   Our here does he know why it can happen?  Very frustrated.  Is there a secondary way, I can try to 'split' or separate and 'move' the play published audio... when done, I then MIX again...

    For the record - I CAN cut section and paste it into another track, but I can't MOVE the tracj with my my right click on the mouse.

    make people of sense?  pls advise - Johnny W

    You have the right hybrid tool, selected from among the four tool icons in the menu bar? You don't do a right-click and drag if you have the choice of time or scrub tool selected.

  • I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    Question
    I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.

    edit, escaped mod < s > in order to avoid the line through question

    A web page can be defined a "accesskey" for an item. Unlike IE/Chrome/Safari, who use the Alt key only, Firefox requires pressing Alt and Shift to activate the element. In other words, try

    ALT + SHIFT + S

    and see if it works.

    I don't know of any way to change this so that the change is not necessary. There may be an add-on?

  • Satellite Pro 6000; sleep function does not work after upgrade W98 SE to XP

    I bought a windows XP cd and installed on W98 on my Satellite Pro 6000. The sleep function does not work now. I probably need a software of Toshiba. What do I need? Where can I find? What is the order of installation?

    Hello

    All drivers Windows XP Home edition, tools and utilities you can find on Toshiba support page under http://eu.computers.toshiba-europe.com > support & downloads. You have old laptop model and because of this type of product, you choose option ARCHIVE.

    Order of the facilities is as follows:
    -Windows XP
    -Display driver
    -Audio driver
    Toshiba - common modules
    -SD Card host driver
    -SD Card Driver
    -BlueTooth Stack
    BlueTooth - Easy Connect
    -Mouse driver
    -Modem driver
    -LAN driver included with Windows XP
    -Infrared driver
    -Toshiba Power Saver
    Utilities - Toshiba
    Toshiba - post Mobile
    -Toshiba Console worm.
    -Toshiba Hotkey for display devices

    I hope that you will be able to install Windows XP Home edition successfully.

    Good luck!

  • curve adjustment function does not work

    Hi all

    I am trying to bend fitting, a graphic. but the curve adjustment function does not work. I get no output curve.

    which suggests to me u.

    Thank you

    You have been asked to view the code. We cannot solve the photos.

    Matrices X and Y are same length? Is a NaN value? What the output error say you?

    (Also note that in this case, it would be convenient if we don't need to wire x take a look at this idea!)

    This discussion is useless until you attach a real VI and data, so please.

  • My gesture control function does not work correctly there on and off automatically

    My gesture control function does not work correctly there on and off automatically

    which application you are using? try reinstalling the media gallery.

  • Backup function does not?

    Backup function does not. The program runs and ends with an error message, access is denied. (0x80070005). Looks like a backup has been completed. I tried another external hard drive as a destination and got the same result. Help!

    Hello

    · You are the administrator of the computer?

    Step 1: Make sure that you are connected to the computer as an administrator. If you are not then you will need administrator to help you in the backup.

    Step 2: Temporarily disable the antivirus and check if the problem persists. If no problem occurs, then you need to firewall settings in the security software.

    Note: Check that you activate your anti-virus protection on the computer back after you complete these steps. It is not recommended to disable these settings on the computer. It's just to solve the problem.

  • AUTO PLAYBACK FUNCTION DOES NOT WORK

    AUTO PLAYBACK FUNCTION DOES NOT WORK WITH MY ADOBE PHOTOSHOP 7

    Try to uninstall and reinstall the program.  If this does not work, then I suggest that you contact adobe at http://www.adobe.com/support/photoshop/support.  This doesn't seem to be a Vista problem - it sounds like a problem with Adobe Photoshop. Lorien - a - MCSE/MCSA/network + / A +.

  • Sleep function does not

    Sleep function does not

    http://www.Vistax64.com/tutorials/63567-power-options-sleep-mode-problems.HTML?filter [11] = power % 20Management

    Read the info on sleep disorders in the tutorial above.

    http://www.Vistax64.com/tutorials/198047-power-plan-restore-default-settings.html

    Also read this tutorial; as well as the 'related links' at the bottom of the links above.

    See you soon.

    Mick Murphy - Microsoft partner

  • The side-by-side function does not work correctly, windows overlap

    original title: sizing windows side-by-side

    The side-by-side function does not work correctly, windows overlap.  How do fix you this feature?

    Hello

    It is Aero Snap.  When you select a window how you "cutting" it in position?  You do not use the window key and the arrow left/right or are you drag / drop window?  If you drag / drop, using the keyboard shortcuts help to solve the problem?

    Kind regards
    Alex T.
    ~ 2007-2011 MVP Windows desktop experience ~

  • Z30 blackBerry not able to sign in Blackberry Protect. Backup and restoration of function does not. "Your device is not associated with a Blackberry ID."

    Unable to sign in Blackberry Protect.  Backup and restoration of function does not. Message is: "your device is not associated a Blackberry ID."  My Blackberry Messenger and Blackberry World works well so I'm sure this isn't a problem of ID on the phone.  I can sign in link, Blackberry.com and Protect.  I see my device to protect, but can't send messages, or view it on a map.  Times out with cannot reach peripheral message.  BB Protect on device has a circle whirling next to the on/off switch.  Cannot turn off.

    I deleted the link and re-installed.

    I reset the phone to the default (factory) and signed in.

    OS level is 10.2.1.3062

    BB link is 1.2.3.56

    I managed to understand this. I had to remove the device from the Blackberry Protect site.  Protect.BlackBerry.com. I deleted my new and connected device with my Blackberry ID.  I don't know if the step of wiping was necessary because I have not tried my backup with the current configuration of the device after the deletion.  The restoration is underway for me!

  • Right-click the folder or any other function does not work, and I don't have a sticky key...

    Right-click the folder or any other function does not work, and I don't have a sticky key...

    While I click right click in windows Explorer has stopped working... Help, please!

    A Virus Scan. Your PC can be infected. If you have not installed it, use MS Security Essentials if you have a genuine Version of Windows. It's free.

  • Win7 64 bit freezes & arrow function does not work, do not click to navigate anywhere

    Win7 64 bit PC crashes & arrow function does not work, do not click to navigate anywhere, exceptionally after being on ~ 2 + hrs. I can only turn off by pressing the power switch for about 5 seconds.

    Hello

    You did changes to the computer before the show?

    Method 1
    Step 1:
    I suggest to start the computer in safe mode and check if the problem persists.

    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    Step 2:  If the problem is solved in safe mode, then I suggest you perform the clean boot and remove the program that is causing the problem.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: Follow step 7 clean boot KB929135 article to reset the computer in normal mode.

    Method 2
    I suggest you try the steps from the following link:

    Optimize Windows 7 for better performance
    http://Windows.Microsoft.com/is-is/Windows7/optimize-Windows-7-for-better-performance

    Also provide an observer event logs.
    Open event viewer
    http://Windows.Microsoft.com/en-in/Windows7/open-Event-Viewer

  • pcap_loop() to winpcap function does not work in windows8 pro

    Hi all

    I have two windows machines 8, both are 32-bit computers. One is windows 8 and the other is windows 8 pro (version 6.2 Build: 9200).
    I run an application to capture the packets of winpcap. To do this I use dll like 'wpcap.dll, Packet.dll, pthreadVC.dll' and also 'npf.sys"pilot.
    Version of wpcap is "4.1.0.2980", I downloaded this dll from ' http://www.winpcap.org/ '.
    In windows 8 "pcap_loop()" pro machine function does not work, but in windows 8 OS base it works fine and I can able to capture the packets of winpcap.
    Everyone please help me solve this problem.
    I have already installed the update compatibility for windows 8 from 'http://support.microsoft.com/kb/2764462' in windows 8 pro machine, but it does not solve the issue.
    Thanks in advance.
    R VR

    Hello

    I would have you post your query in the MSDN Community because it caters to an audience of it professionals. Your question would be more out there

    http://social.msdn.Microsoft.com/forums/vstudio/en-us/home?Forum=vbgeneral

    You can also contact WinPcap for assistance in resolving this issue.

    If you have questions about Windows operating systems, help us on this forum.

  • Basic commands and functions does not

    Hello

    MAIN PROBLEMS:

    1. Chronology of basic functions does not work. My tool icons do not change (for example I click on C for the Cup and the cursor remains a mistake), they still work.
    2. I can no longer drag my clips in and around the timeline, they are "stuck" in place.
    3. A clip with the audio and video are not bound when placed in the sequence. In the video drop-down, it is said that they are linked, but clips act otherwise.
    4. I can't right click on anything in my calendar.

    So here's the big problems I've met only a tooling around. I tried uninstalling and reinstalling several times, with 2015.4 and 2015.3. I'm puzzled.

    The film plays very well and is able to export, problems seem to focus on the timeline navigation and use.

    TECHNICAL DATA:

    • 2013 mac Pro
    • OS X El Captian
    • Version 10.11.1
    • 3.7 GHz Quad-Core Intel Xeon E5

    Any help would be greatly appreciated!

    Hi PatrickShelton,

    Sorry about your problem, try the following steps.

    Go to the following locations:

    1 location: In the Finder, click go > go to folder > ~/Library/Application Support/Adobe

    Situation 2: Go > go to folder > ~/Library/Preferences/Adobe

    Location 3: Documents > Adobe

    Everywhere, rename the folders 'Adobe' to 'OldAdobe '.

    Launch the first, accept the license agreement and see if it works.

    Note: You will lose your customized workspaces and keyboard shortcuts.

    Thank you

    Ilyes Singh

Maybe you are looking for