Need help with dynamic where clause.

Hello world.  I'm kind of a novice with PL/SQL, so please be patient with me.  I am building a web application using Weblogic Oracle 11 g and Oracle database.

To make a long story short, I need to generate the complex dynamic WHERE clause.  I don't know what will be the name of the column or the operator of comparison or the value will be until the moment of execution.

I'm not 100% certain, but I think I need to use dynamic SQL statements.  Unless there is a better way to do it.

I'm sure that using dynamic SQL opens me up to SQL injection attacks if I use simple string concatenation.  I would like to use bind variable if possible.

In any case, it seems like trying to build a dynamic where clause does not seem to work as I want it would be...

bv1 := 'colA = 5 and colB >= 9';

query_str := 'SELECT * FROM view WHERE :bv1';

OPEN CUR FOR query_str USING bv1;

The code above pours out when I try to run it.

Is there a way to build dynamic where the provisions without the use of concatenation of simple string that leaves me open to attacks by SQL injection?

Thank you

Hello.  I have read briefly upward on things, you suggested, but it seems a bit abstract for me since I was a novice.

Can you give us an explanation or an example of how to use it to accomplish what I need to do?

Do ypu really plan create a query with a WHERE clause that contains a predicate for all possible columns?

Variable bind offer performance when the same query is executed several times with different values for bind variables.

Select * from emp where empno =: v_empno

After the first run Oracle will always be this query in the library cache. The next running can use the version of the cache even if the bind value is different.

Select * from emp where empno =: v_empno;

Select * from emp where ename =: v_ename;

Select * from emp where sal =: v_sal;

Each one is a DIFFERENT query. Yes - each of them uses a variable binding, but queries are different.

So, if your username select EMPNO, an '=', and a value from the first query can be executed. But the next time that the user can select the ENAME column so that 'stored' first request may not be used given that the query does not match.

The third time your user selects SAL so none of the first two queries can be used in the library cache. The use of bind variables gives performance during the SAME QUERY is used multiple times with DIFFERENT values for the variable binding. Oracle is not to analyze the hard query everything simply because the VALUE is different.

So bind variables do not help you if most of the queries were completely DIFFERENT sets of predicates. And SYS_CONTEXT will not help either since that simply provides a way to define binds the values of the variables.

Just for the simple example above, there are at least SIX possible combinations of columns that could choose your user name: empno, ename, sal, empno ename, empno & sal, ename & sal

Tags: Database

Similar Questions

  • Need help with dynamic Action through 4 items

    Hello everyone.

    I'm having some trouble trying to comp with dynamic action that will turn on or display a select list item when a value is set for the four elements of the Radio button group.

    P1_SELCT_LIST

    P1_RADIO_GROUP_1

    P1_RADIO_GROUP_2

    P1_RADIO_GROUP_3

    P1_RADIO_GROUP_4

    So once all four Radio groups are not null, I want the select View list item.

    Any help with this would be great.

    I'm on Apex 4.2.0.00.27

    Hello

    You can create the following action:

    Event: click on

    Selection type: jQuery selector

    jQuery selector: radio

    condition:

    $v ('P1_RADIO_GROUP_1')! == ''

    &&

    $v ('P1_RADIO_GROUP_2')! == ''

    &&

    $v ('P1_RADIO_GROUP_3')! == ''

    &&

    $v ('P1_RADIO_GROUP_4')! == ''

    Then add a real Action as follows:

    ACtion: show

    Fires when the result of the event is: true

    Fire on the page loading: No. (uncheck)

    Assigned to elements, selection type: product (s)

    Product (s): P1_SELECT

    Also add an Action to false as follows:

    ACtion: hide

    Fires when the result of the event is: false

    Fire on the page loading: YES (check)

    Assigned to elements, selection type: product (s)

    Product (s): P1_SELECT

    Kind regards

    Vincent

    http://vincentdeelen.blogspot.com

  • Newb needs help with dynamic text

    Hello world

    I'm not a newb - but that's how...

    I am trying to create a multi-page form that allows uses to register the products.
    The first page asks you name etc., and on the second page, I want to say "Welcome"+ username "!" -This kind of thing...
    The problem is that I can't seem to keep the values of dynamic text through the pages.

    I can get it to repeat the entry on the first page with this code:

    _root.firstname_txt. OnChanged = function() {}
    _root.firstname_repeat. Text = "Hello"+ _root.firstname_txt.text; "
    };

    However when I call on the second page it is not defined:

    second_repeat. Text = "Hello"+ _root.firstnamt_txt.text; "
    trace (_root.second_repeat.text);

    I'm sure it's something simple and I am just a dunce of programming...
    Any help is appreciated.

    your

    If your textfield (_root.firstname_repeat) does not exist on the 2nd frame, its text property will be indefinite.

    to remedy, or extend the existence of your textfield in frameworks or use a variable to store its text property (in your manager onChanged) and use this variable to retrieve the value you need.

  • I need help with dynamic input text

    I am developing a game and I have a problem with my dynamic input text. I am doing my input text appear on other images whenever I click on the button, well, I tried a few solutions I've seen here, but it hasn't really well.
    This is the first code I used:

    Stop();

    function handleClick(pEvent:MouseEvent):void {}

    var myfirstVariable = box1.text;

    Welcome.Text = "Welcome to the game" + myfirstVariable;

    }

    enter_button.addEventListener (MouseEvent.MOUSE_UP, handleClick);

    This works but only on an image. and this is the code I'm trying to use now:

    Stop();

    var enteredText:String;

    welcome.addEventListener (Event.CHANGE, updateString);

    function updateString(evt:Event) {}

    enteredText = welcome.text;

    }

    enter_button.addEventListener (MouseEvent.MOUSE_UP, handleClick);

    and on the other images:

    Stop();

    enteredText = welcome_2.text;

    Thank you much for the help ^^

    If you change the images have an another textfield on this new framework, you must set its text property to:

    enteredText = welcome_2.text;<-comment out="" this="" line="" and="">

    welcome_2.text = enteredText;

  • Need help with order by clause row_number() Fn

    with t as
    (
     select 123 id, 'brwr' lstatus from dual
     union all
     select 123 id, 'ca' lstatus from dual
     union all
     select 123 id, 'fac' lstatus from dual
     union all
     select 345 id, 'ca' lstatus from dual
     union all
     select 345 id, 'brwr' lstatus from dual
     union all
     select 567 id, 'brwr' lstatus from dual
     union all
     select 789 id, 'brwr' lstatus from dual
     union all
     select 1011 id, 'fac' lstatus from dual
    union all
     select 1011 id, 'xyz' lstatus from dual
    )select id,lstatus,row_number() over(partition by id order by lstatus)rw
     from t;
    Desired output
    id           lstatus       rn
    
    123         brwr         3
    123         ca          1
    123         fac         2
    345         ca          1
    345         brwr         2
    567         brwr         1
    789         brwr         1
    1011         fac        1
    1011  xyz         2
    That is, my first priority is to 'ca', then 'College '.

    I am aware that this can be done through the use of CASE within the order by clause
    but could not find the logic of the apt.

    Please help me.

    A solution just for data given to samples...

    with t as
    (
     select 123 id, 'brwr' lstatus from dual
     union all
     select 123 id, 'ca' lstatus from dual
     union all
     select 123 id, 'fac' lstatus from dual
     union all
     select 345 id, 'ca' lstatus from dual
     union all
     select 345 id, 'brwr' lstatus from dual
     union all
     select 567 id, 'brwr' lstatus from dual
     union all
     select 789 id, 'brwr' lstatus from dual
     union all
     select 1011 id, 'fac' lstatus from dual
    union all
     select 1011 id, 'xyz' lstatus from dual
    )select id,lstatus,row_number() over(partition by id order by (case  when lstatus <> 'brwr' THEN UPPER(lstatus) else lstatus end)) rw
     from t;
    

    Basically, it shows how to use the CASE statement. You can change based on your actual data.

    Concerning
    Arun

  • Help with MySQLI WHERE clause

    I am trying to retrieve records from a table of unique composition based on the following criteria:

    -members belong to 2 different associations (coded: Association = 1 or 2)

    -Some members have no postal addresses (coded: adresse_rue) and will not send mail.

    -Some members Association = 1 don't you mail (coded: D or V or W, X or Z)

    -No member of the Association 1 with cur_bal_2 = < gets 10 mail

    -No member of the Association 2 with cur_bal_2 = <-1 get mail

    -cur_bal_2 field is a numeric value in the table.

    I tested

    WHERE (Mbr_Scat = 'P' AND Association = 2 AND adresse_rue <>' ' AND cur_bal_2 > = - 1) by itself results accurate/w

    I tested

    WHERE (Mbr_Scat <>had ' AND Mbr_Scat <>'V' and 'W' AND Mbr_Scat <>'X' <>Mbr_Scat ' AND cur_bal_2 >-20 AND adresse_rue <>' ") by itself, results also w/accurate

    But-

    When I combine the above to:

    WHERE

    (Mbr_Scat = 'P' AND Association = 2 AND adresse_rue <>' ' AND cur_bal_2 > = - 1).

    OR

    (Mbr_Scat <>had ' AND Mbr_Scat <>'V' and 'W' AND Mbr_Scat <>'X' <>Mbr_Scat ' AND cur_bal_2 >-20 AND adresse_rue <>' ")

    the part of the WHERE the criteria cur_bal_2 > = - 1 is not running (ONLY this part of the statement fails - members whose balances is less than-1 selecting.)

    I get no error message.

    Suggestions?

    Best regards and thank you all,.

    Tom Smith

    Try this:

    WHERE adresse_rue <> "

    AND

    ((Association = 1 AND Mbr_Stat pas dans (serait ', 'V', 'W', 'X', 'Z') AND cur_bal_2 > = - 10) OR (Association = 2 AND cur_bal_2 > = - 1))

  • Need help with dynamic code generation

    Hi people,


    I'm trying to dynamically create and run the following query

    Environment: Oracle Database 10 g Enterprise Edition Release 10.2.0.4.0
    DECLARE
    A NUMBER;
    stmt VARCHAR2(200);
         4
         5  CURSOR C1 IS
         6  SELECT TABLE_NAME
         7  FROM DB_MGMT.CTRL_TAB_RETENTION
         8  WHERE RETENTION_PERIOD_IN_MONTHS = 11
         9  AND rownum < 2;
        10
        11  BEGIN
        12  FOR i IN C1
        13  LOOP
        14
        15  -- dbms_output.put_line('Table Name: ' || i.TABLE_NAME);
        16
        17  -- dbms_output.put_line('SELECT min(DT_SKEY), max(DT_SKEY) FROM '||i.TABLE_NAME||' ;');
        18
        19  stmt :='SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.'||i.TABLE_NAME||';';
        20
        21  dbms_output.put_line(stmt);
        22
        23  execute immediate stmt;
        24  END LOOP;
        25  END;
        26  /
    I get the following error message
    SQL> @sanity_check
    SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.FACT_NOK_CELL_SERVICE2_HH;
    DECLARE
    *
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at line 23
    Does anyone can spot obvious syntax errors in the code above?

    Thanks in advance

    rogers42

    rogers42 wrote:
    Hello

    Thanks for the suggestion.

    Everything by getting rid of aid ';', but the output of the select statement is not displayed?

    When you use a SELECT statement in PL/SQL, you must select the results in variables or arrays.
    Try something like this:

    DECLARE
         CURSOR C1 IS
                       SELECT  TABLE_NAME
                FROM    DB_MGMT.CTRL_TAB_RETENTION
                WHERE   RETENTION_PERIOD_IN_MONTHS = 11
                AND     rownum                  < 2;
    
         min_dt_skey    NUMBER;
         max_dt_skey    NUMBER;
         stmt            VARCHAR2 (100);
    BEGIN
        FOR i IN C1
         LOOP
    
            -- dbms_output.put_line('Table Name: ' || i.TABLE_NAME);
    
            stmt :='SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.' || i.TABLE_NAME;
    
            dbms_output.put_line(stmt);
    
            EXECUTE IMMEDIATE stmt
             INTO min_dt_skey, max_dt_skey;
         dbms_output.put_line (  min_dt_skey   || ' = MIN (dt_skey), '
                        || max_dt_skey   || ' = MAX (dt_skey) for table '
                        || i.table_name
                        );
        END LOOP;
    END;
    
  • Help with the WHERE clause

    I have a Select statement where I want to select rows where weighs only 1 of the selected date 3 columns is null. Is this possible?

    Select rec_date, prior_rec_date2, prev_rec_date3
    of my_receipts
    where (not more than 1 or the date 3 fields is null)

    Any help would be greatly appreciated.

    Hello

    WHERE   NVL2 (rec_date,        1, 0) +
            NVL2 (prior_rec_date2, 1, 0) +
            NVL2 (prev_rec_date3,  1, 0) >= 2
    
  • Hello all, I need help with creating a dynamic region in jdeveloper 11.1.2.3 version

    . Hello everyone, I need help with creating a dynamic region in jdeveloper 11.1.2.3 version

    What JDK you are using?

    You are probably using an old version of the JDK, that class while compiled under JDK 1.7.0

    http://java67.blogspot.com/2012/10/how-to-fix-javalangunsupportedclassversionerror-major-minor-version-49-50-51.html

    For example, work with the correct version, and it will be fine...

  • Very Urgent: Setting dynamic where clause for Popup list VO

    Hello world


    It is a very urgent requirement please help as soon as possible.


    I have a custom page in iSupplier. I created two supplier site, number of PO fields.

    Site of beg - choice of Message and PO number - Message LOV of entry


    I have a named VO under xxisupplier.oracle.apps.pos.home.poplist.server for site begging and xxisupplier.oracle.apps.pos.home.lov.server for PO number.

    I have joined these two VO AM homepage.




    Now the question is

    1. I want to restrict these VO vendor_id-based so I'll put dynamically where clause for these two VO of in my CO


    VO SITE PROVIDER QUERY


    SELECT POVs.vendor_site_code site, pov.vendor_id
    OF po_vendors pov, povs po_vendor_sites_all
    WHERE pov.vendor_id = povs.vendor_id
    AND TRUNC (povs.inactive_date) IS NULL


    PO NUMBER LOV QUERY VO


    SELECT DISTINCT ai.invoice_num, ai.vendor_id, ai.invoice_date, poh.segment1
    AI ap_invoices_all,.
    help ap_invoice_distributions_all,
    po_headers_all poh,
    po_distributions_all pda,
    Al ap_lookup_codes
    WHERE aid.po_distribution_id = pda.po_distribution_id
    AND ai.invoice_id = aid.invoice_id
    AND poh.po_header_id = pda.po_header_id
    AND ai.invoice_type_lookup_code = al.lookup_code
    AND al.lookup_type = 'INVOICE TYPE'


    I am creating where cluase as below in CO



    If (vendor_id1! = null)
    {
    System.out.println ("vendor_id:" + vendor_id1);
    OAViewObjectImpl vo = (OAViewObjectImpl) am.findViewObject ("PO_LOV_VO");
    if(vo!=null)
    {
    vo.clearCache ();
    VO. Reset();
    System.out.println ("inside IN. VO:" + vendor_id1);
    vo.setWhereClause (null);
    vo.setWhereClause ("vendor_id =: 1");
    vo.setWhereClauseParams (null);
    vo.setWhereClauseParam(0,vendor_id1);
    vo.setOrderByClause ("invoice_date DESC");
    String INVQRY = vo.getQuery ();
    System.out.println ("INVQRY:" + INVQRY);
    vo.executeQuery ();
    VO. First();
    System.out.println ("after the query appear" + vo.getRowCount ());
    }

    OAViewObjectImpl sitevo1 = (OAViewObjectImpl) am.findViewObject ("SUPPLIER_SITE_VO1");
    if(sitevo1!=null)
    {
    sitevo1.clearcache ();
    sitevo1. Reset();
    System.out.println ("Interior site:" + vendor_id1);
    sitevo1.setWhereClause (null);
    sitevo1.setWhereClause ("vendor_id =: 1");
    sitevo1.setWhereClauseParams (null);
    sitevo1.setWhereClauseParam(0,vendor_id1);
    String SITEQRY = sitevo1.getQuery ();
    System.out.println ("SITEQRY:" + SITEQRY);
    sitevo1. ExecuteQuery();
    sitevo1. First();
    System.out.println ("after the query appear" + sitevo1.getRowCount ());
    }



    Here he works for the purchase order number but the where cluase does not work for Supplier Site. Please help as soon as possible.


    2 and also if supplier site to return multiple values then this field should show as messagechoice. If it returns a single value, then it should be the style text message
    How can I achieve this.



    Thank you
    CSK

    Try

    vo.setWhereClause ("IN vendor_id (" + vendor_id_qry + ")" ");

    vendor_id_qry is the query that retrieves the list of provider IDS. You don't need to put the vendor column id as whereClauseParam unless you want to have IN the clause in your query of VO and pass the list as 1,2,3 values to the parameter.

    Thank you
    Shree

  • Need help with the data storage store, local array and network connections

    Need help with my ESXi 4.1 installation

    My hardware:

    I built a server with an Asus P6T whitebox, i7 920, 12 Gig RAM, NIC, Intel Pro1000 PT Quad, 3ware 9650SE-12ML with 8 1.5 TB SATA green in a raid 6 array gives me about 8 + TB with a spare drive all housed within a NORCO RPC-4220 4U Rackmount Server chassis.  I also have a 500 GB SATA drive which will hold the ESXi and virtual machines.

    The network includes a firewall, Netgear Prosafe FVS336G, GS724Tv of Netgear ProSafe 24 port Gigabit Managed Switch on a dhcp cable modem internet service provider.

    I also have 2 old NetGear SC101T NAS disks (4to) I want to connect to the system how some - at a later date have... data on them and want to transfer to the new storage array. I always looking into the question of whether they will work with ESXi 4.1, or I might have to only access it through Windows XP.

    My Situation:

    I have already installed ESXi 4.1 and vsphere client with no problems and it is connected to a dhcp cable internet service.  I've set up host via a dynamic DNS service name give me a static hostname on the internet.  I installed three machines to virtual OS successfully at the moment and now want to first start by creating a multimedia storage server which will use some of this new 8 TB array, then separate data storage for use with a web server small overhead storage and a backup.  It is a domestic installation.

    Help with the data store and network:

    I was doing some reading, because I'm new to this, and it looks like I'll probably want to set up my table via ESXi as a nfs disk format.  Now, the data store is usually in another physical box from what I understand, but I put my readers and ESXi all in the same box.  I'm not sure that the best way to put in place with grouped network cards, but I want to make this work.

    I understand that in ESXi 4.1 using iSCSi LUN must be less than 2 TB, but nfs - I should be able to add a bigger partition then 2 TB (for my multimedia) in nfs, right? or should I still add it separately as a separate 2 TB drives and then extend them to get the biggest space.

    Any suggestions or direct resources showing examples on how to actually add some parts of the table as data warehouses separate nfs.  I know that to go to the configuration tab, and then select Add to storage, and then select nfs. I have not my picture, but it's here that I don't know what to do because ESXi 4.1 system already has an address, should I put the same thing to the new data store array also (will it work?), and what should I use for the name of the folder and the store of data... just do something to the top.  I thought to later install Openfiler (for a multimedia storage using this table server) as a virtual machine, use the table with esxi so that I can access the same storage space with widows and linux-based systems.

    I also know I have to find a way to better use my quad nic card... put in place of virtual switches, grouping, etc HELP?

    Any direction, assistance, similar facilities to sample, suggestions or resources that would help would be great. I did a lot of hunting, but still a little confused on how to best to put in place.

    You must think of VMDK files of large databases with records of random size guest go read some data (a DLL or an INI file), maybe write some data back, then go read other data. Some files are tiny, but certain DLLs are several megabytes. It's random i/o all and heavy on the search time. IO Opsys is small random operations that are often sequential (go read data, write data, go read other data,...) so that deadlines are critical to the overall performance. That's why people say OPS are / s of reference and forget the MBs flow. The only time where you bulk transfers are when you read media (ISO files).

    Well, now forget all this. Actually the disk activity will depend on the specific applications (database? mail server? machines compiler?), but the above is true for boots, and whenever applications are idle. You should see the profile to know.

    RAID 10 is faster (and often more reliable) than RAID 5 or RAID-6 except in certain specific cases. In General RAID 10 is ideal for many random writes, since the calculation of parity for RAID-5 and - 6 adds to the overall latency between command and response - latency is cumulative if a little slow here and a little slow it adds up to a lot of overall slow synchronous especially with e/s on a network. OTOH RAID-5 and -6 can produce faster readings due to the number of heads, so you can use it for virtual machines that transfer bulk. Test. You may find that you need several different types subdashboards for best results.

    You said 3ware, they have some good grades on their site, but don't believe it. With my 9650 that I found myself with only a couple of their recommendations-, I put the (simple) table for allocation size 256 k, nr_requests at 2 x the queue_depth and use the planner date limit. I had the habit for the Ext4 file system formatted with stride and stripe-width synced to the table and used the options large_files with fewer inodes (do not use the huge_files option unless you plan to have single VMDK files in the terabyte range). Use a cache of great reading in advance.

    Virtual machines use VMDK files in all cases except raw iSCSI LUN that they treat native disks. VMDK is easier to manage - you can make a backup by copying the file, you can move it to a PC and load it into another flavour of VMware, etc. There could be some features iSCSI to your San as a transparent migration but nothing for me. NFS has less chatter of Protocol if latency lower times to complete an operation. NFS is good to read and write a block of data, that's all it boils down to.

    UPS is good, but it won't help if something inside the machine explodes (UPS does nothing if the PC power supply goes down). If the RAID card has an option for a battery backup module, so it can contain some writings in memory and may end up the disk i/o after replacing the power supply. 3ware also limits the types of caching available if help is not installed, and you get just the right numbers with the module.

  • How to create a procedure for REF CURSOR output with any WHERE clause?

    I have a requirement like this: I have a huge question that need to reuse in my code over 10 times. This SQL has about 50 lines. Here for these 10 odd times sometimes changes in WHERE clause (columns are the same). So I can't create a view as SQL is not static.

    I thought to write a procedure with a para of WHERE_CLAUSE entry. I pulled out a refcursor sys by adding where clause. But I can't do it because you cannot add a clause like this where clause.

    i.e.
    PROCEDURE dynamyic_query (p_where_clause IN VARCHAR2, p_out_query OUT SYS_REFCURSOR ) IS
    BEGIN
    
      OPEN p_out_query FOR SELECT ......... FROM table WHERE || ' ' || p_where_clause;
    
    END;
    The foregoing gives an error.

    How to handle such a situation? Any help would be greatly appreciated.

    Hello

    Channa wrote:
    ... However, when I change the procedure like this:

    PROCEDURE FORMS_TEXT_DYN_SQL_TEST(p_where_cluase IN VARCHAR2, p_out_cursor OUT SYS_REFCURSOR) IS
    v_stmt VARCHAR2(1000);
    BEGIN
    v_stmt := 'SELECT tname FROM tab_test WHERE tname LIKE ''%ABS_V4%'' AND :y';
    
    OPEN p_out_cursor FOR v_stmt using p_where_cluase;
    
    END;
    

    And run this block of code:

    declare
    v_tname varchar2(200);
    out_cursor sys_refcursor;
    begin
    forms_text_dyn_sql_test(' 1 = 1 ', out_cursor );
    LOOP
    fetch out_cursor INTO v_tname;
    exit when out_cursor%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(v_tname);
    END LOOP;
    end;
    /
    

    I get the error:

    [1]: (Error): ORA-00920: invalid relational operator ORA-06512: at "ABS.FORMS_TEXT_DYN_SQL_TEST", line 6 ORA-06512: at line 5
    

    Looks like you can only set column_name =: z, column_name =: values of type y. You can not it seems to replace it with no WHERE CLAUSE?

    A bind variable, such as: it, represents a single value.
    If: is the VARCHAR2 '1 = 1', then

    SELECT tname FROM tab_test WHERE tname LIKE '%ABS_V4%' AND :y
    

    takes the value

    SELECT tname FROM tab_test WHERE tname LIKE '%ABS_V4%' AND '1 = 1'
    

    I think you want something like this:

    CREATE OR REPLACE PROCEDURE FORMS_TEXT_DYN_SQL_TEST
    (     p_where_clause      IN      VARCHAR2
    ,      p_out_cursor      OUT      SYS_REFCURSOR
    ) IS
      v_stmt VARCHAR2(1000);
    BEGIN
      v_stmt := 'SELECT ename FROM scott.emp WHERE ename LIKE ''%A%'' AND '
              || p_where_clause;
    
      OPEN p_out_cursor FOR v_stmt;
    
    END;
    /
    show errors
    
    SET  SERVEROUTPUT  ON
    
    declare
      v_tname varchar2(200);
      out_cursor sys_refcursor;
    begin
      forms_text_dyn_sql_test(' 1 = 1 ', out_cursor );
      LOOP
        fetch out_cursor INTO v_tname;
        exit when out_cursor%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE(v_tname);
      END LOOP;
    end;
    / 
    

    Output:

    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    ADAMS
    JAMES
    
  • need help with my window is in thai and I do not understand to all.how to convert to English?

    need help with my window is in thai and I don't quite understand.
    How to convert to English? I tried for days but still it cannot be changed.
    because I can't read thai... Please help me step by step...

    my pc is touchsmart 9100 windows 7 Professional.

    Not a single word is in English if I go to the "region and language" to change.

    Everthing is in thai in the system.

    Hello

    Where have you bought the PC?

    What is the operating system installed?

    Best regards

    ERICO

  • I need help with the program of Photos on my macbook pro

    I use a Macbook Pro with OS of Yosemite. I really need help with the Photo program. I never really got the hang of IPhoto and now that it's a new program, I'm really confused. Where can I go to learn this without waiting for the next workshop in a local store?

    Hi, I'm fighting to open same mine, making a new software update

  • Need help with the launching track pack for forza code 4

    Bought new Forza 4 and the lancer Track Pack code does not work, how do I get a code that is generated in the form I've already paid for it. Rank of loads of numbers and sent 10 s of emails but cant seem to get help.

    This is the help I get when the cat to an Ambassador xbox on xbox.com

    Terry wrote:
    Need help with the launching track pack for forza code 4
    The Xbox Ambassador says:
    Location of Ambassador of the community...
    The Xbox Ambassador says:
    Location of Ambassador of the community...
    The Xbox Ambassador says:
    Your question will be answered by an Ambassador of the Xbox. You have been connected to the Ambassador as a user Xbox [3]
    The Xbox Ambassador says:
    Hello
    Terry wrote:
    Hello
    The Xbox Ambassador says:
    Hey
    Terry wrote:
    just to be on the phone to xbox live support and was told to come here
    The Xbox Ambassador says:
    ok\
    The Xbox Ambassador says:
    What is your problem?
    Terry wrote:
    I bought the 4 for forza ansd 360 new sealed Christmas...
    Terry wrote:
    has got 2 codes that accompanies the game but the pack track code does not work
    The Xbox Ambassador says:
    Wow good
    Terry wrote:
    whenever I put in the code it says code redeemed
    The Xbox Ambassador says:
    I think the code is used. You must return to the retailer
    Terry wrote:
    I tried to, but since I already opened the case they will not accept
    The Xbox Ambassador says:
    Oh. No,
    Terry wrote:
    the code had been used or defective as I am the only person who has touched the game once opened, tried to enter the code when it is open
    The Xbox Ambassador says:
    Maybe it was auto bought?
    Terry wrote:
    so, how do I get another code generated track Pack if defective?
    The Xbox Ambassador says:
    I do not know.
    Terry wrote:
    bought the game new, so I get the track pack
    The Xbox Ambassador says:
    Oh. It's bad.
    The Xbox Ambassador says:
    I think that if you Exchange 1 code it will buy it
    Terry wrote:
    car pack code worked, starter pack did not work
    The Xbox Ambassador says:
    Oh.
    The Xbox Ambassador says:
    It's a bad
    The Xbox Ambassador says:
    BTW you have an evolution of the tests?
    Terry wrote:
    Yes, I want to? but more anxious to get a code object generated for this pack
    The Xbox Ambassador says:
    Hey if I help can u give me this game too?
    Terry wrote:
    ?????????????????
    Terry wrote:
    So is it possible to get a code for that time?
    The Xbox Ambassador says:
    Hey
    The Xbox Ambassador says:
    Yes.
    The Xbox Ambassador says:
    you need to contact them
    The Xbox Ambassador says:
    and tell them that the code is used.
    Terry wrote:
    I was told to come here? where can I go to get the code?

    Hi Terryg76,

    ·         What version of the operating system is installed on the computer?

    I suggest you to contact the game manufacturer for more help and information.

Maybe you are looking for

  • Factory reset on iTunes to improve battery

    my battery iPhone 5 c descends in a half day, and even after changing to a new battery, it's the same. I can reset the phone to iTunes to make better it.  It is saved.

  • I forgot my password on

    I forgot my power on password what can I do

  • Satellite A300D-11 s - keyboard and touchpad freezes

    Hello I have a lot of problems with my Satellite A300D-11 s (for the region of the Adriatic). I have Windows 7 Ultimate with installed all the drivers from the Toshiba site. Everything works perfectly... but... When I first time works laptop, can't i

  • replace iWeb

    What is the best free of replacement for iWeb? Need a facilitator and a manufacturer of web page printable free mac. I have 2 sites created with iWeb and since it is no longer supported, I had problems with updates. Can you help me?

  • Vista. virus systemtool2011

    I have vista and this morning I got this virus. Can't do anything. It has almost everything stop. I have one on a friends computer to try to solve this problem. When I look at online such as solutions, restart the F8 safe mode key, no luck. Or, go in