SDO_NN with distance parameter vs sdo_within_distance

I had a co-worker ask me what was the difference between the use of the operator of sdo_nn with a specified distance and a sdo_batch_size of 0 vs using sdo_within_distance. I explained the difference of high level but could not find any documentation that was more in depth. Does anyone know if there is any documentation that explains how the sdo_nn with a parameter of distance from the use of sdo_within_distance

Thank you

Bobby

SDO_NN can return rows in increasing order of distance, is not the case with SDO_WITHIN_DISTANCE.

Tags: Database

Similar Questions

  • FIRST HP: Solving a system of linear equations with a parameter

    Hello

    I know how to solve a system of linear equations by using a setting by hand but I don't know how to set up in the calculator.

    Can someone please help me solve the system of linear equations below with a 'p' on the first HP Calculator next parameter?

    2 x + 8z = 26

    4 x-4y-14z = - 38

    8 x - 4y + 2z = 14

    The answer to the above equations is:

    x = 13 - 4, =(45-15p)/2, z = p y p

    Thank you

    Arthur

    Hello

    What you're trying to solve is not really a system of equation with a parameter, but you try to solve a set of 2 equations with 2 variables (x and y).

    The case solve command can do for you.

    According to the CASE, type:

    Solve ([(2*x+8*z) = 26,(4*x-4*y-14*z) = - 38,(8*x-4*y+2*z) = 14], [x, y])

    Come in

    and the calculator will return

    {[-4 * z + 13, 15/2 * z + 45/2]}

    which is what you want.

    Cyrille

  • create link db with timeout parameter

    Hi all

    I there a way to create the db link with timeout parameter, then only in the case where the session established for db link for more than an hour to disconnect if idle

    Thank you

    He can do with the idle session profile option, instead of RM (I think)

  • Failed to get the results of a report from beep with a SQL with like ' %: Parameter.

    Hello

    I am trying to create a beep with sql like query report below:

    Example:

    Select usr_key from usr where usr_login like ' %: Parameter.

    In above query parameter before the user.

    The above query returns not all the results in the report.

    If I hard top query below it returns the result-code:

    Select usr_key from usr where usr_login like '% Test % '.

    Please let me how can know we use % with a parameter in the NOSE?

    Thank you

    Hi I had the solution how to do this at RANDOM.

    CONCAT function should be used for the same

  • Liaison with a parameter

    Hello

    I have a question about conducting an affair with a parameter.

    I have a user table, a person for a relationship to a table of addresses. So, users can have multiple addresses, each address has a start date and end date for the address. A null terminator date means current address.

    I want to do is be able to query user has their current address fell into a field in an appropriate manner. A few ideas I've had where to use the OrderBy operator and enter first name address / as current address or simply go through the list and find the current address on each access.

    Someone at - it of the most effective ways? Can I use a JPQL query or an annotation to only enter the address that interests me?

    Not sure I understand, you want to map a one-to-one relationship of the user to the address which is the currentAddress?

    You can do this by using a DescriptorCustomizer and on your OneToOneMapping the selectionCriteria Expression value currentAddress that checks the foreign key and the endDate = null.

    EclipseLink also has full historical support that will automatically keep a start and end date in your object and make sure that the mark on the most recent data.

    EclipseLink also has an additionJoinExpression that can be used to always filter addresses that are not current.

    You can also query the value instead of the mapping, or just to have a method of getCurrentAddress() in Java who find the current address of the address list.

    ---
    James: http://www.eclipselink.org

  • SDO_NN with SDO_BATCH_SIZE - which may explain different results?

    I used the SDO_NN operator with the SDO_BATCH_SIZE parameter. If I add a condition to the where clause, I get very strange results.

    I have tried different methods to find the line closest to the point of table LEITUNG_1.


    A request has been:
    Select / * + INDEX (LEITUNG_L_SI l1) * /.
    L1. ObjectId, SDO_NN_DISTANCE (1) leitung_l l1 dist
    netza_l n
    where
    n.F_ID! = 0 and
    n.v_id = 1 and n.f_classl = 'LEITUNG_L' and l1.objectid = n.f_id
    and
    SDO_NN (L1. Shape, sdo_geometry (3001,1034000,SDO_POINT_TYPE (4045.663,339589.059,0), NULL, null);
    (= 5', 1) = "TRUE".
    and rownum < 10 order by 2;

    The result in Oracle 10.2.0.4:
    OBJECTID DIST
    ---------- ----------
    4123 9554.33662
    4519 10317.6956
    4524 10463.8246
    4518 10511.4224
    4521 10595.0841
    4522 10595.0841
    4523 10604.4124
    4448 10921.7373
    4517 10989.0229
    9 selected lines.

    Elapsed time: 00:00:36.80

    The same query with Oracle 11.2.0.1 with the same data:
    OBJECTID DIST
    ---------- ----------
    845 7002.66201
    846 7010.9314
    929 7776.21253
    930 7799.44553
    931 7800.36867
    926 7867.07714
    229 9049.54233
    231 9126.17628
    843 11403.8868

    9 selected lines.

    Elapsed time: 00:00:14.81

    The other request was
    Select / * + INDEX (LEITUNG_L_SI l1) * /.
    L1. ObjectId, SDO_NN_DISTANCE (1) l1, n netza_l leitung_l dist
    where
    -n.f_id! = 0 and
    n.v_id = 1 and n.f_classl = 'LEITUNG_L' and l1.objectid = n.f_id
    and
    SDO_NN (L1. Shape, sdo_geometry (3001,1034000,SDO_POINT_TYPE (4045.663,339589.059,0), NULL, null);
    (= 5', 1) = "TRUE".
    and rownum < 10 order by 2;


    OBJECTID DIST
    ---------- ----------
    206848.000261885
    26259.000272029
    167419 1.60356646
    24910 15.2090952
    26258 15.2090952
    206527 25.6339523
    213233 25.752101
    206526 26.7804052
    70573-26.8646323

    9 selected lines.


    The results of 10.2.0.4 and 11.2.0.1 are identical. These results are correct.

    Without the condition "n.f_id! = 0", that the query works correctly, with the status of the query gives strange results.
    The condition "n.f_id! = 0" should not have any influence on the result because there is no record with f_id = 0.

    Other forms of find nearest objects:
    If I use the parameter SDE_NUM_RES the query gives correct results the same with or without this condition:

    Select / * + INDEX (LEITUNG_L_SI l1) * /.
    L1. ObjectId, SDO_NN_DISTANCE (1) l1, n netza_l leitung_l dist
    where
    n.F_ID! = 0 and - same result without this condition
    n.v_id = 1 and n.f_classl = 'LEITUNG_L' and l1.objectid = n.f_id
    and
    SDO_NN (L1. Shape, sdo_geometry (3001,1034000,SDO_POINT_TYPE (4045.663,339589.059,0), NULL, null);
    (= 15', 1) = "TRUE".
    order by 2;

    OBJECTID DIST
    ---------- ----------
    206848.000261885
    26259.000272029
    167419 1.60356646
    24910 15.2090952
    26258 15.2090952
    206527 25.6339523
    213233 25.752101
    206526 26.7804052
    70573-26.8646323

    9 selected lines.

    Elapsed time: 00:00:00.12


    If I use SDO_WITHIN_DISTANCE to get the closest objects, all queries
    (with or without 'n.f_id! (= 0' condition 10 Oracle or Oracle 11) gives the same correct results:

    Select / * + INDEX (LEITUNG_L_SI l1) * /.
    L1. ObjectId,
    sdo_geom.sdo_distance (L1. Shape, sdo_geometry (3001,1034000,SDO_POINT_TYPE (4045.663,339589.059,0), NULL, null), 0.0001)
    Dist
    of l1, n netza_l leitung_l
    where
    n.F_ID! = 0 and - same result without this condition
    n.v_id = 1 and n.f_classl = 'LEITUNG_L' and l1.objectid = n.f_id
    and
    sdo_within_distance (L1. Shape, sdo_geometry (3001,1034000,SDO_POINT_TYPE (4045.663,339589.059,0), NULL, null);
    "distance = 27') = 'TRUE" ".
    order by 2
    ;
    OBJECTID DIST
    ---------- ----------
    206848.000261885
    26259.000272029
    167419 1.60356646
    26258 15.2090952
    24910 15.2090952
    206527 25.6339523
    213233 25.752101
    206526 26.7804052
    70573-26.8646323

    9 selected lines.

    Try the following:

    However, if the column in the WHERE clause predicate specifies a non-space column in the table for geometry1 with an associated index, make sure that this index is not used by specifying the NO_INDEX indicator for this index. For example, if there was an index named COLA_NAME_IDX set to the NAME column, you must specify the flags in the previous example as follows:

    SELECT / * NO_INDEX (c cola_name_idx), INDEX (c cola_spatial_idx) * / +.
    c.mkt_id, c.name... OF cola_markets c,...;

    (From 10.2 and 11.2 manual dedicated to the sdo_nn)

    Jack

  • Procedure with dynamic parameter

    Hello

    Database version: 11.2.0.2

    create table emp
     (id  number,
     name  varchar2(100),
     dept  number,
     sal  number,
     address  varchar2(100));
    

    insert into emp values (1,'abc',10,1000,'a avenue');
     insert into emp values (2,'def',20,1000,'b avenue');
     insert into emp values (3,'ghi',30,1000,'c avenue');
     insert into emp values (4,'jkl',10,1000,'d avenue');
     insert into emp values (5,'mno',40,1000,'d avenue');
     insert into emp values (6,'xyz',50,1000,'e avenue');
     commit;
    

    I need assistance with a procedure. Here are the requirements.

    (i) the user can input parameter value for 'EMPLOYEE' as a NUMBER, or a VARCHAR. For example 1 or 'ABC '.
    (II) based on the input value, the procedure should return the desired folder. For example

    select * from emp where id=1 or select * from emp where name like 'abc'

    (III) all columns can be used as parameters to pass values for example CREATE PROCEDURE p_emp (OFFICIAL, DEPARTMENT, SALARY, ADDRESS, FILTER)
    (IV) not succeeded a few values of some parameters is acceptable for example exec p_emp('',10,1000,'')
    (v) output (OUT) should be a table format (I think that maybe SYS_REFCURSOR can be used) for example

    1 ABC 10 1000 A Avenue
    4 JKL 10 1000 D Avenue

    (VI) result (OUT) can be controlled by ROWNUMBER for example.

    select * from emp where rownum between 1 and 3

    If none is specified, then first 2000 records are represented.
    (VII) an additional parameter (FILTER) must determine what output result should look like. For example. If 1 then went only to show ID, NAME, if 2 is passed to see the ID and ADDRESS etc.

    Your help is highly appreciated

    Post edited by: saam001 changes after sol.beach response. Capital letters has dropped and added the version of database

    Personally, I avoid THE parameters, so rather have it as a function that returns a sys_refcursor...

    SQL > create or replace function get_emp (empno emp.empno%type: = null)
    2, ename emp.ename%type: = null
    3, emp.job%type job: = null
    4, Bishop emp.mgr%type: = null
    5, hiredate emp.hiredate%type: = null
    6, sal emp.sal%type: = null
    7, comm emp.comm%type: = null
    8, deptno emp.deptno%type: = null
    9, number of rows: = 2000
    sys_refcursor 10 return) is
    11 r sys_refcursor;
    12 start
    13 r opened for Bishop, employment ename, empno select hiredate, sal, comm, deptno
    14 from (select ename, empno, mgr, hiredate, sal, comm, deptno
    15, row_number() over (order 1): the nurse
    16 of the emp
    17 where empno = nvl (get_emp.empno, empno)
    18 and ename = nvl (get_emp.ename, ename)
    19 and work = nvl (get_emp.job, employment)


    20 and mgr = nvl (get_emp.mgr, mgr)
    21 and hiredate = nvl (get_emp.hiredate, hiredate)
    22 and sal = nvl (get_emp.sal, sal)
    23 and (comm = nvl (get_emp.comm, comm) or (get_emp.comm is null and comm is null))
    24 and deptno = nvl (get_emp.deptno, deptno)
    25                    )
    where the 26 rn<=>
    27 return r;
    28 end;
    29.

    The function is created.

    SQL > e var refcursor;
    SQL > exec: e: = get_emp (deptno-online 10, lines-online 2);

    PL/SQL procedure successfully completed.

    SQL > print;

    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- -------------------- ---------- ---------- ----------
    7782 CLARK MANAGER 7839 9 JUNE 1981 00:00:00 2450 10
    7934 MILLER CLERK 7782 23 JANUARY 1982 00:00:00 1300 10

    SQL > exec: e: = get_emp (mgr-online 7839).

    PL/SQL procedure successfully completed.

    SQL > print;

    EMPNO, ENAME, JOB HIREDATE DEPTNO COMM SAL MGR
    ---------- ---------- --------- ---------- -------------------- ---------- ---------- ----------
    7566 JONES MANAGER 7839 2 APRIL 1981 00:00:00 2975 20
    7698 BLAKE MANAGER 7839 1 MAY 1981 00:00:00 2850 1000 30
    7782 CLARK MANAGER 7839 9 JUNE 1981 00:00:00 2450 10

  • Open the form with the parameter send

    Hello to all the

    I have this Code to open a form with send a parameter form of the anthers

    I'm doing two settings in both forms

    but gives error

    FRM-40010 c:\ cannot read...

    The code is: -.

    declare

    pl_id paramlist;

    Start

    -pl_id: = CREATE_PARAMETER_LIST ('DEFAULT');

    PL_ID: = GET_PARAMETER_LIST ('Maintain_param');

    If not id_null (PL_ID) then

    destroy_parameter_list ('Maintain_param');

    end if;

    pl_id: = CREATE_PARAMETER_LIST ('Maintain_param');

    ADD_PARAMETER (PL_ID, "P_user_stud_id", TEXT_PARAMETER, to_char (': STUDENTS.user_stud_id'));

    OPEN_FORM ('C:\Hieet\SUPLY_CASH_RECIVE.) FMX, PL_ID');

    DELETE_PARAMETER (PL_ID, 'P_user_stud_id');

    end;

    What is the error

    I use application server 10g and 11g db



    Thank you for all

    And I'm sorry for the inconvenience

    I modified the code for:

    declare

    pl_id paramlist;

    Start

    -pl_id: = CREATE_PARAMETER_LIST ('DEFAULT');

    PL_ID: = GET_PARAMETER_LIST ('P_user_stud_id');

    If not id_null (PL_ID) then

    destroy_parameter_list ('P_user_stud_id');

    end if;

    pl_id: = CREATE_PARAMETER_LIST ('P_user_stud_id');

    ADD_PARAMETER (PL_ID, "P_user_stud_id", TEXT_PARAMETER, to_char(:STUDENTS.user_stud_id));)

    OPEN_FORM ('C:\Hieet\SUPLY_CASH_RECIVE.) FMX ", ACTIVATE, SESSION, NO_SHARE_LIBRARY_DATA, PL_ID);

    -DELETE_PARAMETER(PL_ID,'P_user_stud_id');

    end;

    and

    I create in an abstacle Trigger

    when_new_form_instance

    and write the code

    : STD_MONEY_RECEIVE.user_stud_id: =:parameter.p_user_stud_id;

    Thank you for all

    Thank you for all

    Concerning
    Ibrahim

  • DB began with what parameter file

    Hi all

    Can you please tell me how to find if the database is started by using pfile or spfile.

    DB version: 10.2.0.3.0

    OS: linux: 5.4

    Thank you

    Yes, so he used a pfile to start the db. Note there is no pfile parameter, only * s * pfile.

    If it's a spfile, the database maintain the file chain this somewhere to be able to change it with the command line.

    On the other hand, with pfile, once started, the database does not know anything about the file used to launch. It cannot be changed with online ordering. That 'why it's empty.

    Nicolas.

  • Web.show_document work with abnormal parameter

    I was the opening of some web pages of forms 10g to help:

    Web.show_document (url, "_blank");

    in a button pulled the trigger. Which has worked well, except his continually opening new pages. If the button 10 times, 10 pages opened one after the other. I supplied warning the user about this oddity.

    Then when debugging I could change the code and to take:

    Web.show_document (url, ' _blank ;');)

    With the semicolon at the end of the _blank parameter pages now open in a window, himself replacing if the button is pressed repeatedly. This is exactly the feature I want. However, I can't find any documentation that uses any parameter for other web.show_document and then the standard without semicolon included.

    Does anyone know if it is safe to do so?

    The target parameter is the same as used in the target of the a tag in HTML attribute:

    http://www.w3schools.com/tags/att_a_target.asp

    So what you were involuntarily doing was to open a link in a window called _blank; . This should be good; However, I would give it an instaed of his real name.

    see you soon

  • How can I call a function with a parameter?

    Hey guys, I am trying to perform a function within a loop function and I am running into a problem. Whenever I run the program it gives me this error: 1136: Incorrect number of arguments.  1 expected.    However, I can't add the parameter because the function that I'm running is an event. Here is the code:

    package

    {

    import flash.display.Stage;

    import flash.events.Event;

    import flash.events.KeyboardEvent;

    import flash.ui.Keyboard;

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    SerializableAttribute public class extends MovieClip Hero

    {

    public var stageRef:Stage;

    public var health: Number = 6;

    public var speed: number = 3;

    public var leftPressed:Boolean = false;

    public var rightPressed:Boolean = false;

    public var upPressed:Boolean = false;

    public var downPressed:Boolean = false;

    public void Hero()

    {

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyPressed);

    stage.addEventListener (Event.ENTER_FRAME, loop, false, 0, true);

    }

    public void loop(E:Event):void

    {

    keyPressed();

    {if (leftPressed)}

    x = speed;

    } else {if (rightPressed)

    Speed x +=;

    }

    {if (upPressed)}

    y = speed;

    } else {if (downPressed)

    y += speed;

    }

    }

    public void keyPressed(event:KeyboardEvent)

    {

    If (event.keyCode is Keyboard.LEFT)

    {

    leftPressed = true;

    } else {}

    leftPressed = false;

    }

    If (event.keyCode is Keyboard.RIGHT)

    {

    upPressed = true;

    } else {}

    upPressed = false;

    }

    If (event.keyCode is Keyboard.UP)

    {

    rightPressed = true;

    } else {}

    rightPressed = false;

    }

    If (event.keyCode is Keyboard.DOWN)

    {

    downPressed = true;

    } else {}

    downPressed = false;

    }

    }

    }

    }

    The function definition using what follows, and it should work with and without passing the argument

    public void loop(E:Event=null):void

  • Open the page with the parameter provided by browser

    Hello

    There is a page built on a VO with a binding of parameter p1.
    adfc-config, I read the param p1 from the entrance of the browser:

    < view id = "page1" >
    Page1.jspx < page > < / print this page >
    < input-page-setting id = "__1" >
    < security > #{param.p1} < / value >
    < value > #{viewScope.p1} < / / value >
    < / Entry-page-setting >
    < / view >

    in order to show immediately the setting depending on loading the page, data
    What am I supposed to apply again?
    for the moment, I have a button to call a procedure that defines the default where clause and calls execute query...
    but I would like to see the update without pushing buttons
    is it on the placement of function for a backing bean method? Which one? at what stage?
    or do additional installation in adfc-config?

    probably what I found, it is a peace of code, can help:
    Isn't it?

    < f: view beforePhase = "#{MainPageBean.phaseListener}" >
    < af:document id = "d1" >
    < af:form id = "f1" >

    < / af:form >
    < / af:document >
    < / f: view >

    MainPageBean.java:

    Import javax.faces.event.PhaseEvent;
    public class MainPageBean {}
    public MainPageBean() {}
    }

    {} public void phaseListener (PhaseEvent phaseEvent)
    If (phaseEvent.getPhaseId () .equals (phaseEvent.getPhaseId (). RENDER_RESPONSE)) {}
    To get the request header
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    HttpServletRequest request = (HttpServletRequest) () .getRequest () facesContext.getExternalContext;
    Var currentCustomerId = request.getParameter("p1");

    Please advise/comment on

    Something like this: http://blogs.oracle.com/shay/entry/passing_parameters_to_adf_appl

  • call a script sql with one parameter of another

    I would like to call a sql script that takes a single parameter (& 1)... but it doesn't.
    It looks like (first.sql):
    begin
    for cv in (select table_name from all_tables where owner='IBIS') loop
            @my_script.sql cv.table_name;
    end loop;
    end;
    but when I run it, I got an error:
    @first.sql;
    old   9: spool &1..cob replace
    new   9: spool cv.table_name.cob replace
    old  10: select '       05 DBUFF-' || '&1' || '-1.' from dual;
    new  10: select '       05 DBUFF-' || 'cv.table_name' || '-1.' from dual;
    old  12: from all_tab_cols where table_name='&1' and substr(column_name,1,3)<>'SYS';
    new  12: from all_tab_cols where table_name='cv.table_name' and substr(column_name,1,3)<>'SYS';
    old  13: select '          05 ' || '&1' || '-ROWID          PIC X(18).' from dual;
    new  13: select '          05 ' || 'cv.table_name' || '-ROWID          PIC X(18).' from dual;
    What is missing?

    Kind regards...

    Hello

    The trick is to generate a sql script with all your calls to internal scripts and their parameters.

    For example, my script is internal countTableIndex.sql :

    select 'Table &1 has got '||count(*)||' indexes.' from user_indexes where table_name='&1';
    

    And here's my script outside coutnIndex.sql :

    set serverout on pages 0 lines 100 feed off time off verify off define on tab off trimspool on trimout on termout on termout off
    spool cmd.sql
    begin
    for cur in (select table_name tab from user_tables) loop
         dbms_output.put_line('@countTableIndexes.sql '||cur.tab);
         null;
    end loop;
    end;
    /
    spool off
    set termout on
    @cmd.sql
    exit;
    

    As you can see, it generates a file cmd.sql containing internal script calls and ultimately calls the script cmd.sql.
    In my example schema scott after the execution, the cmd.sql file contains:

    @countTableIndexes.sql DEPT
    @countTableIndexes.sql EMP
    @countTableIndexes.sql BONUS
    @countTableIndexes.sql SALGRADE
    @countTableIndexes.sql TOTO
    

    Here is the result of my machine:

    [oracle@Nicosa-oel test19_parameterizedSqlScripts]$ sqlplus -s scott/tiger@my11g @countIndex.sql
    Table DEPT has got 1 indexes.
    Table EMP has got 1 indexes.
    Table BONUS has got 0 indexes.
    Table SALGRADE has got 0 indexes.
    Table TOTO has got 0 indexes.
    
  • Updated c# DataTable with DateTime parameter return

    I'm trying to convert a working existing c# / Oracle application that uses the Microsoft Oracle Client to use the Oracle (ODP.Net) data provider. I use OracleDataAdapter to insert a line in an Oracle table by using the SQL text. The SQL command using the 'Back' clause, return a datetime variable to a parameter.

    OracleParameter p = new OracleParameter();
    p.ParameterName = "p24;
    p.SourceColumn = "AddDate".
    p.OracleDbType = OracleDbType.Date;
    p.Direction = ParameterDirection.Output;
    insertCommand.Parameters.Add (p);

    The Insert in the database works, and the datetime value is returned in the parameter that I set. But when the OracleDataAdapter.Update () function tries to update the line in my DataTable by using the return parameter, I get the following error:

    Cannot be cast to type 'Oracle.DataAccess.Types.OracleDate' object type 'System.IConvertible '. Could not store < 26 March 10 > in the column AddDate.
    Type is of type DateTime. ---> System.InvalidCastException:
    Cannot be cast to type 'Oracle.DataAccess.Types.OracleDate' object type 'System.IConvertible '.

    to System.Data.Common.DateTimeStorage.Set (value of the record object, Int32)
    to System.Data.DataColumn.set_Item (value of the record object, Int32)
    -End of the exception stack trace internal-
    at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors (Int32 commandCount RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo [batchCommands])
    at System.Data.Common.DbDataAdapter.UpdatedRowStatus (Int32 commandCount RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo [batchCommands])
    to System.Data.Common.DbDataAdapter.Update (DataRow [] dataRows, DataTableMapping tableMapping)

    After the exception has been thrown, when I look at the output parameter, the Member of the value of the output parameter is defined as an Oracle.DataAccess.Type.OracleDate (DBType of the parameter is set to "DateTime" and the OracleDbType is set to TimeStamp), so I think that this is the origin of the problem, when it tries to update a field in a DataTable object, which is defined as a System.DateTime. My question is what should I do so that the parameter can be written in the DataTable object? Thanks for any help.

    Hello

    Just to add a further suggestion to what Jenny said, you can also set
    p.DbType = DbType.Date;
    Instead of
    p.OracleDbType = OracleDbType.Date
    and that should give you a .net datetime instead if you prefer to work with .net types rather than Oracle types.

    It will be useful,
    Greg

  • How to run a procedure created dynamically with out parameter

    Hi guys,.

    a friend I need to run a procedure whose name will change dynamically and this procedure is with 2 out parameter. I need to capture the value of these 2 output settings, here I m giving my code too...

    declare
    int v_emp_id: = 100013;
    p_reg_off varchar (5): = "R";
    int p_user_id: = 6;
    v_status varchar (200);
    v_message varchar (200);
    v_Formula varchar (100);
    int v_number: = 1;

    Start
    v_Formula: = 'call testsp_ | v_number | ' ('| v_emp_id |', "'| p_reg_off |") «, » || p_user_id | v_status, v_message)';
    DBMS_OUTPUT. Put_line (v_Formula);
    immediately run v_Formula;
    end;


    and my procedure structure is like this


    CREATE OR REPLACE PROCEDURE testsp_1
    (
    p_emp_id INT,
    p_reg_off TANK,
    p_user_id INT,
    p_status OUT NOCOPY INT,
    p_message OUT NOCOPY VARCHAR2
    )
    AS
    Start
    end;

    Please help me...

    Hello

    You must use the "USING" clause to execute dynamic sql with parameter out.

    Example: http://download-west.oracle.com/docs/cd/B28359_01/appdev.111/b28370/dynamic.htm

    Arun-

Maybe you are looking for