How to get 2 out of procedure with sql dynamic param?

Hello

following my other question on the treatment in the ranks, so that I did a procedure defined ranges for the table I want to deal with;

I did another procedure to obtain a particular range for treatment and that's where I have a problem;

My data are:

{

CREATE THE TABLE PRECUBE. TEST_STG_TMO_RANGES

(

NUMBER OF GLASS FIBER,

MIN_RID VARCHAR2 (18 BYTE),

MAX_RID VARCHAR2 (18 BYTE)

)

tablespace UTI_DAT;

Insert into TEST_STG_TMO_RANGES (GRP, MIN_RID, MAX_RID) values (0, 'AABKSxAAEAACW3pAAA', 'AABKSxAAEAADqCICcQ');

Insert into TEST_STG_TMO_RANGES (GRP, MIN_RID, MAX_RID) values (1, "AABKSxAAEAADqCJAAA", "AABKSxAAEAAD + wICcQ");

Insert into TEST_STG_TMO_RANGES (GRP, MIN_RID, MAX_RID) values (2, ' AABKSxAAEAAD/QJAAA', 'AABKSxAAEAAECyICcQ');

Insert into TEST_STG_TMO_RANGES (GRP, MIN_RID, MAX_RID) values (3, 'AABKSxAAEAAEFQJAAA', 'AABKSxAAEAAEL8ICcQ');

Insert into TEST_STG_TMO_RANGES (GRP, MIN_RID, MAX_RID) values (4, 'AABKSxAAEAAEMSJAAA', 'AABKSxAAEAAEPwICcQ');

}

my package:

{

create or replace
PACKAGE C_UTI_BASIC AS
procedure P_GET_RANGE (table_owner_in in varchar2
TABLE_NAME_IN in varchar2
range_no number
Min_RANGE_OUT OUT varchar2
max_range_OUT OUT varchar2
);

END C_UTI_BASIC;

}

My procedure:

{

procedure P_GET_RANGE (TABLE_OWNER_IN in varchar2
TABLE_NAME_IN in varchar2
RANGE_NO number
MIN_RANGE_OUT OUT varchar2
MAX_RANGE_OUT OUT varchar2
)
is

DDL_STATEMENT varchar2 (4000);

Start

DDL_STATEMENT: ='select MIN_RID, MAX_RID in MIN_RANGE_OUT, MAX_RANGE_OUT in '. TABLE_OWNER_IN |'. ' || TABLE_NAME_IN | "_RANGES where PRV =' | RANGE_NO;

immediately run DDL_STATEMENT;
DBMS_OUTPUT. PUT_LINE (DDL_STATEMENT);
DBMS_OUTPUT. Put_line ('Min_RANGE_OUT :'||) Min_RANGE_OUT);
DBMS_OUTPUT. Put_line ('max_range_OUT :'|| max_range_OUT);
end P_GET_RANGE;

}

I tried to call the procedure with:

{

declare

V_MIN_RANGE_OUT varchar2 (30);

v_Max_RANGE_OUT varchar2 (30);

Start

C_UTI_BASIC. P_GET_RANGE (TABLE_OWNER_IN = > 'PRECUBE')

, TABLE_NAME_IN = > 'TEST_STG_TMO '.

, RANGE_NO = > '4'

, MIN_RANGE_OUT = > V_MIN_RANGE_OUT

, MAX_RANGE_OUT = > v_Max_RANGE_OUT

);

end;

}

but it ends with the error:

Error report:

ORA-06510: PL/SQL: not supported by the user-defined exception

ORA-06512: at "DWH_ADMIN. C_UTI_BASIC', line 2331

ORA-00905: lack of keyword

ORA-06512: at line 5

06510 00000 - "PL/SQL: not supported by the user-defined exception.

* Cause: A user-defined exception has been raised by PL/SQL code, but

not been processed.

* Action: Fix the problem that causes the exception or write an exception

Manager for this condition. Or you may have to contact your

Director of application or DBA.

When I jump the "run immediately" just to see what is output through DBMS output here it is:

{

Select MIN_RID, MAX_RID in MIN_RANGE_OUT, PRECUBE MAX_RANGE_OUT. TEST_STG_TMO_RANGES where PRV = 4

Min_RANGE_OUT:

max_range_OUT:

}

the select statmetent seems OK for me, but the parameters are not met and have the value null;

I would appreicate advice on where I went wrong here and how achieve a correct output

THS

Rgds

Rgds

Outside the use of SQL statements cr@p Dynamics (i.e. DML and not the DDL as implied by your code) and your total lack of variable bind...

And that is your problem.  Your dynamic instruction seeks to select VARIABLES that are out of reach of the dynamic statement itself.  The IN such statements should be part of the EXECUTE IMMEDIATE for example

EXECUTE IMMEDIATE ddl_statement INTO min_range_out, max_range_out;

Tags: Database

Similar Questions

  • Windows XP mode - 7: how to get the Realtek Audio Drivers with GS Wavetable outside normal? Instead of RDP Audio driver!

    1. I upgraded my comp to Windows 7, Ultimate because I need to use many XP programs. What I've discovered, is the virtual XP Mode is not the same thing as XP regular and many programs do not run properly. Particularly theAudio out to lunch and MS GS Wavetable is not available in XP Mode.

    2 - I end up having to buy another XP-Professional and installed in the same notebook. I have to turn off the laptop restart and select the Windows 7 to XP operating system. All old programs work fine under XP.

    3 - I continued looking for a fix for the XP Audio Mode or virtual. Almost 2 years now, I can not find such a simple solution.

    4. today, I found something on the Microsoft RDP Audio driver. What is the reason? Anyone know?

    5. are there available MS drivers or resources?

    I'm not interested in the commercial programs or attempts to scan my computer. MS sold Windows 7 that can run XP so I think that Microsoft is responsible for fixing.

    Thanks in advance,

    VT

    Windows XP mode - 7: how to get the Realtek Audio Drivers with GS Wavetable outside normal? Instead of RDP Audio driver!

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the Windows Virtual PC and XP Mode Forums.

    http://social.technet.Microsoft.com/forums/en-us/w7itprovirt/threads

  • How to get images in indesign CS5 with javascript?

    Hello world

    How to get images in indesign CS5 with javascript? I want to delete them.

    Can someone give me some example codes?

    Thank you

    Bridge

    var doc = app.activeDocument;
    var graphics = doc.allGraphics;
    
    for (var i = graphics.length-1; i >= 0; i--) {
         try {
              graphics[i].remove(); // delete only image
              // graphics[i].parent.remove(); // delete image and its containing frame
         }
         catch (err) {}
    }
    

    Note: Tested in CS3, Windows

    I hope this helps.

    Kasyan

  • How to get the orientation angle screen with 40 Hz stably without delay to sync?

    Goal: Get orientation angle screen at 40 Hz stably without delay for synchronization.

    Problem with two situations:

    1. When you use the bbutil_swap and navigator_event_get_orientation_angle (event) to get the orientation angle screen with other data such as acceleration sensors and gyroscope data, the sampling frequency will be low grade at 10 Hz randomly. The difference of synchronization will increase from 25 ms to 100 ms.

    2. when the screen orientation angle is collected in the following code to get the angle only, the difference in timing of sampling will be 1, 2 or 5 seconds at random.

    Question: How do I get the orientation angle screen with 40 Hz stably without delay to sync?

    or something wrong in my code?

    Mini code:

    public static void handleNavigatorEvent(bps_event_t *event) {}
    switch (bps_event_get_code (event)) {}
    case NAVIGATOR_ORIENTATION_CHECK:
    navigator_orientation_check_response (event, true); If not the line, no updates on the screen rotation.
    angle = navigator_event_get_orientation_angle (event);
    break;
    case NAVIGATOR_EXIT:
    stop = true;
    break;
    }
    }

    public static void handle_events() {}
    for(; ) {
    bps_event_t * event = NULL;
    If (BPS_SUCCESS! = bps_get_event (& event, 0)) {}
    fprintf (stderr, "bps_get_event failed\n");
    break;
    }
    If {(event)
    If (bps_event_get_domain (event) is {navigator_get_domain()})
    handleNavigatorEvent (event);
    }
    } else {}
    break;
    }
    pthread_create (& t1, NULL, (void *) & rawacceleration, NULL);
    }
    }

    int main (int argc, char * argv []) {}
    screen_create_context (& screen_cxt, 0);
    bps_initialize();

    {If (EXIT_SUCCESS! = {bbutil_init_egl (screen_cxt))}
    fprintf (stderr, "bbutil_init_egl failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    If (BPS_SUCCESS! = screen_request_events (screen_cxt)) {}
    fprintf (stderr, "screen_request_events failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    If (BPS_SUCCESS! = navigator_request_events (0)) {}
    fprintf (stderr, "navigator_request_events failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    Rawlog = fopen (rawfilename, "w"); Save the file in a specific path.
    fprintf (rawlog, "Absorption system, Angle\n");

    navigator_request_events (0);

    While (! shutdown) {}
    handle_events();
    bbutil_swap();
    }

    closeshutdown();

    return 0;
    }

    Thank you for your attention,

    Using SENSOR_TYPE_ORIENTATION of sensor_type_t , you should be able to get > 10 Hz.  Use sensor_set_rate() to get the slower delay to call sensor_info().  Make sure not to enable sensor_set_skip_duplicates().

    However get the orientation at the 40 Hz streaming will not make your application any repsonsive more.  The only way to make your app more would be to manage the orientation change in a short period of time.  This is the time when orientation changes (at the hardware level), to receive you and to deal with it.  It is usually a constraint system and there is not that you can do about it.  What you see using the code above is the same information repeated over and over; FACE_UP, FACE_UP, FACE_UP, which is not really useful.

  • How to get data in the procedure after CREATE TABLE table1 AS SELECT * from table2

    Hello

    can any body tell me how to get the data in the new table created in the procedure. because it gives following error.

    • Error (47,21): PL/SQL: ORA-00942: table or view does not exist

    tableName: = "BCKUP_" | TO_CHAR (sysdate, 'ddmmrrrr');

    tableDDL: = 'CREATE TABLE' | tableName. "AS SELECT * FROM Table1 where to_char(MSG_IN_TIME,''dd-mon-rrrr'') < sysdate - ' | daysNumber;

    EXECUTE IMMEDIATE backUpDDL;

    COMMIT;

    DELETE FROM Table1;

    How to select the data in the newly created table. as...

    Select * from ". tableName;

    Do not choose anything to get the number...

    Just after backupDDL EXECUTE IMMEDIATE, simply refers to SQL % ROWCOUNT - who will be the number of lines.

    Oh and DDL engages automatically, your commitment is redundant.

  • How to get Angularjs assist in Eclipse with Extension builder 3

    Hi, I'm newbie started working on the CC extensions using Extension builder 3. I wonder how to get content assist for angularjs in Eclipse Kepler with Extension Builder 3?

    It would be very useful if someone ask me and forum how to get help content here.

    Thanks in advance

    Mac

    Hey Mac,

    You can try this one: AngularJS Eclipse | Eclipse Plugins, packages and products - Eclipse of the market.

    This thread can be useful also: java - angularjs Eclipse IDE configuration - Stack Overflow

    Concerning

    Davide Barranca

    ---

    www.davidebarranca.com

    www.cs-extensions.com

  • Canvio Connect HARD drive - how to get 10 GB of storage with Mac icloud

    Hi I have a 500 GB drive HARD Canvio connect. I formatted to FAT32. In doing so, I have (I think) removed the pre-installed driver needed to get my 10 GB of storage free icloud. When I look at the toshiba site it says do not download here or you will get only 5 GB of storage instead of 10 GB. any suggestions how to get all of the 10 GB advertised on the box?

    Almost the same question, where is an answer?

  • How to get civ3 conquest to work with windows 7?

    I try to get civ3 conquest to work with windows 7 all suggestions

    Hello

    ·        Do you get any error message when you try to play Civ3 conquest?

    Civ3 conquest (conquest of Civilization III) is not compatible with Windows 7. Click on the link below.

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?l=en-us&type=software&s=%20civ3%20conquest%20&OS=32-bit

    Andre Da Costa suggested in his post, you can run the game in compatibility mode and check if you're able to play the game on Windows 7.

    Apart from this, follow the steps mentioned below.

    a. navigate to your Civilization III folder on your hard drive (e.g. "C:\Program Program Interactive")

    b. then, go to the Conquests\ folder and look for a file named LSANS. FOT (not LSANS. (TTF).

    c. Rename LSANS. FOT to _LSANS. FOT (or actually, what you want, as long as it's not LSANS. FOT).

    d. check if you are able to play the conquest of Civ 3 on Windows 7.

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to get an output of server in SQL Developer

    I learn to SQL Deverloper and use it in an academic setting and Oracle at Oracle test cases.

    I know my way around SQL some but I am learning just PL/SQL.  I want to run an anonymous block and get an output for elements 'dbms_output.put_line '.

    At school, I enter my block in the worksheet "SQL" and will receive the "anonymous block finished" in the screen "output of the Script.  Then, there is a 3 screen, whose name I don't remember, but I think it's the equivalent of 'out of server.  When I open it, I have to tell him what database I use.  So I see the dbms output lines in this section 3.

    The problem is when I'm with SQL Developer to work, I see only 2 sections: "SQL worksheet" and "output of the Script.

    I looked, but couldn't find an option or a button or a window that is called something like 'exit from server' or 'view output server.'

    Can a more experienced user please help me?

    I use:

    SQL Developer Version 3.1.07

    Build a HAND - 07.42

    Linux x 86-64

    (Oracle internal):

    Instance: http://celalnx38.us.oracle.com:10507 /

    tnsnames: 10500)

    ROFL!  So I went back and looked at it again, just to be sure... and I found the DBMS OUTPUT on the VIEW menu.  LARGE as LIFE, but I've never SEEN it it is before...

  • stored procedure with cursor as param output

    This is the first time for me to test a stored procedure with a cursor as an out parameter. I performed the following:

    SQL > user_cur VARIABLE REFCURSOR; VARIABLE ret_code VARCHAR2; exec TEST_API. SEARCH_USER (: ret_code, ",", "John", ",: user_cur); print ret_code; print user_cur;

    I got the following error:

    Use: VAR [IABLE] [< variable > [NUMBER |]] TANK | CHAR (n [CHAR |]) BYTE]) |
    VARCHAR2 (n TANK). NCHAR. NCHAR (n) |
    NVARCHAR2 (n) | CLOB | NCLOB | REFCURSOR]]

    Can I know what is the problem?

    The purpose of the stored procedure is looking for user with the name 'john '.

    The declaration of input/output params to stored procedure is as follows:

    PROCEDURE SEARCH_USER
    (
    RETURN_CODE OUT VARCHAR2,
    USER_ID_IN IN VARCHAR2,
    POSITION_IN IN VARCHAR2,
    USERNAME_IN IN VARCHAR2,
    STATUS_IN IN VARCHAR2,
    USER_CUR_OUT ON REFCURSOR
    )

    Published by: user7383310 on October 19, 2008 21:05

    Published by: user7383310 on October 19, 2008 21:05

    refer here for the use of refcursors in pl/sql...
    http://download.Oracle.com/docs/CD/B14117_01/AppDev.101/B10807/06_ora.htm#sthref808

    You can code as...

    SQL> create or replace procedure p1(id number,csr out sys_refcursor) is  2  begin  3   open csr for select ename from emp where deptno = id;  4  end;  5  /
    
    Procedure created.SQL> var csr1 refcursorSQL> var n numberSQL> exec :n := 30;
    
    PL/SQL procedure successfully completed.
    
    SQL> exec p1(:n,:csr1);
    
    PL/SQL procedure successfully completed.
    
    SQL> print csr1
    
    ENAME----------ALLENWARDMARTINBLAKETURNERJAMES
    
    6 rows selected.
    
  • How to get a widget to interact with a menu drop-down

    I am new to the use of Muse, so please excuse my ignorance and the general lack of knowledge.

    I recently downloaded this icon of menu animated burger: Adobe Muse Widgets - WIDGET ICON BUSY BURGER | 123muse

    My question is, how do I get this to interact with a drop-down navigation menu? I'm basically wanting to icon to animate as it opens the menu.

    Thanks for any help!

    Perhaps you could ask the people he sold instead of us?

    123muse.com | Send us an email

  • How to get a shade of 360 ° with this gradient mesh?

    With the key 'A', I selected the 4 points of the inner circle to change the opacity of the shade, but as you can see there is not one continuous line. How can I fix this and get a shade of the whole circle?trama.png

    Use the Lasso tool to select these points, traore are superimposed.

    (but I would use a radial gradient to fill a circle).

  • How to get my size perfectly shot with the framework?

    I use first CS5! I had trouble getting my "dailies" to adapt to the screen. If you look at the screen on the left below, what should be the size and frame. But it seems not to slip in the window with the final cut. I don't know if he has extremely zoomed in or what the problem is. If I click on it, I can turn to the size of the window, but in this case, it changes the size of the video. I projected all the details of my video below. Please help with this ASAP

    Screen Shot 2014-01-20 at 3.48.59 PM.pngScreen Shot 2014-01-20 at 3.47.26 PM.png

    When you launch first CS5, you are presented

    with a menu of pre-defined sequence types to choose from.

    You can skip this step by pressing "Cancel", then

    import (or capture) your media, and to do this:

    Or, right click on a media file and select "new sequence of the Clip".

    None of these methods will ensure your sequence matches your media.

    How to choose the right sequence settings?

    http://www.video2brain.com/en/lessons/how-do-i-choose-the-right-sequence-settings

    Using Adobe Premiere Pro / creating and changing sequences

    http://helpx.adobe.com/premiere-pro/using/creating-changing-sequences. HTML

  • My emails now have a lot of details in the box of the address such as references, how to get rid of this message with ID

    I've had various problems with Thunderbird for 24 hours. I have finally found my missing files, but when I send and receive emails, there is a lot of stuff printed in the box of the address that seems to be all digits of the identification details, in response, the details of the message, for the most part. What is - this and how it can be removed?

    In the menu, see. Headers | Normal

    No menu? Press on and hold the < alt > button on your keyboard, press v.

  • How to get rid of specialties associated with those profile?

    Just because I have either created, commented or other on individual/topic thread, just do not make me an expert, rather it means that I have an interest. I get the distinction - Apple? I guess there is no way to get rid of the annoying little icons?

    At present, there is no way to get rid of the specialty badge icon. Apparently the PTB, think it's cool, and we're stuck with it for now. It is supposed to encourage new members to join and participate.

Maybe you are looking for

  • ICD-P320 for Windows 8.1

    Need to get this device works on Windows 8.1. You need to be able to open old dvf files. Thanks for any help.

  • MX30-115: power issues

    HelloI have a problem with my MX30-115 because after an indefinite time, when I have the power supply plugged in, my computer detects it but using the battery and dischards it.I have to unplug my external power adapter and plug it in again and everyt

  • Can't send or receive sms on 6s

    GGot 6s another day and can not use sms someone help

  • 4071 autorange

    Hi again, I have another question regarding the 4071 dmm and autorange. When you use the selector/DMM express it is not possible to select autorange and 7.5 figures? Is there a limitation in this sense? Thanks again, Concerning

  • Drive external DRIVE will not appear in the computer, only in the device Mgr?

    Device ADD A THE HD GOFLEX EXT ON THE BACK USB PORT, BUT APPEARING ONLY NOT IN THE DOMAIN OF THE COMPUTER. ONLY IN THE DEVICE MGR. HOW TO SOLVE THIS PROBLEM SO THAT I CAN MOVE THE FILES TO IT