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

Tags: Database

Similar Questions

  • Defining the new path for the data files for restoring using the VALUE of NEWNAME FOR DATABASE

    Version: 11.2.0.3 Linux

    Today, I had to do a restore RMAN to a new server and I came across the post following RTO on the VALUE of NEWNAME FOR DATABASE

    ALTER database open resetlogs upgraded;         error to throw

    So, I thought to use it to indicate the new location of the data files to restore.

    That's what I did
    ===================

    Restore the control file and catalog items to backup using the command of CATALOGUE START WITH. Then I started the restoration
    $ rman target / cmdfile=restore.txt
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jul 26 04:40:41 2012
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: SPIKEY (DBID=2576163333, not open)
    
    RMAN> run
    2>  {
    3>  SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey';
    4>  restore database  ;
    5>  }
    6>
    7>
    8>
    executing command: SET NEWNAME
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 07/26/2012 04:40:43
    RMAN-06970: NEWNAME '/fnup/hwrc/oradata/spikey' for database must include %f or %U format
    
    Recovery Manager complete.
    Don't know how it worked for Levi without %f or %U. So, I added %f
     $ vi restore.txt
     $ cat restore.txt
    run
     {
     SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey/%f';
     restore database  ;
     }
    
    
     $ rman target / cmdfile=restore.txt
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jul 26 04:45:45 2012
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: SPIKEY (DBID=2576163333, not open)
    
    RMAN> run
    2>  {
    3>  SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey/%f';
    4>  restore database  ;
    5>  }
    6>
    7>
    8>
    executing command: SET NEWNAME
    
    Starting restore at 26-JUL-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=19 device type=DISK
    
    channel ORA_DISK_1: starting datafile backup set restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_DISK_1: restoring datafile 00001 to /fnup/hwrc/oradata/spikey/1
    channel ORA_DISK_1: restoring datafile 00002 to /fnup/hwrc/oradata/spikey/2
    channel ORA_DISK_1: restoring datafile 00003 to /fnup/hwrc/oradata/spikey/3
    channel ORA_DISK_1: restoring datafile 00004 to /fnup/hwrc/oradata/spikey/4
    channel ORA_DISK_1: restoring datafile 00005 to /fnup/hwrc/oradata/spikey/5
    channel ORA_DISK_1: restoring datafile 00006 to /fnup/hwrc/oradata/spikey/6
    channel ORA_DISK_1: restoring datafile 00007 to /fnup/hwrc/oradata/spikey/7
    channel ORA_DISK_1: restoring datafile 00008 to /fnup/hwrc/oradata/spikey/8
    channel ORA_DISK_1: restoring datafile 00009 to /fnup/hwrc/oradata/spikey/9
    channel ORA_DISK_1: reading from backup piece /u07/bkpfolder/SPIKEY_full_01nh0028_1_1_20120725.rmbk
    channel ORA_DISK_1: errors found reading piece handle=/u07/bkpfolder/SPIKEY_full_01nh0028_1_1_20120725.rmbk
    channel ORA_DISK_1: failover to piece handle=/u07/dump/bkpfolder/SPIKEY_full_01nh0028_1_1_20120725.rmbk tag=SPIKEY_FULL
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:56
    Finished restore at 26-JUL-12
    
    Recovery Manager complete.
    As you can see, RMAN restore data files to the desired location. But the data file names ended up as
    1
    2
    3
    .
    .      
    .
    9
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -----------| Holy Cow |-----------------------------


    So I had to rename each file as below
    $ mv 1 /fnup/hwrc/oradata/spikey/system01.dbf
    $ mv 2 /fnup/hwrc/oradata/spikey/sysaux01.dbf
    $ mv 3 /fnup/hwrc/oradata/spikey/undotbs01.dbf
    I would have been better in execution of the order for each data below file
    SET NEWNAME FOR DATAFILE
    Now, I think, there is no advantage in using NEWNAME SET of DATABASE to. Only the disadvantages. I did anything wrong above?

    Martin;

    On the issue of the VALUE of NEWNAME FOR DATABASE, you must specify at least one of the first three of the following substitution variables to avoid collisions of names: %b f % U. see semantic entry for TO 'filename' for a description of the possible substitution variables.

    You use %f

    %b
    
    Specifies the filename without the fully qualified directory path. For example, the datafile name /oradata/prod/financial.dbf is transformed to financial.dbf. This variable enables you to preserve the names of the datafiles while you move them to different directory. During backup, it can be used for the creation of image copies. The variable cannot be used for OMF datafiles or backup sets.
    
    %f
    
    Specifies the absolute file number of the datafile for which the new name is generated. For example, if datafile 2 is duplicated, then %f generates the value 2.
    
    %U
    
    Specifies a system-generated unique filename. The name is in the following format: data-D-%d_id-%I_TS-%N_FNO-%f. The %d variable specifies the database name. For example, a possible name might be data-D-prod_id-22398754_TS-users_FNO-7.
    

    Source - E10643-01

    Backup and recovery reference

    http://docs.Oracle.com/CD/E14072_01/backup.112/e10643/rcmsynta2014.htm

    I see CKPT and I agree on that!

    Best regards

    mseberg

  • You receive the error software device driver has not been installed successfully using the USB LAN cable

    Original title: Please help!

    I bought a USB - LAN cable, but when I try to use it, this thing came out, "device driver software was not properly installed", then what should I do to use this cable properly? l

    Hello

    Thanks for posting in the Microsoft community!
    You have reached the right forum for your question. If I understand correctly, you receive error software device driver has not been installed successfully using the USB LAN cable. I suggest you follow the troubleshooting steps to check if this may help.

    1. don't you make changes on the computer before the show?
    2 are you able to get any USB devices to work in USB ports?

    Check the status of the device and the driver Version:

    a. open byclicking the button start Device Manager, click on Control Panel, clicking system and Maintenance, and thenclicking Device Manager. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    b. double-click the category containing your device driver and thendouble - click the device name.

    c. check the status of the device tab click on driver tab arencontre, checkDriver provide, Date of the driver, the driver Version, digital signer. Please provide this information.

    d. click OK, exit Device Manager.

    Method 1:
    You can update the drivers on the manufacturer's Web site and check.

    Method 2:

    Use Windows Update to find a device driver
    Note to use Windows Update, you must be connected to the computer as an administrator:
    Follow these steps to use Windows Update to find a device driver: a.Click Start, click all programs and then click Windows Update.
    If you are prompted for an administrator password or a confirmation, type the password, or click on continue.
    b check the updates.
    AA,a,AB,b,c.to determine if there are updated drivers, click on view available updates.
    If updates are available, click the driver you want to install, and then click on install.
    If you are prompted for an administrator password or a confirmation, type the password, or click on continue.

    If you need further assistance, please answer and we will be happy to help you.

  • ORA-19504: cannot create file when using rman

    Hello
    on 10g bR2 on windows machine my rman backup failed on a drive mapped with following error message:
    ORA-19504: cannot create file when using rman

    What do you suggest me?

    I heard that RMAN cannot write to the mapped file system. Is this true? Some people proposed:

    OracleService must be run by OS user with permissions

    But what oracle service? Target or RMAN catalog database database?

    Thank you.

    You must change your environment, on metalink:

    How to configure RMAN to write about readers shared on Windows NT/2000
    DOC - ID: Note: 145843.1

    Werner

  • Error 1 occurred Armijo rule stepsize reduction failed to reduce the value of function within the maxiters

    Hello

    I try to use the VI of unconstrained optimization to fit a measured spectrum. However, each call VI, I get the error:

    Error 1 occurred Armijo rule stepsize reduction failed to reduce the value of function within the maxiters

    Possible reasons:

    LabVIEW: An input parameter is not valid. For example if the input is a path, the path can contain a character not allowed by the operating system such as? or @.
    =========================
    NOR-488: Command requires controller GPIB be in Charge.

    Does anyone know what I'm doing wrong and how I can fix this problem?

    The VI for the stepsize Armijo rule reduction can be found here:

    \vi.lib\gmath\NumericalOptimization\qn_armijo rule stepsize reduction.vi

    In the current implementation, the spectrum is able to a rectangular spectrum. This may be the cause of the error?

    I have attached the screw that I use. They are written in LabVIEW 2010.

    Thanks Marc67 for your quick reply, but I found the error.

    It was pretty stupid, that I used a bad vector of departure for the unconstrained optimization VI, which was too low values.

  • Error message: your browser must have Java enabled to use the Client for Java when you try to access the Citrix server.

    Original title: java question.

    I'm trying to access the Citrix server to access my work server.  When I click on an application, I get an error message: your browser must have Java enabled to use the Client for Java.  I checked and the right version of Java installed and removed the old Java applications but still this message when trying to access Citrix.  Please meet w / directions for a fix.

    Start by seeing if Java has been installed correctly:

    http://www.Java.com/en/download/testjava.jsp

    or
    http://javatester.org/

  • Error message indicating the r300 display driver stopped responding when using the full screen.

    Original title: driver atikmdag error message when using the full screen.

    Error message indicating the display driver r300 unresponsive, but has recovered, usually when enter full screen mode.

    Hi Peterrichardson,

    1. when exactly you get this message?

    2. what player do you use?

    3. you remember to make changes to the computer before this problem?

    Method 1:

    You can try to reduce the hardware acceleration and check.

    a. click the Start button, Control Panel.

    b. now, select appearance and personalization, and under display, select adjust screen resolution.

    c. now, select adjust the resolution.

    d. click Advanced settings.

    e. now, click the Troubleshooting tab, and select the change settings button.

    f. in the Security dialog box, click on continue.

    g. move the hardware acceleration slider to the third notch.

    h. click OK and restart Windows.

     

    Method 2: Update your display driver

    Updated a hardware driver that is not working properly

    Hope this information is useful.

  • What type of layer should be used when using the effects lighitng filters "I can't using the way I expect to work -

    What type of layer should be used when using the effects lighitng filters "I can't using the way I expect to work -

    I want to add lights to he image - and to inform the parties of the image - I duplicated the layer add the lights in the filters, but it does not act as a process additive-

    Check out this tutorial from Phlearn on YouTube. It is a bit more flexible, but, of course, requires a bit of elbow grease more Photoshop-wise.

    Create beams of light in Photoshop - YouTube

    Using this technique, you can adjust the 'lights' as you want by manipulating setting masks. See screenshot below. (Still once again, excuse the butchering.)

  • Date to determine functions using the % for the year ended

    I'm trying to figure out how I can use date functions to determine the percentage of my organizations exercise which was completed. For example, our fiscal year starts October 1 and ends on 31 November the following year. Based on the current date, I want to be able to determine what percentage of exercise has been completed. I guess I can set variables for the dates of beginning and end of the fiscal year, and then use the Now() date function to determine the current date. Can I use the DateDiff() function to accomplish this task?

    Calculate the number of days in the fiscal year and the number of days since the beginning of the year and divide:



    I guess your arrival dates are wrong, because there is no 31 November and your year is long 14 months.

  • Where is the DBMS output window when using the PL/SQL Editor in v1.5.5?

    I find the output window of DBMS when using the SQL worksheet, but where is when I run a PL/SQL procedure in the PL/SQL Editor window?

    I'm used to using TOAD (and want to use SQL Developer, because it's much better behaved when executing procedures, among other problems, TOAD refuses to reduce to a minimum when it executes a pl/sql procedure) and it allows me to edit a pl/sql procedure, enable the DBMS output window, run the proc, and have the DBMS lines show up in the said output window.

    I can't find the same functionality in SQL Developer. I've seen a lot of posts (this forum and a Google search), but they all talk about the SQL worksheet. This is not what I want.

    Any help would be greatly appreciated.

    Thank you.

    Hello
    After running PL/SQL procedure, I saw all the important information in the running tab (called Running - log) including DBMS_OUTPUT.put_line lines.
    Petr

  • Table design for the newspaper error due to a xml data type

    Hello

    I am trying to create a table of error log, but I get the below error

    ORA-20069: unsupported column or the types found:

    Table on which I am trying to create a column with the xml data type.

    Is there a way to create the error table for tables with the XML data type.

    Thank you

    PAL

    http://docs.Oracle.com/CD/E11882_01/server.112/e41084/statements_9014.htm#SQLRF55101

    Concerning

    Etbin

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e40758/d_errlog.htm#ARPLS680

    Look at the skip_unsupported setting

  • 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

  • Error: PL / SQL: ORA-00922: missing or invalid option

    I'm sorry, I'm new to Oracle and am in a crazy time. I'm having all kinds of problems with the conversion of SQL to Oracle... and get the PL/SQL: ORA-00922: missing or not valid error option with the following function. Any help appreciated.

    FUNCTION IEXGADQReceived)
    v_BDateTime IN DATE
    v_EDateTime IN DATE
    v_Queuename IN VARCHAR2
    v_Username IN VARCHAR2
    )
    RETURN int IS
    INT v_retval;
    BEGIN
    SET v_retval: = (select count (distinct iid)
    Of agentinteractionsview
    WHERE the ibegintime between v_BDateTime and v_EDateTime
    and fromqueue = v_Queuename
    and fromroutereasonid = 11
    and username = v_Username);

    RETURN v_retval;
    END IEXGADQReceived;

    No problem, we've all been there before: D)

    FUNCTION IEXGADQReceived (v_BDateTime IN DATE,v_EDateTime IN DATE,v_Queuename IN VARCHAR2,v_Username IN VARCHAR2)RETURN int ISv_retval INT;BEGINselect count(distinct iid) INTO v_retval FROM agentinteractionsviewWHERE ibegintime between v_BDateTime and v_EDateTimeand fromqueue = v_Queuenameand fromroutereasonid = 11and username = v_Username;
    
    RETURN v_retval;END IEXGADQReceived;
    
  • SQL Loader loading data into two Tables using a single CSV file

    Dear all,

    I have a requirement where in I need to load the data into 2 tables using a simple csv file.

    So I wrote the following control file. But it loads only the first table and also there nothing in the debug log file.

    Please suggest how to achieve this.

    Examples of data

    Source_system_code,Record_type,Source_System_Vendor_number,$vendor_name,Vendor_site_code,Address_line1,Address_line2,Address_line3

    Victor, New, Ven001, Vinay, Vin001, abc, def, xyz

    Control file script

    ================

    OPTIONS (errors = 0, skip = 1)
    load data
    replace
    in the table1 table:
    fields ended by ',' optionally surrounded "" "
    (
    Char Source_system_code (1) POSITION "ltrim (rtrim (:Source_system_code)),"
    Record_type tank "ltrim (rtrim (:Record_type)),"
    Source_System_Vendor_number tank "ltrim (rtrim (:Source_System_Vendor_number)),"
    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"
    )
    in the Table2 table
    1 = 1
    fields ended by ',' optionally surrounded "" "
    (
    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"
    Vendor_site_code tank "ltrim (rtrim (:Vendor_site_code)),"
    Address_line1 tank "ltrim (rtrim (:Address_line1)),"
    Address_line2 tank "ltrim (rtrim (:Address_line2)),"
    Address_line3 tank "ltrim (rtrim (:Address_line3)).
    )

    the problem here is loading into a table, only the first. (Table 1)

    Please guide me.

    Thank you

    Kumar

    When you do not provide a starting position for the first field in table2, it starts with the following after a last referenced in table1 field, then it starts with vendor_site_code, instead of $vendor_name.  So what you need to do instead, is specify position (1) to the first field in table2 and use the fields to fill.  In addition, he dislikes when 1 = 1, and he didn't need anyway.  See the example including the corrected below control file.

    Scott@orcl12c > test.dat TYPE of HOST

    Source_system_code, Record_type, Source_System_Vendor_number, $vendor_name, Vendor_site_code, Address_line1, Address_line2, Address_line3

    Victor, New, Ven001, Vinay, Vin001, abc, def, xyz

    Scott@orcl12c > test.ctl TYPE of HOST

    OPTIONS (errors = 0, skip = 1)

    load data

    replace

    in the table1 table:

    fields ended by ',' optionally surrounded "" "

    (

    Char Source_system_code (1) POSITION "ltrim (rtrim (:Source_system_code)),"

    Record_type tank "ltrim (rtrim (:Record_type)),"

    Source_System_Vendor_number tank "ltrim (rtrim (:Source_System_Vendor_number)),"

    $vendor_name tank "ltrim (rtrim (:Vendor_name)).

    )

    in the Table2 table

    fields ended by ',' optionally surrounded "" "

    (

    source_system_code FILL (1) POSITION.

    record_type FILLING,

    source_system_vendor_number FILLING,

    $vendor_name tank "ltrim (rtrim (:Vendor_name)),"

    Vendor_site_code tank "ltrim (rtrim (:Vendor_site_code)),"

    Address_line1 tank "ltrim (rtrim (:Address_line1)),"

    Address_line2 tank "ltrim (rtrim (:Address_line2)),"

    Address_line3 tank "ltrim (rtrim (:Address_line3)).

    )

    Scott@orcl12c > CREATE TABLE table1:

    2 (Source_system_code VARCHAR2 (13),)

    3 Record_type VARCHAR2 (11),

    4 Source_System_Vendor_number VARCHAR2 (27),

    5 $vendor_name VARCHAR2 (11))

    6.

    Table created.

    Scott@orcl12c > CREATE TABLE table2

    2 ($vendor_name VARCHAR2 (11),)

    3 Vendor_site_code VARCHAR2 (16).

    4 Address_line1 VARCHAR2 (13),

    5 Address_line2 VARCHAR2 (13),

    Address_line3 6 VARCHAR2 (13))

    7.

    Table created.

    Scott@orcl12c > HOST SQLLDR scott/tiger CONTROL = test.ctl DATA = test.dat LOG = test.log

    SQL * Loader: release 12.1.0.1.0 - Production on Thu Mar 26 01:43:30 2015

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 1

    TABLE1 table:

    1 row loaded successfully.

    Table TABLE2:

    1 row loaded successfully.

    Check the log file:

    test.log

    For more information on the charge.

    Scott@orcl12c > SELECT * FROM table1

    2.

    RECORD_TYPE SOURCE_SYSTEM_VENDOR_NUMBER $VENDOR_NAME SOURCE_SYSTEM

    ------------- ----------- --------------------------- -----------

    Victor Ven001 new Vinay

    1 selected line.

    Scott@orcl12c > SELECT * FROM table2

    2.

    $VENDOR_NAME VENDOR_SITE_CODE ADDRESS_LINE1 ADDRESS_LINE2 ADDRESS_LINE3

    ----------- ---------------- ------------- ------------- -------------

    Vinay Vin001 abc def xyz

    1 selected line.

    Scott@orcl12c >

  • Specify the type of data when using the "CREATE TABLE AS SELECT"?

    In the table creation code I'm trying to create a DATE column called DOB below. However, the resulting DOB column in the condamnes2 table is a Varchar2. How can I specify that I want to be a DATE field DOB? (I know that I can create the structure first and then fill it but this isn't what I want.)

    create the table condamnes2
    SELECT Person_ID,
    decode (year of BIRTH, null, null, to_date (nvl(BIRTHMONTH,1) |)) » /'|| NVL(Birthday,1) | » /'|| NVL (BIRTHYEAR, 1500), ' MM/DD/YYYY')) DOB
    Among the people

    Thank you

    Use the CAST function in your decoding:

    SQL> create table Persons2 as
      2  SELECT Person_ID,
      3         decode(BIRTHYEAR
      4               ,null, cast(null as date)
      5               ,to_date(nvl(BIRTHMONTH,1)||'/'||nvl(birthday,1)||'/'||nvl(BIRTHYEAR,1500),'MM/DD/YYYY')) DOB
      6  from   persons
      7  ;
    
    Table created.
    
    SQL> desc persons2
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     PERSON_ID                                          NUMBER
     DOB                                                DATE
    

Maybe you are looking for

  • Question form

    Hello I'm using numbers on a Mac and have a question form. Basically, I trade the Forex market. A particular strategy, due to the volatility on the graph 4 hr and the range of prices around my entry level, I have 3 entry levels and 3 separate stops.

  • 775de753 of the module ntdll.dll access violation

    I am getting access violation 775de753 in module ntdll.dll which I can't very well what the problem is with the software. can someone help me in this reregard?

  • How to install advinne d303 usb hspa modem on windows 7

    I have problem with my USB Modem when convert my pc Window XP SP3 in Windows 7.My modem has been Advinne model: D303 HSPA USB Modem 7.2 m.So, how can I solve the problem and what setting I will chose Windows 7 setting.

  • Adding a second hard drive internal in a T510?

    I bought the new 510 with the internal hard disk of 500 GB 7200 RPM, and I think about adding another one with the same characteristics. (1) is there a place to add a second hard drive (2) if so, would you have a second hard drive, or run a raid? (3)

  • Cannot open PS files after update of CC

    Whenever I try to double-click a .jpg file in Dreamweaver (which normally would open in PS) I get the message "unable to launch 2015\Photoshop.exe C:\Program Files\Adobe\Adobe Photoshop CC. Please make sure the demand is there and it has enough memor