Procedure with an infinite number of settings?

Hello readers - good evening.
I wonder how to create a procedure/function with several parameters.
For example Oracle supplied function 'GREATEST', 'LESS '. I don't know if there is no limit on values how much we move to this, but for practical reasons, it is sufficient, if you want to spend 2 or 200.

Have we not specify all the settings (by default NULL) at creation time? or is there a better way?

Thank you
Lherault

Published by: viswapsp on December 20, 2010 20:53

You can use the collection as a parameter
For example:

create function many_params(nc in sys.odcinumberlist)
return number
is
  ret number;
begin
  select max(column_value) into ret from table(nc);
  return ret;
end;
/
select many_params(sys.odcinumberlist(1,23,3,4,5,6)) from dual;

Kind regards
Sayan M.

Published by: xtender on 21.12.2010 12:52

Tags: Database

Similar Questions

  • Need for a procedure with in, out, in the settings - small example.

    Hi Master,

    Need an little example with 3 parameters in a procedure. How to know call by value, by reference with out and inout parameters.

    create or replace procedure is sample (x number, are series, z in number)

    Start

    pass the value of x in y and z as well. and the 3 display values.   Code required...

    end;

    Many thanks in adv.

    AR


    Need an little example with 3 parameters in a procedure. How to know call by value, by reference with out and inout parameters.

    create or replace procedure is sample (x number, are series, z in number)

    Start

    pass the value of x in y and z as well. and the 3 display values.   Code required...

    end;

    Code required? This is NOT a coding service. This is a forum to help people with their questions on SQl, PL/SQL, or problems they have with the code THEY have written.

    See the doc of the PL/SQL language - he has examples of use of these three methods of parameter.

  • Procedure with a variable number of columns

    Hi, I have a procedure that looks like this:

    PROCEDURE PROC (p_cursor sys_refcursor OUTPUT)

    In the procedure, I build query dynamically and the number of columns varies during execution.

    In the end I do

    OPEN for REQUEST P_cursor


    Then I do call it,.

    call PROC (?)

    My question is, how could I go on the running query of this procedure, and then adding lines or by modifying the existing results, then return the changed data?

    I want to do is add a new rank based on a condition, so I still need to return any number of columns, but I need to modify the results before I return them.

    Is it possible to do? I need to do some calculations on columns (variable columns), create a new line, insert in the result set and return this new set of results.

    A sys_refcursor is ideal to return to a front end gui such as .NET or Java, which can then use this cursor to retrieve data.

    In PL/SQL, there is no point in using a sys_refcursor unless you know, at the time of the design/build the columns returned are going to be.

    If the columns resulting are dynamic, so you have no choice but to use the package DBMS_SQL, where you can analyze and run any SQL statement you like and then use the package DBMS_SQL to describe what are the columns that result and how they are. From this, you can reference the columns by position, rather than by name.

    for example

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_rowcount  NUMBER := 0;
    BEGIN
      -- create a cursor
      c := DBMS_SQL.OPEN_CURSOR;
      -- parse the SQL statement into the cursor
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      -- execute the cursor
      d := DBMS_SQL.EXECUTE(c);
      --
      -- Describe the columns returned by the SQL statement
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      --
      -- Bind local return variables to the various columns based on their types
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
        END CASE;
      END LOOP;
      --
      -- Display what columns are being returned...
      DBMS_OUTPUT.PUT_LINE('-- Columns --');
      FOR j in 1..col_cnt
      LOOP
        DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
                                                                                  when 2 then 'NUMBER'
                                                                                  when 12 then 'DATE'
                                                         else 'Other' end);
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('-------------');
      --
      -- This part outputs the DATA
      LOOP
        -- Fetch a row of data through the cursor
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        -- Exit when no more rows
        EXIT WHEN v_ret = 0;
        v_rowcount := v_rowcount + 1;
        DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
        DBMS_OUTPUT.PUT_LINE('--------------');
        -- Fetch the value of each column from the row
        FOR j in 1..col_cnt
        LOOP
          -- Fetch each column into the correct data type based on the description of the column
          CASE rec_tab(j).col_type
            WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
            WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
          ELSE
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
          END CASE;
        END LOOP;
        DBMS_OUTPUT.PUT_LINE('--------------');
      END LOOP;
      --
      -- Close the cursor now we have finished with it
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    /
    
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    -------------
    Row: 1
    --------------
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    --------------
    Row: 2
    --------------
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    --------------
    Row: 3
    --------------
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL> exec run_query('select * from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    -------------
    Row: 1
    --------------
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    --------------
    Row: 2
    --------------
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    --------------
    Row: 3
    --------------
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL> exec run_query('select * from dept where deptno = 10');
    -- Columns --
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    -------------
    Row: 1
    --------------
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    11 g, you can create a sys_refcursor and the DBMS_SQL package then allows you to convert this refcursor in a DBMS_SQL cursor so that you can get the description of results and do the same thing. It is not available before 11 g well.

    However_ before any of this, you should really ask yourself if there is a real need to create queries dynamically. There is rarely a need to do and if you find that it is common in your application, then it is often a sign of poor design or bad defined the needs of the business (leaving the technical side to try to be 'flexible' and hence leading to unmaintainable code etc..).

  • How to perform procedures with REF CURSOR & PLSQL settings table in SQL Dev?

    I have 3 SQL Developer. I create a procedure with a set of tables/PL/SQL as an input parameter and a SYS_REFCURSOR as output parameter.

    When I press the green arrow (Run button) block the dialog box run PL/SQL PL/SQL has no place at the PL/SQL table with records of entry and also to see the output of the SYS_REFCURSOR.

    I get the error ORA-06550 and many other errors when I run the present.

    How to do this please?

    In the debug code, lose the ABS. Prefix the SYS_REFCURSOR QC_SQL_DEVELOPER_TEST.
    Also, do not use same name of your settings on your bind variable (so e.g.: OUT_REF_CURSOR).
    REF CURSOR is supported output types, so you will get the output of their share in the output tab.
    However the output system does not recognize your own types as your PL/SQL table. You need to write an exit procedure yourself, indexing correctly, using the DBMS_OUTPUT.

    Have fun
    K.

  • Call the PL/SQL procedure with different parameters?

    I use PL/SQL for web development. I have a page of PL/SQL which collects information and returns the user off site with one return url (another PL/SQL procedure).

    I have the return procedure with every documented return variable (default null) in order to always take the return. However, there are (reported... cannot reproduce because of the nature of the business) cases where a 404 error is returned because of the incompatibility of parameter.

    Is it possible to proceed regardless of the parameters? Someone at - it suggestions?

    Thank you!

    user2960509 wrote:

    My problem is that they sometimes send back of settings that do not match what I expect.

    Use the interface "+ flexible +" mod_plsql - see the Oracle® HTTP Server mod_plsql user's Guide for the documented details.

    The signature of the procedure parameter is as follows (it is called by mod_plsql using tables of name value pairs):

    create or replace procedure Scott.MyWebProc( name_array owa.vc_arr, value_array owa.vc_arr) is
    ...
    

    In your code, you just browse the berries to get the name values passed query string. You can even filled an associative array in your code (a table indexed by string and no number, where the index string represents the name of param)-this approach can make it pretty easy for the code make reference to a parameter, with little effort on your part to provide an interface to query by name for code to get the value of a parameter name.

    To enable the flexible (aka parameter 2) call interface, precede the call to web with an exclamation character. For example

    http://my-webserbver.my-domain.com/pls/dad/!scott.mywebproc?name-1=val-1&name-2=val-2..,name-n=val=n
    
  • How to call a stored procedure with a REF CURSOR output parameter

    I'm looking forward to example calling a function/stored procedure with a REF CURSOR output parameter and get the result.
    In other words, I have a stored function/procedure that runs a SELECT statement using the OCI library and then he could get the values of each row and each column.

    I put a code snippet, it have only the main thing to call a simple stored procedure and to print the name of each column of the cursor, but I couldn t to print out values in the table that calls the stored procedure.
    I understand that the next step is to call an OCIStmtFetch.
    How to associate the slider with the OCIStmtFetch?

    If you need more information, just tell me.

    I use ANSI C with HP - UX (HP - UX C) operating system and Oracle 10 g.


    Kind regards.

    Antonio Garcia


    / * callOracleSP * /.

    #include < stdio.h >
    #include < string.h >
    #include < oci.h >
    #include < stdlib.h > to

    char * pConnectChar = "Server";
    char * pUsernameChar = "user";
    char * pPasswordChar = "passwd";
    char * sqlCharArray1 = "BEGIN SP_GETCITIES (:,: c); END; « ;
    int retval;
    UB4 parmcnt = 0;
    UB4 pos2 = 0;
    text * pcoln [20];
    UB4 namelen [20];
    char state_key [5];

    OCIStmt * pOciStatement;
    OCIStmt * pOciStatCursor;
    OCIError * pOciError;
    OCIEnv * pOciEnviron;
    OCIServer * pOciServer;
    OCISession * pOciSession;
    OCISvcCtx * pOciServiceContext;
    OCIBind * pOciBind [500];
    OCIParam * pOciParam;


    int main()
    {
    retval = OCIEnvCreate (& pOciEnviron, OCI_DEFAULT, NULL, NULL, NULL, NULL, 0, NULL);
    retval = OCIEnvInit (& pOciEnviron, OCI_DEFAULT, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciError, OCI_HTYPE_ERROR, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciStatement, OCI_HTYPE_STMT, 0, NULL);

    retval = OCILogon (pOciEnviron, pOciError, & pOciServiceContext,(unsigned char *) pUsernameChar,
    strlen (pUsernameChar), (unsigned char *) pPasswordChar, strlen (pPasswordChar).
    (unsigned char *) pConnectChar, strlen (pConnectChar));
    printf ("retval=%d\n",retval OCILogon);

    retval = OCIStmtPrepare (pOciStatement, pOciError, (unsigned char *) sqlCharArray1, strlen (sqlCharArray1),)
    OCI_NTV_SYNTAX, OCI_DEFAULT);
    printf ("StmtPrepare retval=%d\n",retval);

    retval = OCIHandleAlloc (pOciEnviron, (void *) & pOciStatCursor, OCI_HTYPE_STMT, 0, NULL);
    retval = 1 OCIBindByPos(pOciStatement,&pOciBind[0], pOciError, (ub4), (void *) & state_key,)
    ((sb4) sizeof (state_key), SQLT_STR, (void *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT (ub4));
    printf ("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);

    retval = OCIBindByPos(pOciStatement,&pOciBind[1], pOciError, (ub4) 2, (void *) & pOciStatCursor,)
    ((sb4) 0, SQLT_RSET, (void *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT (ub4));
    printf ("BindByPos OCI_HTYPE_STMT retval=%d\n",retval);

    strcpy (state_key, 'ca');

    retval = OCIStmtExecute (pOciServiceContext, pOciStatement, pOciError, (ub4) 1, (ub4) 0,)
    (OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT (ub4));
    printf ("StmtExecute retval=%d\n",retval);

    / * How to get the values of the cursor? */

    / * Number of parameters of the cursor * /.
    OCIAttrGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), (void *) & parmcnt,(ub4 *) 0,)
    (ub4) (OCI_ATTR_PARAM_COUNT, pOciError);
    printf ("\nNumber of the slider settings = %d\n",parmcnt);

    for (int pos = 1; pos < = (int) parmcnt; pos ++)
    {
    OCIAttrGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), (void *) & pos2,(ub4 *) 0,)
    (ub4) (OCI_ATTR_CURRENT_POSITION, pOciError);
    retval = OCIParamGet ((void *) pOciStatCursor, OCI_HTYPE_STMT (ub4), pOciError, (void *) & pOciParam,)
    POS (ub4));
    OCIAttrGet pOciParam, (ub4) ((void*) OCI_DTYPE_PARAM,(void*) & pcoln [pos - 1],(ub4 *) & namelen [pos-1],)
    (ub4) OCI_ATTR_NAME,(OCIError *) pOciError);
    }
    for (int i = 1; i < = (int) parmcnt; i ++)
    printf ("%i\tNAME = % column. ("* s\n", i, namelen [i-1], pcoln [i-1]);

    return 0;
    }


    This is the script that create the table, insert records and create the stored procedure

    CREATE TABLE CITIES)
    STATE_CODE VARCHAR2 (2) NULL,
    CITY_CODE NUMBER (15.5) NULL,
    CITY_NAME VARCHAR2 (30) NULL
    )
    /


    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 30, 'SAN DIEGO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 40 'SACRAMENTO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('FL', 10, 'MIAMI')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('FL', 20, 'ORLANDO')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('NEW YORK', 10, 'NEW YORK')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('NEW YORK', 20, 'ALBANY')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 10, 'LOS ANGELES')
    /
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES ('CA', 20, 'SAN FRANCISCO')
    /


    CREATE or REPLACE PACKAGE globalPkg AUTHID CURRENT_USER AS
    / * The following is specific global variables T/SQL. */
    TYPE RCT1 IS REF CURSOR; / * new cursor low definition * /.
    END globalPkg;
    /



    CREATE OR REPLACE PROCEDURE SP_ADDCITY)
    P_STATE_CODE IN VARCHAR,
    P_CITY_CODE NUMBER,
    P_CITY_NAME IN VARCHAR2,
    P_RETURN IN NUMBERS)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2 (255);

    BEGIN
    StoO_rowcnt: = 0;
    StoO_error: = 0;
    StoO_selcnt: = 0;
    P_RETURN: = 0;
    INSERT INTO CITIES (STATE_CODE, CITY_CODE, CITY_NAME)
    VALUES (P_STATE_CODE, P_CITY_CODE, P_CITY_NAME);
    StoO_rowcnt: = number of LINES SQL %;
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    StoO_rowcnt: = 2;
    WHILE OTHERS THEN
    StoO_rowcnt: = 0;
    StoO_selcnt: = 0;
    StoO_error: = SQLCODE;
    StoO_errmsg: = SQLERRM;
    IF StoO_error! = 0 THEN
    BEGIN
    P_RETURN: = 1;
    RETURN;
    END;
    END IF;
    END;
    /

    CREATE OR REPLACE PROCEDURE SP_GETCITIES)
    STATE_KEY IN VARCHAR,
    RC1 IN OUT globalPkg.RCT1)
    AS
    StoO_error INTEGER;
    StoO_selcnt INTEGER;
    StoO_rowcnt INTEGER;
    StoO_errmsg VARCHAR2 (255);
    BEGIN
    StoO_rowcnt: = 0;
    StoO_error: = 0;
    StoO_selcnt: = 0;
    OPEN FOR RC1
    SELECT STATE_CODE, CITY_CODE, FRANCISCO
    CITIES
    WHERE STATE_CODE = STATE_KEY
    ORDER BY CITY_CODE;
    StoO_rowcnt: = number of LINES SQL %;
    EXCEPTION
    WHILE OTHERS THEN
    StoO_rowcnt: = 0;
    StoO_error: = SQLCODE;
    StoO_errmsg: = SQLERRM;
    END;
    /

    Hi Antonio,.

    I see this:

    c_buf=(ub1 **)calloc(sizeof(ub1 *),3);
    
    ...
    
    rc=OCIDefineByPos(pOciStatCursor,&pdef,(OCIError *)pOciError,pos,c_buf[pos-1],size+1,(ub2)type,(dvoid *)c_indp[pos-1],(ub2 *)0,(ub2 *)0,OCI_DEFAULT);
    

    That I don't understand. You allocate space for 3 pointers ub1 but I don't see where these pointers are then initialized to point to where the data is to be stored.

    I do not read correctly?

    Sorry for posting code long, but here is an example of code that I have. It is much more 'code' for your code, but maybe that will be enough...

    NOTE: This is just the code example and not rigorous. For example, I don't check the memory, allocations etc in this code!

    Kind regards

    Mark

    #ifdef WIN32
    #define _CRT_SECURE_NO_DEPRECATE 1
    #endif
    
    #include 
    #include 
    #include 
    #include 
    
    void checkerr(sword status, OCIError *errhp);
    
    int main(int argc, char *argv[]) {
      OCIEnv      *envhp = NULL;  /* OCI Environment handle     */
      OCIError    *errhp = NULL;  /* OCI Error handle           */
      OCISvcCtx   *svchp = NULL;  /* OCI Service Context handle */
      OCIServer   *srvhp = NULL;  /* OCI Server handle          */
      OCISession  *usrhp = NULL;  /* OCI User Session handle    */
    
      OCIStmt     *stmtp = NULL;  /* OCI Statement handle       */
      OCIStmt     *cursr = NULL;  /* OCI Statement handle       */
    
      OCIParam    *prmp1 = NULL;  /* OCI Parameter handle       */
      OCIParam    *prmp2 = NULL;  /* OCI Parameter handle       */
      OCIParam    *prmp3 = NULL;  /* OCI Parameter handle       */
    
      OCIDefine   *defp1 = NULL;  /* OCI Define handle          */
      OCIDefine   *defp2 = NULL;  /* OCI Define handle          */
      OCIDefine   *defp3 = NULL;  /* OCI Define handle          */
    
      OCIBind     *bndp1 = NULL;  /* OCI Bind handle            */
      OCIBind     *bndp2 = NULL;  /* OCI Bind handle            */
      OCIBind     *bndp3 = NULL;  /* OCI Bind handle            */
    
      /* used to hold column width */
      ub2 col_width;
    
      /* used to set the prefetch count */
      ub4 prefetch_count = 32;
    
      /* will hold output from database */
      oratext *pEmpId = NULL;
      oratext *pFirstName = NULL;
      oratext *pLastName = NULL;
    
      /* the anonymous block to execute */
      /* this opens a ref cursor        */
      oratext *sqlstmt = "begin " \
                         "  open :1 for " \
                         "  select   to_char(employee_id), " \
                         "           first_name, " \
                         "           last_name " \
                         "  from     hr.employees " \
                         "  order by last_name, " \
                         "           first_name; " \
                         "end;";
    
      /* used to hold the results of each OCI call */
      sword result = 0;
    
      /* Initialize and create a default environment  */
      result = OCIEnvCreate(&envhp,
                            OCI_DEFAULT,
                            (dvoid *) 0,
                            0,
                            0,
                            0,
                            (size_t) 0,
                            (dvoid **) 0);
    
      /* allocate an error handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &errhp,
                              OCI_HTYPE_ERROR,
                              0,
                              (dvoid **) 0);
    
      /* allocate a service context handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &svchp,
                              OCI_HTYPE_SVCCTX,
                              0,
                              (dvoid **) 0);
    
      /* allocate a server handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &srvhp,
                              OCI_HTYPE_SERVER,
                              0,
                              (dvoid **) 0);
    
      /* allocate a user session handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &usrhp,
                              OCI_HTYPE_SESSION,
                              0,
                              (dvoid **) 0);
    
      /* create a server context using the "ORADEMO" database */
      result = OCIServerAttach(srvhp,
                               errhp,
                               "ORADEMO",
                               (ub4) strlen("ORADEMO"),
                               OCI_DEFAULT);
    
      /* set the server attribute in the service context handle */
      result = OCIAttrSet((dvoid *) svchp,
                          OCI_HTYPE_SVCCTX,
                          (dvoid *) srvhp,
                          (ub4) 0,
                          OCI_ATTR_SERVER,
                          errhp);
    
      /* open the session with the database */
      /* using external authentication      */
      result = OCISessionBegin(svchp,
                               errhp,
                               usrhp,
                               OCI_CRED_EXT,
                               OCI_DEFAULT);
    
      /* set the user session attribute in the service context handle */
      result = OCIAttrSet((dvoid *) svchp,
                          OCI_HTYPE_SVCCTX,
                          (dvoid *) usrhp,
                          (ub4) 0,
                          OCI_ATTR_SESSION,
                          errhp);
    
      /* allocate the statement handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &stmtp,
                              OCI_HTYPE_STMT,
                              0,
                              (dvoid **) 0);
    
      /* prepare the statement for execution */
      result = OCIStmtPrepare(stmtp,
                              errhp,
                              sqlstmt,
                              (ub4) strlen((char *) sqlstmt),
                              OCI_NTV_SYNTAX,
                              OCI_DEFAULT);
    
      /* allocate the handle for the ref cursor */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (void **) &cursr,
                              OCI_HTYPE_STMT,
                              0,
                              NULL);
    
      /* bind the ref cursor parameter */
      result = OCIBindByPos(stmtp,
                            &bndp1,
                            errhp,
                            1,
                            &cursr,
                            0,
                            SQLT_RSET,
                            NULL,
                            0,
                            NULL,
                            0,
                            0,
                            OCI_DEFAULT);
    
      /* execute the statement */
      result = OCIStmtExecute(svchp,
                              stmtp,
                              errhp,
                              1,
                              0,
                              NULL,
                              NULL,
                              OCI_DEFAULT);  
    
      /* get parameter descriptor for first column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp1,
                           (ub4) 1);
    
      /* get parameter descriptor for second column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp2,
                           (ub4) 2);
    
      /* get parameter descriptor for third column */
      result = OCIParamGet((dvoid *) cursr,
                           OCI_HTYPE_STMT,
                           errhp,
                           (dvoid **) &prmp3,
                           (ub4) 3);
    
      /* get the first column width in characters */
      result = OCIAttrGet((dvoid*) prmp1,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pEmpId = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the first column in the results */
      result = OCIDefineByPos(cursr,
                              &defp1,
                              errhp,
                              1,
                              (dvoid *) pEmpId,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* get the second column width in characters */
      result = OCIAttrGet((dvoid*) prmp2,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pFirstName = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the second column in the results */
      result = OCIDefineByPos(cursr,
                              &defp2,
                              errhp,
                              2,
                              (dvoid *) pFirstName,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* get the third column width in characters */
      result = OCIAttrGet((dvoid*) prmp3,
                          (ub4) OCI_DTYPE_PARAM,
                          (dvoid*) &col_width,
                          (ub4 *) 0,
                          (ub4) OCI_ATTR_DATA_SIZE,
                          errhp);
    
      /* allocate memory to hold the result */
      pLastName = (oratext *) malloc(sizeof(oratext) * (col_width + 1));
    
      /* define the third column in the results */
      result = OCIDefineByPos(cursr,
                              &defp3,
                              errhp,
                              3,
                              (dvoid *) pLastName,
                              (sword) col_width + 1,
                              SQLT_STR,
                              (dvoid *) NULL,
                              (ub2 *) 0,
                              (ub2 *) 0,
                              OCI_DEFAULT);
    
      /* loop through and print the results */
      while ((result = OCIStmtFetch(cursr,
                                    errhp,
                                    (ub4) 1,
                                    (ub2) OCI_FETCH_NEXT,
                                    (ub4) OCI_DEFAULT)) == OCI_SUCCESS)
      {
        printf("Employee ID: %s\n", pEmpId);
        printf(" First Name: %s\n", pFirstName);
        printf("  Last Name: %s\n\n", pLastName);
      }
    
      /* free allocated memory */
      free(pEmpId);
      free(pFirstName);
      free(pLastName);
    
      pEmpId = NULL;
      pFirstName = NULL;
      pLastName = NULL;
    
      /* terminate the session with the database */
      result = OCISessionEnd(svchp, errhp, usrhp, OCI_DEFAULT);
    
      /* detach from the server */
      result = OCIServerDetach(srvhp, errhp, OCI_DEFAULT);
    
      /* deallocate the environment handle     */
      /* OCI will deallocate the child handles */
      result = OCIHandleFree((dvoid *) envhp, OCI_HTYPE_ENV);
    
      return OCI_SUCCESS;
    }
    
    void checkerr(sword status, OCIError *errhp)
    {
      oratext errbuf[512];
      sb4 errcode = 0;
    
      switch (status) {
        case OCI_SUCCESS:
          break;
    
        case OCI_ERROR:
        case OCI_SUCCESS_WITH_INFO:
          (void) OCIErrorGet((dvoid *) errhp, (ub4) 1, (oratext *) NULL, &errcode, errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
          (void) printf("Error: %.*s\n", sizeof(errbuf), errbuf);
          break;
    
        case OCI_NEED_DATA:
          (void) printf("Error - OCI_NEED_DATA\n");
          break;
    
        case OCI_NO_DATA:
          (void) printf("Error - OCI_NO_DATA\n");
          break;
    
        case OCI_INVALID_HANDLE:
          (void) printf("Error - OCI_INVALID_HANDLE\n");
          break;
    
        case OCI_STILL_EXECUTING:
          (void) printf("Error - OCI_STILL_EXECUTING\n");
          break;
    
        case OCI_CONTINUE:
          (void) printf("Error - OCI_CONTINUE\n");
          break;
    
        default:
          break;
      }
    }
    
  • I have an infinite number of folders in the bookmarks bar

    In my favorite, I have an infinite number of files "bookmarks bar". Not only is this annoying, but I think it can be causing my browser not meet often enough. How can I solve this?

    jsblackw9 said

    COR - el said

    Have you run a check of places.sqlite as I posted above?

    Yes, I did. I unfortunately did not work. The only thing that works so far is disabling iCloud and Sync and manually delete the bookmarks. The problem is that if I turn on Sync, files return

    Change your password synchronization using a camera, which will wipe your data from the sync server and allow a fresh load data not corrupted since this device "cleaned." And run Places maintenance on each device before plugging it back in sync with the new password on each computer in your office / portable computer devices.

    https://addons.Mozilla.org/en-us/Firefox/addon/icloud-bookmarks/
    Scroll down and look at the Version information.
    Version 1.4.14.1 - signed
    Published on October 27, 2014 654,5 kB
    Works with Firefox 22.0 and later versions

    I wonder if this extension is still compatible with current versions of Firefox?
    Just a hunch, but since Firefox for iOS beta was released last summer, "we" seem to have had a "slight increase" the number of threads similar to this one - support describing the proliferation of bookmarks files that are not part of Firefox for desktop / laptop, but rather added by a "3rd party" or a mobile device.
    I can't test it, as I don't have mobile device not (and if I did it would be Android or based filed). I get suspicious when an add-on that "mess" with a feature that is as sophisticated as the database of places and/or participates with Sync is that long without an update.

    And considering that Sync 1.5 was part of the 29 of Firefox, I wonder how compatible iCloud bookmarks always support Firefox to Firefox 22 is with Firefox now-a-days. A bit of incompatibility or the corruption of data multiplied by Firefox by contacting the synchronization server whenever Firefox is started is not very far-fetched. And then synchronize re - corrupt Firefox once Firefox connects to Sync... See where I'm going?

  • I changed my phone number, but I can't update the 'ACCESSIBLE AT' number on my Apple ID account Please can someone explain how I can change the number of 'ACCESSIBLE AT', to update my account with my new number?   Thank you.

    I changed my phone number, but I can't update the 'ACCESSIBLE AT' number on my Apple ID account Please can someone explain how I can change the number of 'ACCESSIBLE AT', to update my account with my new number?

    Thank you.

    Try going into settings > FaceTime and turn off FaceTime. Then go to Messages and turn off iMessage.

    Turn off your phone and then new.

    RETURN to FaceTime and turn it on again, even with iMessage. He has to try to reactivate and your new number should appear (you can see this more down in the addresses to send & receive). You may need to log into your Apple ID for this operation.

  • Electric trigger DAMA IQ &amp; check for new records to collect an infinite number of records

    Hi all

    I have some difficulties with the help of the trigger edge power IQ & questioning the DAMA if it has samples/records ready for pick up.  I have reviewed the documentation on the support to the screw and the examples provided with the driver of the ACCA and have not been able to solve my problem on my own.    What I'm trying to do, is to have this VI capture periodic RF bursts that are larger than a specified threshold.

    I go to this topic in the following way:

    I put the number of samples I captured (finished) for each burst which crosses the threshold
    I put the number of records to capture to be infinite
    I said that the rising slope and the appropriate threshold
    I have then to validate the configuration of the ACCA and start acquiring
    I have then go into a loop and check the backlog of samples as well as the acquisition is
    If either of the above is true then I get the samples with the IQ extract complex WDT vi
    I continue looping until the user stops the vi with a button on the front panel
    I went on this path that I didn't block indefinitely or for long periods of time

    What I see is:

    I'll take one shot and then nothing else
    what the samples never back above zero
    that acquisition is ever complete
    If I switch out the IQ extraction with equivalent IQ reading and ignore the completion back & I get documents like I expect

    My understanding is as follows:

    Electric trigger IQ does not have to be re-armed in VI
    that each trigger to fire IQ Power will create a new record containing the number of samples that I asked

    My questions:

    It seems that when the number of records is infinite that the acquisition is never considered as carried out when the State of the acquisition is verified, is that correct?
    I receive multiple records pending upward on the ASB using this configuration?
    Why a record number is provided with the back of fetch get VI?
    Why would I pick any folder, but the record of zero?
    I'm doing something wrong here?
    Is there a better way to do this?
        
    Thank you
    Russell

    Hi Russell,

    You are on the right track to get your application do what you want. Instead of check to fetch back, I suggest that lets you read the property node DAMA the "' Acquisition > Fetch > Records made" property to know when a new record was acquired. "

    > it seems that when the number of records is infinite that the acquisition is never considered as carried out when the State of the acquisition is verified, is that correct?

    That is right.

    > I get multiple records pending upward on the ASB using this configuration?

    Yes

    > Why a record number is equipped with the rear of fetch get VI?
    > Why would I pick any folder, but the record of zero?

    You ask DAA for an infinite number of records. File 0 started the first trigger seen. Record 1 to the second outbreak (end of disk 0) and so on.

  • Call Oracle procedure with variable

    Experts,

    I pass arguments through script to Oracle procedure, use the input value and pass to the procedure.

    Oracle procedure Gets the input value, run the query, and all connect to the log file.

    I am facing a few challenges, seems to be the error of syntax or data type

    1. even if I pass all the script parameter still run complains of wrong number or type of arguments.

    There are three numbers followed by a date variable

    2. how to pass a variable value with the INTERVAL function, it should take the value of the variable lThird for example "" AND date > = date + INTERVAL '30' MINUTE; "but somehow, after trying different variants still get error like interavl not valid."

    3 see someone more changes to this?

    ! / bin/ksh

    $1 = 10;

    $2 = 30;

    3 = $50

    $4 = '20150113';

    echo "Oracle procedure in progress"

    (

    set linesize 100

    pkg.proc exec ($1, $2, $3, $4);

    ) > $logFile

    If [$? == 0]

    then

    EXIT_VAL = 0

    = Package/oracle procedure =.

    CREATE or REPLACE PACKAGE pkg

    AS

    procedure proc (lFirst in number,

    lSecond in numbers

    lThird in numbers

    date IN oven,

    curReturn to sys_refcursor);

    Pkg of END;

    /

    CREATE or REPLACE PACKAGE pkg BODY

    AS

    PROCEDURE proc (lFirst in number,

    lSecond in numbers

    lThird in numbers

    date IN oven,

    curReturn ON sys_refcursor)

    IS

    BEGIN

    OPEN FOR CurReturn

    SELECT date,

    emp_id,

    first name,

    last_name

    Employees

    WHERE Emp_id in (lFirst, lSecond)

    Date AND > = date + MINUTE INTERVAL "(lThird)"

    AND date = TO_DATE (oven, 'YYYYMMDD')-1;

    END proc;

    Pkg of END;

    /

    Error:

    PLS-306: wrong number or types of argument in the call to proc

    Hello

    With regard to your needs:

    My current problem is

    1. how to store the SELECT results in the log file, ask has several columns with multiple lines

    2. what happens when SELECT brings out no line?

    I have re-used, corrected and adapted to your procedure:

    Package:

    CREATE or REPLACE PACKAGE pkg

    AS

    PROCEDURE proc (lFirst in number,

    lSecond in numbers

    lThird IN varchar2,

    curReturn to sys_refcursor);

    Pkg of END;

    /

    CREATE or REPLACE PACKAGE pkg BODY

    AS

    PROCEDURE proc (lFirst in number,

    lSecond in numbers

    lThird IN varchar2,

    curReturn ON sys_refcursor)

    IS

    BEGIN

    OPEN FOR CurReturn

    SELECT *.

    WCP

    WHERE empno in (lFirst, lSecond)

    AND hiredate > = TO_DATE (lThird, 'YYYYMMDD');

    END proc;

    Pkg of END;

    /

    Shell script: test_sql.sh

    #! / bin/ksh

    V_user = scott

    V_pass = Tiger

    echo "Oracle procedure in progress"

    Req ='sqlplus-s $V_user / $V_pass<>

    var refcursor rc

    exec pkg.proc ($1, $2, $3,: rc)

    print the rc

    output

    EXPRESSIONS OF FOLKLORE"

    echo "$req" > logfile$ $

    PS:

    (1) you must put the name of your user/passwd name and table (I used the scott/tiger schema by default with emp table). This is just to show how to retrieve a refcursor output in a script.

    (2) I used logfile$ $ as output file; You can use any other file or method name to redirect the output to a file

    Call us at:

    19000101 7934 7900 test_sql.sh

    PS: As noted in the previous posts, you cannot define a VARIABLE of type DATE in sqlplus (or a Unix script); You can send a string and perform the conversion in the SQL section.

    If no line is not recovered, you get the following in the log file:

    PL/SQL procedure successfully completed.
    
    no rows selected
    

    HTH.

  • Procedure with the DML statements that insert values from 1 to 100 in only one table and it is matching word equivalent in the other

    Can someone help me create a procedure with the DML statements that insert values from 1 to 100 in a table "abc" and the procedure must connect the numbers into words in another table "xyz" without doing a commit explicitly. "."

    Currently on trial...

    SQL > create table abc (num number);

    Table created.

    SQL > create table xyz (num varchar2 (100));

    Table created.

    SQL > ed
    A written file afiedt.buf

    1. insert all
    2 values of 1 = 1 then in abc (num) (l)
    3 when the values of 1 = 1 then in xyz (num) (to_char (to_date(l,'j'), 'jsp'))
    4 * Select the level from dual connect by level<=>
    SQL > /.

    200 rows created.

    And the result...

    SQL > select * from abc;

    NUM
    ----------
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    ..
    ..
    ..
    98
    99
    100

    100 selected lines.

    SQL > select * from xyz;

    NUM
    ----------------------------------------------------------------------------------------------------
    one
    two
    three
    four
    five
    six
    seven
    eight
    nine
    ten
    Eleven
    twelve
    ..
    ..
    ..
    98
    Nineteen eighty
    Cent

    100 selected lines.

  • CC of Dreamweaver on iMac very slow to open sites with a large number of files

    In recent weeks, a site I've worked regularly for several years began to take 10-15 minutes to open. A pop up says it checks the files, but the button that should allow you to escape this process does not work. The site has about 120 000 files located in different folders, and this was never a problem in the past. To access the site, the only way is to wait until the course ends and the spinning ball to go. I read the thread on the port of Skype settings, but I think that this may be a different problem because even though I have installed Skype I rarely running and only one of my sites is affected.

    Any ideas?

    With a large number of files, it would be a good idea to disable the cache of Dreamweaver for this site.

    1. Site > Manage Sites.
    2. Select the site, then click on the pencil icon to change site settings.
    3. Select Advanced settings > local news in the list on the left of the Site Setup dialog box.
    4. Uncheck the Enable Cache.
    5. Save > fact.

    Another possibility is that your Dreamweaver cache is corrupted (probably with as many files). See remove a corrupt cache file.

  • 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;

  • Procedure with input output and num_array sys_refcursor

    Hello

    I have to write a procedure with input of type of parameter num_array which will forward a list of IDs to the procedure and the output is sys_refcursor that will pass the id with the other columns in the table to the list of identifiers.

    operating system is the table with the id, os_name column with more than a few columns.

    create table os

    (identification number,

    OS_name varchar2 (30),

    .. .few more columns);

    I spend the os_name with id through the sys_refcursor.

    So I created the following procedure.

    num_array is a type of data defined by the user that is created as follows:

    create or replace type num_array in the table to the number;

    /

    create or replace procedure get_os_lang_dtls (num_array, id_os sys_refcursor id_num)

    is

    Start

    / * oses is the main table with id, os_name with other columns

    / * oses_gtt is the temporary table with id number data type varchar2 os_name * /.

    for indx in 1.id_num.count

    loop

    insert into os_gtt

    SELECT id, os_name

    of the operating system

    where id = id_num (indx);

    end loop;

    commit;

    Open the id_os for

    Select * from os_gtt;

    end;

    /


    I created a global temporary table with the column id and os_name.

    Insert in this table by using the id of i / p and setting os_name recovery operating system for this id in the loop.


    Then I open the exit sys_refcursor.


    Could someone please suggest me a better way to write the same logic?


    Thanks in advance

    No need of the TWG or anything too flashy here.

    Since you have a SQL type, you should be able to get away with...

    open out_ref_cursor for
    select 
    from os, table(cast(id_num as num_array)) nu
    where os.id = nu.column_value;
    

    A couple of notes apart from that. ID is not a great name for a column, why not OS_ID to be online with your OS_NAME? Second, always try to avoid use of the TWG, they are handy once in awhile, but not required nearly as often as find you them.

    A "rebate" in the casting of tables like that and their use in SQL is the cost based optimizer usually (depending on version) has no idea of how to do to optimize the query (it has no statistics on the table as it does on a table). In General, if you know that you have X items in this table, it is better to say Oracle. You can use the CARDINALITY indicator to tell Oracle about the number of lines, you expect your table to have on average. The default proposal is going to be your block size, so assuming that 8 k (standard) the estimate is going to be like 8000 items... probably not close to reality.

    See you soon,.

  • HI all I would like to ask if you help me, I want to draw paths, but when I use options to mark with a pen or brush settings I lose quality when I Zoom, can someone help me with the settings for the pen?

    HI all I would like to ask if you help me, I want to draw paths, but when I use options to mark with a pen or brush settings I lose quality when I Zoom, can someone help me with the settings for the pen?

    The work path is a vector and infinitely scalable, but when caress you, Photoshop sets the pixels on a layer following the path.  These pixels are rasterized and based and cannot be resized without loss of quality.  You have options.  If you want to enlarge the raster layer, transform the work path and stroking again.  Or work at a resolution higher, in the first place.

    Either incidentally, you can't trace a path with the pen, because it's a vector tool, and caressing is a matrix function based.

Maybe you are looking for

  • Use model password master password in Firefox in Android

    I want to store my Firefox passwords on encrypted Android device. Firefox doesn't have that one way to do this - activate 'Master password '. It is guaranteed, but not uncomfortable to use, enter them in each time the master password via the keyboard

  • 4 GB of RAM, but 2, 99 GB usable on NB510-117

    Hello world I bought the netbook NB510-117 one a few months ago and I recently upgraded the memory to 4 GB. So, in order to exploit all the RAM, I installed windows 7 ultimate which recognizes the memory up to 4 GB. The problem is that in the propert

  • Toolbar above the address line has disappeared (File, Edit, View, etc.)

    Notice that the toolbar above the address line on my Firefox home page is missing... the line with "File, Edit, View, history, etc. Can not find a way to recover... without it, I'll just go back to IE.

  • Pavilion AC adapter 15-037-cl: 15-037 / DC cl

    I lost the adapter for the HP 15-037cl laptop and can't seem to find out exactly what we I need to get to replace it. I know the voltage (19.5 v) and current 65w (3.33), but can't seem to find the right connector size and when I ordered one on ebay t

  • After replacing a hard drive

    I just replaced a hard drive on my pavilllion p6210f.  I need to know what to do next.  All I have is a 7 (64-bit) windows repair disc I made when I got the computer.  It did not come with any CD. What should I do next?