Data types in pl/sql in bulk?

Hi I would be offline if I ask this question, re [subject]?


is it possible in pl/sql to run this.

test procredure (' procedure_name', [param1,...] ");

Sorry just new to pl/sql I'm looking for a consideration of php call_user_func_array.

any thoughts would be greatly appreciated.

I think the ANYDATA type is what you are looking for.

http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/t_anydat.htm

Tags: Database

Similar Questions

  • Hello friends, I want to know what the data type can be declared in pl/sql, but cannot be declared in sql?

    Hello friends, I want to know what the data type can be declared in pl/sql, but cannot be declared in sql?

    Hello friends, I want to know what the data type can be declared in pl/sql, but cannot be declared in sql?

    That question is ambiguous: there is NOT a SINGLE type of data that can be declared in pl/sql, but not in sql.

    The Oracle documentaton is your friend.

    The doc of the SQL language treats the SQL data types.

    http://docs.Oracle.com/CD/B28359_01/server.111/b28318/datatype.htm

    The doc PL/SQL does PL/SQL data types. Because PL/SQL is a language of proceedings (and sql is NOT) there are several types of data, as shown in this doc, PL/SQL-specific:

    PL/SQL scalar data types are:

    • SQL data types
    • BOOLEAN
    • PLS_INTEGER
    • BINARY_INTEGER
    • REFCURSORexplained in "Cursor Variables"
    • User-defined subtypes

    ALWAYS start with the Oracle documentation for these fundamental questions.

    Several times, as with this question, the question is too general to give a simple answer.

  • Data type of text is not displayed using SQL Server and ASP/VBScript

    Maybe someone help me with this because I used to use PHP/MySQL, but I use for this a Classic ASP/VBScript and MS SQL Server instance and I don't know that much. The scenario is I have an old site that was designed using html tables and I do a CSS/XHTML update on Visual design. As long as we are here, there are some pages that are dynamic and use a MS Access database and we thought it's a good time to upgrade from MS SQL Server (2005, to be exact). No time/money for bringing classic ASP VBScript in ASP .NET.

    Overall, the upgrade went fairly well, especially just to create a new connection to the DB in SQL Server in Dreamweaver after all the tables and data were migrated to SQL Server. Almost everything works as it should. A problem though.

    For some reason, the data of the data type 'text' in SQL Server is not appear (or sometimes appear). I even tried to recreate the recordsets and binds fresh data and the code is more or less identical to what we had before. Anyone know what's happening, or how I can get this data to show?

    I think that there is perhaps some simple and double quotes in the text data and which could be screwing things up. I was hoping there is only a simple function that I could apply the code, but as I said, I don't know.

    Thanks in advance for any help you can provide.

    -Bill

    captcashew wrote:
    > Maybe someone help me with this because I used to use PHP/MySQL, but for this one
    > instance I use Classic ASP/VBScript and MS SQL Server and I do not know
    > that much. The scenario is that I have an old site that was designed using html
    > tables and I do a CSS/XHTML update on Visual design. As long as we
    > are there, there are some pages that are dynamic and that use a MS Access
    > database and we thought it's a good time to upgrade from MS SQL Server
    > (2005, to be exact). No time/money to classic ASP VBScript in ASP.
    > .NET so.
    >
    > Overall, the upgrade went quite well, especially just needed a new
    > connecting to the DB in SQL Server in Dreamweaver after all tables and data
    > have been migrated to SQL Server. Almost everything works as it should. One of the problems
    > If.
    >
    > For some reason, the data of the data type 'text' in SQL Server is not
    > appear (or sometimes appear). I even tried to recreate the recordsets and
    > binds fresh data and the code is more or less identical to what we had
    > front. Anyone know what's happening, or how I can get this data to show?
    >
    > I think that maybe there are single and double quotes in the text
    > data and which could be screwing things up. I was hoping that there is only a simple
    > function I could apply the code, but as I said, I don't know.
    >
    > Thanks in advance for any help you can provide.

    Your text field should be the last of your select statement, as
    its not stored in the table with the other data, its stored elsewhere,
    as a binary object, should be treated differently. Its common
    the migration of the access problem.

    If you need more of 8000 characters stick with him, otherwise use
    varchar (8000) or nvarchar (4000) If you need (limited unicode characters
    4,000 cos of the double byte characters)

    Dooza
    --
    Display guidelines
    http://www.Adobe.com/support/forums/guidelines.html
    How to ask Smart Questions
    http://www.CatB.org/ESR/FAQs/smart-questions.html

  • Error: PL/SQL ORA - 00932 data type incompatible when using the value of LONG type

    Hello:

    I use a PL/SQL job script where I use a value of type LONG in a cursor. When I run it, I get:

    Incompatible data type of PL/SQL ORA-00932: expected NUMBER got LONG
    set serveroutput ON SIZE 1000000
    set heading off                
    set feedback off                
    set trimspool off               
    set echo off 
    set term off                   
    set pagesize 0         
    
    SPOOL &so_outfile;
    
    
    
    
    DECLARE
      v_data_file          varchar2(30);
     --   v_sch_code            varchar2(10);
     --   v_instance_name       varchar2(10);
        ws_path            payroll.pybutfl.pybutfl_utl_file_path%TYPE; 
        v_data_line           VARCHAR2 (2000)                              := NULL;
        fhandle_o             UTL_FILE.file_type;
        v_line_count          NUMBER                                       := 0;
        v_selected_count      NUMBER                                       := 0;
        v_error_count         NUMBER                                       := 0;
        v_written_count       NUMBER                                       := 0;
        v_error_text          VARCHAR2 (50)       := ' AMACONF_ERR: Unable to write the line. ';
        v_errm                VARCHAR2 (255);
        v_sqlerrm             VARCHAR2 (255);
        v_payment_type        VARCHAR2(10);
    
    
    CURSOR C1 IS
    select RTRIM
          ( 
            AMRCONF_PIDM_ERR            ||'|'||
            AMRCONF_IDEN_CODE_ERR       ||'|'||
            AMRCONF_ENTRY_DATE_ERR      ||'|'||
            AMRCONF_CONFID_IND_ERR      ||'|'||
           *AMRCONF_COMMENT_ERR        ||'|'||*
            AMRSUBJ_SUBJ_CODE_ERR       ||'|'||
            ERROR_CODE                  ||'|'||
            ERROR_CODE_TEXT                 ) data_line
            from WSUALUMNI.AMRCONF_ERR;
    
    
    
    BEGIN
    
    
    DBMS_OUTPUT.put_line ('Program Generating AMACOMT Mass Update Error File ');
    IF UTL_FILE.is_open (fhandle_o)
        THEN   
       UTL_FILE.fclose (fhandle_o);
    END IF;
    
    /* Name The File Here */
    v_data_file := ('Amaconf_error.txt');
    
    
    
    SELECT RTRIM (pybutfl_utl_file_path)
          INTO ws_path
          FROM payroll.pybutfl;
          
          fhandle_o := UTL_FILE.fopen (ws_path, v_data_file, 'w');
          DBMS_OUTPUT.put_line ('UTLFILE file for this run is: ' || ws_path||'/'||v_data_file);
          v_written_count := 0;   
    
    FOR c1_rec IN C1 LOOP
          BEGIN
            v_selected_count := v_selected_count + 1;
            v_data_line := rtrim(c1_rec.data_line);
            UTL_FILE.put_line (fhandle_o, v_data_line);
            v_written_count := v_written_count + 1;
        EXCEPTION
         WHEN OTHERS
          THEN
           DBMS_OUTPUT.put_line (v_error_text);
           v_error_count := v_error_count + 1;
        END;
    END LOOP;
    
         DBMS_OUTPUT.put_line ('Number of Records Selected: ' || v_selected_count);
         DBMS_OUTPUT.put_line ('Number of Records Written: ' || v_written_count);
    
          IF UTL_FILE.is_open (fhandle_o)
          THEN
             UTL_FILE.fclose (fhandle_o);
          END IF;
    
    END;
    /
    
    SPOOL OFF;
    If I comment on the ' AMRCONF_COMMENT_ERR |'| ' | ' line, then the script works fine. The table has been created as:
    Create Table WSUALUMNI.AMRCONF_ERR
    (
        AMRCONF_PIDM_ERR             NUMBER (8)    NOT NULL,
        AMRCONF_IDEN_CODE_ERR        VARCHAR2(5)   NOT NULL,
        AMRCONF_ENTRY_DATE_ERR       DATE          NOT NULL,
        AMRCONF_CONFID_IND_ERR       VARCHAR2(1),
        AMRCONF_COMMENT_ERR          LONG,          
        AMRSUBJ_SUBJ_CODE_ERR        VARCHAR2(5)   NOT NULL,
        ERROR_CODE                   VARCHAR2(12)  NOT NULL,
        ERROR_CODE_TEXT              VARCHAR2(50)  NOT NULL
    ); 
    I don't understand what the problem here is in the script.

    Hello
    Feew suggestions
    (1) LONG is an obsolete type so if possible start working on this column change
    (2) CLOB will be your favorite type of data on long.
    (3) you cannot use RTRIM on long.

    Here's a very quick example

    drop table h
    create table h (x long,y varchar2(100))
    select rtrim(x) from h
    select rtrim(y) from h
    

    Solution:
    [http://www.oracle.com/technology/oramag/code/tips2003/052503.html]

    need to better implement the clob data type and

    drop table h
    create table h (x clob,y varchar2(100))
    select  dbms_lob.substr( x, 4000, 1 ) from h
    select rtrim(y) from h
    

    See you soon!
    Bobin

  • From a function table: invalid data type error

    Hello

    I'm a ORA-00902: invalid data type error when I try to call the function from a select statement below. Here, I am leaving an array from a function.
    create or replace package pkg10
    as
    
    type tabletype1 is table of table1%rowtype
    index by binary_integer;
    
    function func1 return tabletype1;
    
    end pkg10;
    create or replace package body pkg10
    as
    
    function func1 return tabletype1 
    is
        v_tab1 tabletype1;
        idx integer;
    begin 
    
        idx := 1;
        
        for i in (select * from table1)
        loop
            v_tab1(idx).name1 := i.name1;
            v_tab1(idx).key := i.key;
            idx := idx+1;
            
        end loop;
    
    return v_tab1; 
    
    end func1; 
    
    end pkg10;
    select * from table(pkg10.func1);
    Please point out to me where I'm wrong.

    Thank you

    Sathya Vamsi says:
    Hello

    I'm a ORA-00902: invalid data type error when I try to call the function from a select statement below. Here, I am leaving an array from a function.

    create or replace package pkg10
    as
    
    type tabletype1 is table of table1%rowtype
    index by binary_integer;
    
    function func1 return tabletype1;
    
    end pkg10;
    
    create or replace package body pkg10
    as
    
    function func1 return tabletype1
    is
    v_tab1 tabletype1;
    idx integer;
    begin 
    
    idx := 1;
    
    for i in (select * from table1)
    loop
    v_tab1(idx).name1 := i.name1;
    v_tab1(idx).key := i.key;
    idx := idx+1;
    
    end loop;
    
    return v_tab1; 
    
    end func1; 
    
    end pkg10;
    
    select * from table(pkg10.func1);
    

    Please point out to me where I'm wrong.

    Thank you

    you try to use a data type of PL/SQL as part of an SQL statement. is NOT authorized.

  • Subtype and data types

    Hi all

    We can overload subprogrammes that setting differ in the number, order, and type of family data. But impossible to overload if the parameter differs only in the void type.

    If I see the standard package, I get
    subtype types BINARY_FLOAT is NUMBER;
    subtype BINARY_DOUBLE is NUMBER;

    But I am able to overload the two procedures, we have a parameter types binary_float and binary_double other. They are of subtype of the same data type. that is the number. So, how is it possible. Also, most of the subtypes have no difference. So, why are there these number of subtypes? Oracle defines subtypes as data type with some sort of constraint on the base data type, but is valid for all? for example, smallint, and decimal.

    type of NUMBER is NUMBER_BASE;
    subtype of FLOAT is NUMBER;
    ACTUAL subtype is FLOAT;
    subtype 'DOUBLE PRECISION' is FLOAT;
    INTEGER subtype is NUMBER (38.0).
    subtype INT is INTEGER;
    subtype SMALLINT is NUMBER (38.0).
    DECIMAL subtype is NUMBER (38.0).
    DIGITAL subtype is DECIMAL;
    DEC subtype is DECIMAL;

    >
    We can overload subprogrammes that setting differ in the number, order, and type of family data. But impossible to overload if the parameter differs only in the void type.

    If I see the standard package, I get
    subtype types BINARY_FLOAT is NUMBER;
    subtype BINARY_DOUBLE is NUMBER;

    But I am able to overload the two procedures, we have a parameter types binary_float and binary_double other. They are of subtype of the same data type. that is the number. So, how is it possible. Also, most of the subtypes have no difference. So, why are there these number of subtypes? Oracle defines subtypes as data type with some sort of constraint on the base data type, but is valid for all? for example, smallint, and decimal.

    type of NUMBER is NUMBER_BASE;
    subtype of FLOAT is NUMBER;
    ACTUAL subtype is FLOAT;
    subtype 'DOUBLE PRECISION' is FLOAT;
    INTEGER subtype is NUMBER (38.0).
    subtype INT is INTEGER;
    subtype SMALLINT is NUMBER (38.0).
    DECIMAL subtype is NUMBER (38.0).
    DIGITAL subtype is DECIMAL;
    DEC subtype is DECIMAL;
    >
    Some of those who, as a smallint, SQL ANSI data types. See table 2-6 ANSI Datatypes converted to Oracle data types in the doc of the SQL language
    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/sql_elements001.htm

    Oracle allows the name of the ANSI data type to use and combines the name of the ANSI for the appropriate Oracle data type
    >
    ANSI SQL/DS and DB2 data types

    The SQL statements that create tables and clusters allows also ANSI data types and products IBM SQL/DS and DB2 data types. Oracle recognizes the ANSI or IBM data type name that differs from the Oracle database data type name. It converts the data type for the equivalent Oracle data type, stores the Oracle data type under the name of the column data type and stores the data in the column in the data type Oracle based on the conversions listed in the following tables.
    >
    But BINARY_FLOAT and BINARY_DOUBLE types are each defined as unique data types (see table 2-1 in this doc).

    Because they are unique Oracle data types, they can be overloaded.

  • XML data type in CFQUERY

    I have a column in the database by using the data type XML from SQL 2005.

    When I do a select statement using CFQUERY, I just returned the first 32000 characters of the XML file, even if the file in the data column is almonst 60 000 characters.

    How can I do a select statement to get the entire record?

    Thank you
    Peter

    Hi Phil:

    By setting up CLOB in my datasource, it works great!

    Thank you so much to report for me.

    Peter

  • CHAR data type question

    Hi all

    This question is purely for updating my knowledge on the rules of comparison of data type for Oracle. I am referring
    [Types of oracle data | http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/datatype.htm#i1960]
    and
    [Datatype comparison rules | http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements002.htm]

    So I understand that Oracle uses the semantics of white comparison comparing the CHAR data type. I was testing a few queries on the CHAR data type.
    SQL> SELECT col_1, LENGTH (col_1), col_2, LENGTH (col_2)
      2    FROM (SELECT CAST ('A' AS CHAR (2)) col_1, CAST ('A' AS CHAR (5)) col_2
      3            FROM DUAL)
      4   WHERE col_1 = col_2
      5  /
    
    CO LENGTH(COL_1) COL_2 LENGTH(COL_2)
    -- ------------- ----- -------------
    A              2 A                 5
    
    1 row selected.
    
    SQL> 
    But when I tried using the set operators to compare data from CHAR data type I got results that confused me.
    --DDL & DMLStatements For Sample Data
    
    CREATE TABLE TABLE_A
    (
    col_1 CHAR(10)
    );
    
    INSERT INTO TABLE_A(col_1) values ('A');
    INSERT INTO TABLE_A(col_1) values ('B');
    
    CREATE TABLE TABLE_B
    (
    col_2 CHAR(15)
    );
    
    INSERT INTO TABLE_B(col_2) values ('A');
    INSERT INTO TABLE_B(col_2) values ('B');
    For reviews of col_1 in the Table_A in Table_B col_2 I used two different methods:

    Using the sub-sub-queries/join method:
    SQL> SELECT a.col_1
      2    FROM table_a a
      3   WHERE a.col_1 IN (SELECT b.col_2
      4                       FROM table_b b)
      5  /
    
    COL_1
    ----------
    B
    A
    
    2 rows selected.
    I got the expected results. Now, I tried to achieve the same thing using a game operator (INTERSECT)
    Using Set operator (INTERSECTION):
    SQL> SELECT a.col_1
      2    FROM table_a a
      3  INTERSECT
      4  SELECT b.col_2
      5    FROM table_b b
      6  /
    
    no rows selected
    
    SQL> 
    I had to add the TRIM function to achieve the expected results:
    SQL> SELECT TRIM (a.col_1)
      2    FROM table_a a
      3  INTERSECT
      4  SELECT TRIM (b.col_2)
      5    FROM table_b b
      6  /
    
    TRIM(A.COL_1)
    ---------------
    A
    B
    
    2 rows selected.
    Could someone please explain why I get different results for the above mentioned methods? I hope that I don't miss any details in the documentation.

    Thanks in advance

    This might help:

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/queries004.htm#i2054381

    'If the select queries values of TANK with different lengths, then the returned value is VARCHAR2 with the length of the largest CHAR value."
    and
    'In queries using the set operators, Oracle does not make the implicit conversion between the data type groups.

    I guess that if the values are CHAR with lengths, then they will not be considered as being equal, even if it is the same value in both tables, bar the number of spaces at the end.

    I don't rely on the parameters of comparison; make it explicit - trim TANKS before being compared - or, better yet, don't use TANKS in the first place, replace them by of VARCHAR2.

    Published by: Boneist on August 25, 2009 16:41

  • Mapping of Data Type from SQL Server to Oracle

    I use Oracle 12 c with heterogeneous services connects to SQL server DB. Some of the columns in the SB of SQL Server are defined as 'nvarchar (max). These come to Oracle as columns of type "long". I would like that these are 'varchar2' types in Oracle, so I do not have any restrictions related to the fields of type "long" when using. I can create a view in SQL Server to convert the data type IE. nvarchar (100). What is the highest value that I can use to make the data to display in Oracle as a varchar? BTW, I tried nvarchar (4000), but which showed any longer. I tried nvarchar (1000) and who showed as a varchar.

    The maximum value for an nvarchar2 in Oracle is 2000. Mapping - If the remote column is mapped to an Oracle varchar/nvarchar - depends on the type of data returned by the ODBC driver. When the driver returns SQL_Varchar, then the maximum precision is 4000 and when it will map it to SQL_WVarchar then it's 2000.

    As your Oracle database uses AL32UTF8 as set of characters that the maps to the Oracle long as your SQL Server nvarchar content is stored using characters UCS2 nvarchar (max), you will get the value that is covered by the database Oracle UTF8 character set. So it shouldn't really matter if the returned string is mapped to an Oracle, varchar or nvarchar.

  • Error (21,100): PL/SQL: ORA-00997: illegal use of the LONG data type

    CREATE or REPLACE (name in varchar2) procedure Compress_tab_partition
    is
    last_mnth_var varchar2 (8);
    curr_mnth_var varchar2 (8);
    number of last_mnth;
    number of curr_mnth;
    last_partition varchar2 (8);
    high_val varchar2 (4000);
    Start

    Select to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00' in the double last_mnth_var;
    Select to_char (sysdate, 'YYYY') | TO_CHAR (sysdate, 'mm') | ' 00' in the double curr_mnth_var;
    Select to_number (last_mnth_var) in the double last_mnth;
    Select to_number (curr_mnth_var) in the double curr_mnth;

    Dbms_output.put_line ('Compression of GOLDMGR Table scores.' | table-name |) "to go". ») ;
    Dbms_output.put_line(' ');

    / * Step 1 - identify the name of the partition of the specified table must be compressed * /.
    Select high_value from high_val from user_tab_partitions where table_name = table-name;
    Select nom_partition into last_partition from user_tab_partitions where table_name = table-name and high_value = rtrim (high_val);

    / * Step 2 - Alter partition table to compress * /.

    run immediately "ALTER TABLE GOLDMGR." | table_name | ' CHANGE THE PARTITION '. last_partition | "COMPRESS by low query";

    / * Step 3 - Index rebuild step * /.

    I'm in (select index_name in user_indexes where table_name = table-name)
    loop
    run immediately "ALTER INDEX GOLDMGR." | i.index_name |' REBUILD ";
    end loop;

    Dbms_output.put_line (' COMPLETED: compress the Table partitions change.) ") ;

    end;
    /

    I'm getting an error like: Error (21,100): PL/SQL: ORA-00997: illegal use of the LONG data type

    Please resolve.

    HIGH_VALUE datatype is LONG. You may not use for a long TIME in WHERE clause expressions. You need to loop through the partitions by selecting HIGH_VALUE and then comparing. Secondly, there is no need to select double to calculate expressions. For example:

    Select to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00' in the double last_mnth_var;

    should be replaced by

    last_mnth_var: = to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00'.

    and there is no need to add_months here:

    last_mnth_var: = to_char (trunc (sysdate, 'MM') - 1, "YYYYMM"). ' 00'.

    But the main question is simply ALTER TABLE MODIFY PARTITION COMPRESS allows compression but does not compress. You must issue ALTER TABLE MOVE PARTITION COMPRESS:

    SQL > create table tbl (n) partition by range (n)
    2 (partition p1 values less than (maxvalue))
    3. Select lpad('X',4000,'X') from dual connect by level<=>
    4.

    Table created.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    830472192

    SQL > alter table tbl
    2. change the partition p1 compress
    3.

    Modified table.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    830472192

    SQL > alter table tbl
    2. move the partition p1 compress
    3.

    Modified table.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    8388608

    SQL >

    SY.

  • Mapping of columns with different data type of sql teradata source target

    Hello

    I get a problem after upgrading our version of the Golden Gate to Version 11.2.1.0.13 17435036.

    Source DB: Sql Server

    Target the DB: Teradata

    We have generated the definition file and put it in the target server.

    The table structure for one of the target server table differs from the source server. Average datatype of some columns in a table is different than it is in the source.

    During replication, it throws an error that incompatibility of data type.

    Is there a keyword in Oracle Golden Gate, that we can use in parameter files to eliminate this error where Golden Gate will automatically match the columns.

    Before this upgrade version of Golden Gate in the source and target, everything worked well.

    Any help in this direction will be really appreciated.

    Bipul Singh

    Hi, ok, I knew this could be the case, but wanted to check your DDL first, but a change in the way BIT data types are stored in the path took place between versions 11.1 and 11.2.  The ILO data are coming in the target as 0x00 and 0x01, which SQL Server manages without conversion, but other targets will have to use the @NUMBIN function in your COLMAP clause to convert the BIT smallint.  And I don't actually know that the SMALLINT will map correctly, but I believe that is should.

    Here is an example:

    card dbo.XXX, target "SCHEMA". "" XXX_T0 ", colmap (usedefaults Roving_Bit=@NUMBIN (Roving_Bit)...

    You will have to do for all types of data BIT also.

  • How can I find what is the data type of a column of a Table in oracle or SQL?

    (a) what happens if I want to know the type of data in a specific column in the Table.

    (b) how to find the column data types?

    Can someone help me please. I am new to oracle and try to learn a few tricks

    Hello

    How to do

    SQL > desc

    SQL> desc emp
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     EMPNO                                     NOT NULL NUMBER(4)
     ENAME                                              VARCHAR2(10)
     JOB                                                VARCHAR2(9)
     MGR                                                NUMBER(4)
     HIREDATE                                           DATE
     SAL                                                NUMBER(7,2)
     COMM                                               NUMBER(7,2)
     DEPTNO                                             NUMBER(2)
    
  • Import SQL Developer data change column entire varchar data type

    Hi all

    May I ask, how do to change all the data type of columns using a single click? I want to import a csv file that has more columns then 200. When I use SQL Developer to impoprt it to the Oracle database, there is the possibility to change the data type of the columns, but it is posibble only on a column-by-column. How can I do this with just a click of mouse? In the csv file, there are only numbers, not alphabetic or other characters. But SQL Developer sets automaticully VarChar for all columns when importing the csv file. And if the data type of the columns is of type varChar, the data mining model produced only 10% of predictive confidence. If the columns integer (number), the trust is more than 80%. I use about 50 tables, and each table has more than 200 columns, so changing the data type of columns by a something inhuman is ::(((
    I saved the csv as xlsx file, but when I tried to import it with SQL Developer, I chose this xlsx and Developer SQL closed the import window. If I can't import xlsx...

    Can someone help me?

    Thank you!!!

    You can send the generated here script? I just want to see the DDL Create of the Table and some examples of INSERT statements.

    To remove the rows in the Table, you can run this in the worksheet:

    DELETE

    ;
    COMMIT;

    You can run the Create Table DDL (skip all INSERT queries) to create the table. Then, use the Import Wizard to import data in this table (column all should have correct data types). In the Import Wizard, you can specify the Table to import the data.

  • SQL Developer: Right-click &gt; format works well with the DATE data type

    Hi all!

    Currently I use the version of SQL Developer Version 3.1.05.

    A question concerning the "auto-format" of syntax each time that writing in the code editor.

    If you take this code snippet and drop into a spreadsheet, then highlight it, right-click of the mouse and select "Format" it's like he fails to add the appropriate spacing when he runs in the DATE data type. I looked all through the: Preferences > database > sql formatter > formatting oracle > change and could not find anything about the formatting with date types.

    I'm looking in the wrong area? Is this a known bug? Am not too looking for this specific question. I LOVE the format function, but I hate having to go through each type of date and manually spacing everything make "clean". I'm picky I guess: P I can live with that but figured that I would ask.

    type TEMP_REC
    IS
    record
    (
    ORG_CODE VARCHAR2 (15).
    PROJECT VARCHAR2 (15).
    WBS VARCHAR2 (30),
    SERIAL_NO VARCHAR2 (30),
    NUMBER OF QTY_ORDERED
    NUMBER OF QTY_SCRAPPED
    NUMBER OF QTY_COMPLETE
    NUMBER OF BOM_ID
    DATE OF REQUEST_DATE,
    CREATE_DATE DATE,
    DATE OF REL_DATE,
    START_DATE DATE,
    DATE OF NEED_DATE,
    END_DATE DATE,
    DATE OF COMPLETE_DATE,
    CREATED_BY VARCHAR2 (30),
    MODIFIED_BY VARCHAR2 (30),
    MODIFY_DATE DATE,
    EST_HOURS NUMBER (6.2),
    ACT_HOURS NUMBER (6.2),
    BAD_COMMENTS VARCHAR2 (1000));

    I can see it now with your last test case. It also changes the future alignment of the varchar2 and number of columns. that is before the date column the varchars line to column 19, after it the line upward in column 18.

    It looks like a bug.

  • Call a PL/SQL stored procedure - data type mismatch

    I call a PL/SQL stored procedure from within a procedure of ODI using the specified technique page Cezar and Julien (http://odiexperts.com/how-to-use-plsql-procedures-and-functions-in-odi) and I get the error "Wrong number or argument types»

    I tested each of the types of parameters, in that I'm passing and it is the text that is causing the problem. I tried to use 'Text' and 'Alphanumeric' for the data type of the variable of the ODI and so many VARCHAR2 and VARCHAR for the PL/SQL parameter type and I can't make it work.

    Is there a trick for passing a string in the ODI PL/SQl?

    Hello

    Ensure

    1. to declare/refresh of the variable before call to PL/SQL.

    2. If the variable is of "alphanumeric" ODI calling must be attached to apostrophes and prefix with the code project as ' #MYPROJECT. ODI_Var'

    3. as parameters you have u who must pass both during the call (IN, OUT, etc.).

    Thank you
    Guru

Maybe you are looking for