SQL*Loader(8.1.5.0.1) hang on 8.1.5.0.2 under RH6.2

Below is a sample of a .ctl file which hangs sqlldr. Any ideas? sqlldr runs fine on some of my other .ctl files and this particular .ctl file worked fine in 8.0.5...ouch...
LOAD DATA
INFILE 'pm82e_parts'
INTO TABLE Parts
FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
customerID,
partID "rtrim(:partID)",
partDescription "rtrim(:partDescription)",
primePartNumber "rtrim(:primePartNumber)",
revision "rtrim(:revision)",
history "translate(substr(:history,1,1), 'YN', 'tf')",
primeContractor "rtrim(:primeContractor)",
packID "rtrim(:packID)",
accountSupervisor "rtrim(:accountSupervisor)",
condition "rtrim(:condition)",
material "rtrim(:material)",
reviewBP "translate(substr(:reviewBP,1,1), 'YN', 'tf')",
attn "rtrim(:attn)",
planOK "translate(substr(:planOK,1,1), 'YN', 'tf')",
mixOK "translate(substr(:mixOK,1,1), 'YN', 'tf')",
certReqd "translate(substr(:certReqd,1,1), 'YN', 'tf')",
finalInspectReqd "translate(substr(:finalInspectReqd,1,1), 'YN', 'tf')",
receiveInspectReqd "translate(substr(:receiveInspectReqd,1,1), 'YN', 'tf')",
lotControl "translate(substr(:lotControl,1,1), 'YN', 'tf')",
sampleWeight defaultif sampleWeight='',
sampleSize defaultif sampleSize='',
length defaultif length='',
width defaultif width='',
height defaultif height='',
pieceUnit,
weightUnit,
plannerID CONSTANT ""
Sample input line:
2D3010|*****DUMMY JOB******|***DO NOT TAKE OFF***| |10.00|Yes| |PK03| || |No| |No|No|No|No|Yes|No|5|6|1|2|3|PCS|LBS|
2D3010|BLACKHAWK TEST TRAV.|DUMMY JOB| |A|Yes| |PK12| |MACHINED|7075-T73 ALUMINUM|No|BRENT HAYS|No|No|Yes|Yes|No|No|0|0|8.101|5|0|PCS|LBS|
2D3010|DUMMY JOB |DO NOT TAKE OFF| ||Yes| |PK00| || |No| |No|No|No|Yes|No|No|2|1|0|0|0|PCS|LBS|
2D3010|MIKE TEST |***DO NOT TAKE OFF***| ||Yes| |PK03| || |No| |No|No|No|No|Yes|No|0|0|0|0|0|PCS|LBS|
2D3010|SPEC TEST |SAMPLE| ||Yes| |PK00| || |No| |No|No|No|Yes|No| |0|0|0|0|0|PCS|LBS|
2D3010|TEST | || || ||JM| ||No| |No| |No|Yes|No| |0|0|0|0|0|PCS|LBS|
2D3010|TEST PART | || |Yes| |PK00|JM| ||No| |No|No|No|Yes|No|No|0|0|0|0|0|PCS|LBS|
AA1010|11829282 |HUB| ||Yes| |PK00| |MACHINED|POWDERED METAL|No|RUSS BUSSE|No|No|Yes|Yes|No|No|0|0|3.5|1.25|.88|PCS|LBS|
AAA000|A GOOD EXAMPLE |Sample Descriptive Part|J-10899-2|A-0192|Yes|LOR010|PK00| |READY TO FINISH|17-4 P4 STL. STEEL|No|Richard III|Yes|No|Yes|Yes|No|No|1|1|4|5.5|0|PCS|LBS|
David Shaffer
[email protected]
null

Oops, this might be helpful too...
create table Parts(
customerID char(6) not null,
partID varchar2(20) not null,
partDescription varchar2(25),
accountSupervisor char(6),
plannerID char(6),
revision varchar2(20),
history char check (history in ('t', 'f')),
planOK char check (planOK in ('t', 'f')),
mixOK char check (mixOK in ('t', 'f')),
reviewBP char check (reviewBP in ('t', 'f')),
lotControl char check (lotControl in ('t', 'f')),
certReqd char check (certReqd in ('t', 'f')),
receiveInspectReqd char check (receiveInspectReqd in ('t', 'f')),
finalInspectReqd char check (finalInspectReqd in ('t', 'f')),
skidControl char default 'f' check (skidControl in ('t', 'f')),
primeContractor char(6),
primePartNumber varchar2(20),
-- pem info moved to finish group
--pemFinishID char(10),
--pemFinishDescription varchar2(160),
packID varchar2(8),
attn varchar2(20),
attnPN varchar2(30), -- international phone numbers allowed
length real,
width real,
height real,
sampleWeight real,
sampleSize real,
pieceUnit varchar2(10),
weightUnit char(3) check (weightUnit in ('LBS', 'CWT')),
material varchar2(20),
condition varchar2(20),
createdOn date default SYSDATE,
primary key (customerID, partID) using index tablespace index_large
/* foreign key customerID references Customers */
) tablespace pmapp_large;

Similar Messages

  • Sql loader hangs

    Hi All,
    I have a java program which runs sql loader in a timer. That is the sql loader is used to load some tables with the data contained in a flat file. And I want this to be run every night.
    I am using Runtime class to initiate a process which will invoke the sql loader. This works fine when I directly call my function in main.
    But since I want this to run every night, I decided to invoke it thru the timer class. And when I do that the sql loader hangs and I have to terminate the process manually.
    Is there any solution for the above problem?
    Any help will be appreciated.
    Regards,
    Chitra

    Just to give a lil bit more added clarity on the issue.
    The requirement is like this. I have a flat file which needs to be uploaded to a database periodically. Every 24hrs. Now I am using Oracles SQL Loader to upload the data flat file. I am calling SQL loader from with a java program using Runtime class. Now I initiated this using a standard Java application and put it in the main class. It works fine. Now since I needed to have this running every 24hrs I used a Timer class to set the timer and to have it running evry 24 hrs. Now if I execute the same class above within the timer class, the SQL loader pops up in a new window and the program does not complete the execution. It just hangs. Which requires for me to terminate the process manually. All the data in the flat file is uploaded to the database but that is shown only after the proecess is treminated. Is there any solution for this ? Or does anyone have any idea as to why this is happenin ?
    heres the code that I have written.
    public class RmsDataLoader
    Toolkit toolkit;
    Timer timer;
    public RmsDataLoader()
    toolkit = Toolkit.getDefaultToolkit();
    timer = new Timer();
    timer.schedule(new RMSJobThread(),
         0, //initial delay
         24*60*60*1000); //subsequent rate
    public static void main(String[] args)
    RmsDataLoader rms = new RmsDataLoader();
    class RMSJobThread extends TimerTask
    public RMSJobThread()
    public void run()
    RMSJob rmsjob = new RMSJob();
    rmsjob.runJob();
    and the function in runJob is
    public void runJob (String errorlog) {
    try {
    // Validation 1 : The datafile exists and the file size is not 0
    String strDataFile = "W:\\rms_amps\\" + todayDate + "\\inv_company_label.dat";
    File dataFile = new File(strDataFile);
    if(!dataFile.exists()){
    rmsExp.createLog(filename, filename, " Data File does not exist", todayDate);
    } else {
    long len = dataFile.length();
    if (len <= 0) {
    rmsExp.createLog(filename, filename, " File size is 0 ", todayDate);
    // End of Validation 1
    // create a process to invoke sql loader
    Process process = Runtime.getRuntime().exec("sqlldr USERID=scott@umidb/tiger CONTROL=load_company_label.ctl LOG=load_company_label.log BAD=inv_company_label.bad DATA=inv_company_label.dat");
    return ;
    } catch (Exception ei) {
    rmsExp.createLog(filename, filename, ei.getMessage() , todayDate);
    ei.printStackTrace();
    System.out.println (" Error while initiating the data loading " );
    return ;

  • SQL Loader step hangs in unix script

    Hi,
    We have a nightly job that separately truncates 6 tables and then loads them with flat file data. It works fine almost always.
    Eight months ago and then yesterday, one of the 6 load steps(not the same table) hung up and did nothing.
    Reruns ran fine.
    We have a web page that looks at this data. I'm wondering if a user hitting enter just as sql loader wanted to truncate the table might be the problem. Or maybe too many connections are being requested at the time.
    Is there any sort of retry capability within sql loader or anything else worth attempting?
    We have to run this in the evening, not late at night.
    thanks
    Steve

    Hi Steve,
    Then you must have scheduled job using Cron or some other scheduler.
    You can create one more job and you can schedule it after current job. If you have one of the advanced scheduler then you will be able to set dependency. So, that as first job (of truncating and reloading data) completes, second job will start. Otherwise you can take in consideration the expected completion time and schedule second job after that amount of time.
    Then you need to grep the log to find out which tables reload completed and which didn't. ReRun the job for tables which didn't run in first run.
    Hope it helps!
    Regards,
    Arpit
    Edited by: arpit_shah4u on Oct 6, 2008 2:03 PM

  • Sql loader - Data loading issue with no fixed record length

    Hi All,
    I am trying to load the following data through sql loader. However the records # 1, 3 & 4 are only loading succesfully into the table and rest of the records showing as BAD. What is missing in my syntax?
    .ctl file:
    LOAD DATA
    INFILE 'C:\data.txt'
    BADFILE 'c:\data.BAD'
    DISCARDFILE 'c:\data.DSC' DISCARDMAX 50000
    INTO TABLE icap_gcims
    TRAILING NULLCOLS
         CUST_NBR_MAIN          POSITION(1:9) CHAR NULLIF (CUST_NBR_MAIN=BLANKS),
         CONTACT_TYPE          POSITION(10:11) CHAR NULLIF (CONTACT_TYPE=BLANKS),
         INQUIRY_TYPE          POSITION(12:13) CHAR NULLIF (INQUIRY_TYPE=BLANKS),
         INQUIRY_MODEL          POSITION(14:20) CHAR NULLIF (INQUIRY_MODEL=BLANKS),
         INQUIRY_COMMENTS     POSITION(21:60) CHAR NULLIF (INQUIRY_COMMENTS=BLANKS),
         OTHER_COLOUR POSITION(61:75) CHAR NULLIF (OTHER_COLOUR=BLANKS),
         OTHER_MAKE          POSITION(76:89) CHAR NULLIF (OTHER_MAKE=BLANKS),
         OTHER_MODEL_DESCRIPTION POSITION(90:109) CHAR NULLIF (OTHER_MODEL_DESCRIPTION=BLANKS),
         OTHER_MODEL_YEAR POSITION(110:111) CHAR NULLIF (OTHER_MODEL_YEAR=BLANKS)
    data.txt file:
    000000831KHAN
    000000900UHFA WANTS NEW WARRANTY ID 000001017OHAL
    000001110KHAP
    000001812NHDE231291COST OF SERVICE INSPECTIONS TOO HIGH MAXIMA 92 MK
    000002015TPFA910115CUST UPSET WITH AIRPORT DLR. $200 FOR PLUGS,OIL,FILTER CHANGE. FW
    Thanks,

    Hi,
    Better if you have given the table structure, I check your script it was fine
    11:39:01 pavan_Real>create table test1(
    11:39:02   2  CUST_NBR_MAIN  varchar2(50),
    11:39:02   3  CONTACT_TYPE varchar2(50),
    11:39:02   4  INQUIRY_TYPE varchar2(50),
    11:39:02   5  INQUIRY_MODEL varchar2(50),
    11:39:02   6  INQUIRY_COMMENTS varchar2(50),
    11:39:02   7  OTHER_COLOUR varchar2(50),
    11:39:02   8  OTHER_MAKE varchar2(50),
    11:39:02   9  OTHER_MODEL_DESCRIPTION varchar2(50),
    11:39:02  10  OTHER_MODEL_YEAR varchar2(50)
    11:39:02  11  );
    Table created.
    11:39:13 pavan_Real>select  * from test1;
    no rows selected
    C:\Documents and Settings\ivy3905>sqlldr ara/ara@pavan_real
    control = C:\control.ctl
    SQL*Loader: Release 9.2.0.1.0 - Production on Sat Sep 12 11:41:27 2009
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Commit point reached - logical record count 5
    11:42:20 pavan_Real>select count(*) from test1;
      COUNT(*)                                                                     
             5    control.ctl
    LOAD DATA
    INFILE 'C:\data.txt'
    BADFILE 'c:\data.BAD'
    DISCARDFILE 'c:\data.DSC' DISCARDMAX 50000
    INTO TABLE test1
    TRAILING NULLCOLS
    CUST_NBR_MAIN POSITION(1:9) CHAR NULLIF (CUST_NBR_MAIN=BLANKS),
    CONTACT_TYPE POSITION(10:11) CHAR NULLIF (CONTACT_TYPE=BLANKS),
    INQUIRY_TYPE POSITION(12:13) CHAR NULLIF (INQUIRY_TYPE=BLANKS),
    INQUIRY_MODEL POSITION(14:20) CHAR NULLIF (INQUIRY_MODEL=BLANKS),
    INQUIRY_COMMENTS POSITION(21:60) CHAR NULLIF (INQUIRY_COMMENTS=BLANKS),
    OTHER_COLOUR POSITION(61:75) CHAR NULLIF (OTHER_COLOUR=BLANKS),
    OTHER_MAKE POSITION(76:89) CHAR NULLIF (OTHER_MAKE=BLANKS),
    OTHER_MODEL_DESCRIPTION POSITION(90:109) CHAR NULLIF (OTHER_MODEL_DESCRIPTION=BLANKS),
    OTHER_MODEL_YEAR POSITION(110:111) CHAR NULLIF (OTHER_MODEL_YEAR=BLANKS)
    data.txt
    000000831KHAN
    000000900UHFA WANTS NEW WARRANTY ID 000001017OHAL
    000001110KHAP
    000001812NHDE231291COST OF SERVICE INSPECTIONS TOO HIGH MAXIMA 92 MK
    000002015TPFA910115CUST UPSET WITH AIRPORT DLR. $200 FOR PLUGS,OIL,FILTER CHANGE. FW
    CUST_NBR_MAIN     CONTACT_TYPE     INQUIRY_TYPE     INQUIRY_MODEL     INQUIRY_COMMENTS     OTHER_COLOUR     OTHER_MAKE     OTHER_MODEL_DESCRIPTION     OTHER_MODEL_YEAR
    000000831     KH     AN     NULL     NULL     NULL     NULL     NULL     NULL
    000000900     UH     FA      WANTS     NEW WARRANTY ID 000001017OHAL     NULL     NULL     NULL     NULL
    000001110     KH     AP     NULL     NULL     NULL     NULL     NULL     NULL
    000001812     NH     DE     231291C     OST OF SERVICE INSPECTIONS TOO HIGH MAXI     MA 92 MK     NULL     NULL     NULL
    000002015     TP     FA     910115C     UST UPSET WITH AIRPORT DLR. $200 FOR PLU     GS,OIL,FILTER C     HANGE. FW     NULL     NULL- Pavan Kumar N
    Edited by: Pavan Kumar on Sep 12, 2009 11:46 AM

  • Odd SQL Loader problem

    I have Oracle 8.0.3 on my Windows 2K client machine and am using sql loader to load a flat file into an 8i database. When I execute the command in a Dos window, the load runs, but the DOS window hangs and won't return me to the c:\ prompt. As a result, I can't run a bat file to load multiple tables, as the sqlldr80 command won't continue past the first table loaded.
    Any ideas? thanks

    The application is about processing CDRs (Call Details) and data is huge and need to be processed very quickly.
    One process is uploading the data coming from different files into the partitioned table and other process works in parallel to proces the available data and it need not to wait for end of upload.
    I can do some IPC to synchronize the act of both processes but this will delay the whole thing because I will have to drop/recreate indexes many times on huge data.
    So is there any features available that I can use or any other suggestion

  • Load two input file into One Target table through SQL LOADER

    Hi Expert,
    I have 2 .cvs files.
    1st file having cols as account_no & first name
    2nd file having cols as account_no & last name
    There is a table called temp has 3 cols accounts_number first name & last name
    accounts number in both files are same
    Now I wann upload these 2 files in to table temp
    how do I do that
    Pls suggest
    Thx
    Umesh Goel

    UG wrote:
    I dont want truncate my table bcoz account no and first name from first file and last name from second file.
    so pls suggest something else....Hang on, I'll go find you some glasses. I think you're having trouble reading.
    First file : Control file truncates and loads data
    Second file : Control file does not truncate and loads data
    2 Calls to SQL*Loader
    Is that a little clearer?
    Are you saying there is a relationship between the data in the two files?
    How do you know which last name relates to which first name in the first file? Is there a reference key between the records on the two files?
    Perhaps you'd better show us an example of the contents of the files so we can see what you are trying to do.

  • Sql loader problem - thread appears to be hung

    Sorry to ask such a strang question but I am not sure which direction to go with this one. Hoping someone might have an idea.
    I am running oracle 10g on windows. I have 3 servers all patched at the same levels. All 3 servers run a purchased utility called dbutility which copies data from a dms database to an oracle database using oracle's sql*loader. On one server the dbutility hangs when the dbutility program tries to start sql*loader. I must close the dos window to end the job - ctl c does not work.
    If I let the job sit long enought, it eventually gets the message:"BULK LOADER thread appears to be hung: main thread waiting".
    I called the company which supports the dbutility program and they think it is a windows or oracle problem.
    I can get the dbutility to work if I start the dbutility in verbose (trace) mode. For some reason slowing the dbutility down before starting the sql*load program fixes the problem.
    Has anyone ever had issues starting sql*loader?
    Does anyone have any ideas what might be causing this problem?
    Do you think reinstalling the sql*loader might help?
    Thank you!
    Confused:)

    Try to built a test case on your own.
    Make a little test creating an sql*loader ctl and try to load the file on a test table.
    If that work you should ask againg with your tool support.
    load data
    infile 'YOUR_FILE_HERE'
    badfile 'BAD_FILE'
    append
    into table test_ldr
    fields terminated by "," optionally enclosed by '"'          
    (caracter1,caracter2,caracter3,caracter4,caracter5)
    caraterN = your table column name.
    sqlldr.exe userid=username/password@db rows=1000 control=conrtol.ctl log=log.log errors=200 direct=y

  • How to load a default value in to a column when using sql loader

    Im trying to load from a flat file using sql loader.
    for 1 column i need to update using a default value
    how to go about this?

    Hi!
    try this code --
    LOAD DATA
       INFILE 'sample.dat'
       REPLACE
       INTO TABLE emp
       empno   POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
       ename   POSITION(06:15)  CHAR,
       job         POSITION(17:25)  CHAR,
       mgr       POSITION(27:30)  INTEGER EXTERNAL NULLIF mgr=BLANKS,
       sal        POSITION(32:39)  DECIMAL EXTERNAL NULLIF sal=BLANKS,
       comm   POSITION(41:48)  DECIMAL EXTERNAL DEFAULTIF comm = 100,
       deptno  POSITION(50:51)  INTEGER EXTERNAL NULLIF deptno=BLANKS,
       hiredate POSITION(52:62) CONSTANT SYSDATE
      )-hope this will solve ur purpose.
    Regards.
    Satyaki De.

  • How can we tell if SQL*Loader is working on a TABLE?

    We have a process that requires comparing batches with LDAP information. Instead of using an LDAP lookup tool, we get a nightly directory file, and import the two COLUMNs we want via SQL*Loader (REPLACE) into an IOT. Out of three cases, two just check the first COLUMN, and the third needs the second COLUMN as well.
    We did not think of using External TABLEs, because we cannot store files on the DB server itself.
    The question arises, what to do while the file is being imported. The file is just under 300M, so it takes a minute or so to replace all the data. We found SQL*Loader waits until a transaction is finished before starting, but a query against the TABLE only waits while it is actually importing the data. At the beginning of SQL*Loader's process, however, a query against the TABLE returns no rows.
    The solution we are trying right now is, to have the process that starts SQL*Loader flip a flag in another TABLE denoting that it is unavailable. When it is done, it flips it back, and notes the date. Then, the process that queries the information, exits if the flag is currently 'N'.
    The problem, is, what if SQL*Loader starts inbetween the check of the flag, and the query against the TABLE. How do we guarantee that it is still not being imported.
    I can think of three solutions:
    1) LOCK the ldap information TABLE before checking the flag.
    2) LOCK the record that the process starting SQL*Loader flips.
    3) Add a clause to the query against the TABLE checks that there are records in the TABLE (AND EXISTS(SELECT * FROM ldap_information).
    The problem with 3) is that the process has already tagged the batches (via a COLUMN). It could, technically reset them afterwards, but that seems a bit backwards.

    Just out of curiosity, are you aware that Oracle supplies a DBMS_LDAP package for pulling information from LDAP sources? It would obviously be relatively easy to have a single transaction that deletes the existing data, loads the new data via DBMS_LDAP, and commits, which would get around the problem you're having with SQL*Loader truncating the table.
    You could also have SQL*Loader load the data into a staging table and then have a second process either MERGE the changes from the staging table into the real table (again in a transactionally consistent manner) or just delete and insert the data.
    Justin

  • Loading two tables at same time with SQL Loader

    I have two tables I would like to populate from a file C:\my_data_file.txt.
    Many of the columns I am loading into both tables but there are a handful of columns I do not want. The first column I do not want for either table. My problem is how I can direct SQL Loader to go back to the first column and skip over it. I had tried using POSITION(1) and FILLER for the first column while loading the second table but I got THE following error message:
    SQL*Loader-350: Syntax error at line 65
    Expecting "," or ")" found keyword Filler
    col_a Poistion(1) FILLER INTEGER EXTERNALMy control file looks like the following:
    LOAD DATA
    INFILE 'C:\my_data_file.txt'
    BADFILE 'C:\my_data_file.txt'
    DISCARDFILE 'C:\my_data_file.txt'
    TRUNCATE INTO TABLE table_one
    WHEN (specific conditions)
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    col_a FILLER INTEGER EXTERNAL,
    col_b INTEGER EXTERNAL,
    col_g FILLER CHAR,
    col_h CHAR,
    col_date DATE "yyyy-mm-dd"
    INTO TABLE table_two
    WHEN (specific conditions)
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    col_a POSITION(1) FILLER INTEGER EXTERNAL,
    col_b INTEGER EXTERNAL,
    col_g FILLER CHAR,
    col_h CHAR,
    col_date DATE "yyyy-mm-dd"
    )

    Try adapting this for your scenario.
    tables for the test
    create table test1 ( fld1 varchar2(20), fld2 integer, fld3 varchar2(20) );
    create table test2 ( fld1 varchar2(20), fld2 integer, fld3 varchar2(20) );
    control file
    LOAD DATA
    INFILE "test.txt"
    INTO TABLE user.test1 TRUNCATE
    WHEN RECID = '1'
    FIELDS TERMINATED BY ' '
    recid filler integer external,
    fld1 char,
    fld2 integer external,
    fld3 char
    INTO TABLE user.test2 TRUNCATE
    WHEN RECID <> '1'
    FIELDS TERMINATED BY ' '
    recid filler position(1) integer external,
    fld1 char,
    fld2 integer external,
    fld3 char
    data for loading [text.txt]
    1 AAAAA 11111 IIIII
    2 BBBBB 22222 JJJJJ
    1 CCCCC 33333 KKKKK
    2 DDDDD 44444 LLLLL
    1 EEEEE 55555 MMMMM
    2 FFFFF 66666 NNNNN
    1 GGGGG 77777 OOOOO
    2 HHHHH 88888 PPPPP
    HTH
    RK

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • SQL Loader (Oracle 8.1.5 on Suse 6.3) Internal Error

    Hi all,
    I try to insert data with SQL Loader on Linux (Suse 6.3) and get the following message:
    SQL*Loader-704: Internal error: ulmtsyn: OCIStmtExecute (tabhp) [-1073747572]
    ORA-00942: table or view does not exist
    The control file and data file did work on another platform.
    Please help me!
    Thanks,
    Thies Mauker

    Lee Bennett (guest) wrote:
    :Hi
    :I have successfully installed Oracle 8.1.5 Enterprise edition
    on
    :Suse 6.2 and applied the 8.1.5.0.1 patch set,
    NO!
    SuSe 6.2 have a patch file for Oracle made from their developers.
    Never use Oracle 8.1.5.0.1 patch file that doesn't work because
    us bugged.
    Use SuSe 6.2 Oracle patch set.
    (don't remember the web page where you can download it but a
    search with word "oracle" from SuSe homepage will lead you to
    it)
    -Stefano
    null

  • Decode Not working in sql loader

    I had a requirement of loading flatfile into staging table using SQL Loader, One of the columns in the the Flat file is having values FALSE or TRUE and my requirement is that I load 0 for FALSE and 1 for TRUE which can be achieved by simple DECODE function...I did use decode and tried to load several times but did not work. What might be the problem
    LOAD DATA
    INFILE 'sql_4ODS.txt'
    BADFILE 'SQL_4ODS.badtxt'
    APPEND
    INTO TABLE members
    FIELDS TERMINATED BY "|"
    ( Person_ID,
    FNAME,
    LNAME,
    Contact,
    status "decode(:status, 'TRUE', '1','FALSE','0')"
    I did try putting a trim as well as SUBSTR but did not work....the cloumn just doent get any values in the output (just null or say free space)
    Any help would be great.....

    Hello user8937215.
    Please provide a create table statement and a sample of data file contents. I would expect DECODE or CASE to work based on the information provided.
    Cheers,
    Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.

  • SQL*Loader and DECODE function

    Hi All,
    I am loading data from data files into oracle tables and while loading the data using SQL*Loader, the following requirement needs to be fulfilled.
    1) If OQPR < 300, RB = $ 0-299, SC = "SC1"
    2) If 300 < OQPR < 1200, RB = $ 300-1199, SC = "SC2"
    3) If 1200 < OQPR < 3000, RB = $ 1200-2999, SC = "SC3"
    4) If OQPR > 3000 USD, RB = > $3000, SC = "SC4"
    Here OPQR is a field in the data file.
    Can anyone suggest how do we handle this using DECODE function? Triggers and PL/SQL functions are not to be used.
    TIA.
    Regards,
    Ravi.

    The following expression gives you different values for your different intervals and boundaries :
    SIGN(:OQPR - 300) + SIGN(:OQPR - 1200) + SIGN(:OQPR - 3000)

  • SQL Loader Inserts chr(13) and chr(10) in the first column of every row.

    Hi,
    I have exported a data in a pipe delimited file using TOAD in one database. Now I want to load the data in my local database using SQL Loader. However every time I try to load the data a double quote followed by a new line is entered for the first column of each row. Unfortunately the delimited file is very big and hence can't be posted here. However I tried the same with a customized table and its data and found the same problem. Below are the table structures and control file that I used.
    create table test_sql
    a varchar2(30),
    b date
    insert into test_sql values('51146263',sysdate-3);
    insert into test_sql values('51146261,sysdate-1);
    EXPORTED PIPE DELIMITED FILE_
    A|B|!##!
    51146261|04/14/13 4:55:18 PM|!##!
    51146263|04/12/13 4:55:32 PM|!##!
    create table test_sql1 as select * from test_sql where 1=2;
    CONTROL FILE_
    OPTIONS(SKIP=1)
    LOAD DATA
    INFILE 'C:\Users\Prithwish\Desktop\Test.txt' "str '!##!'"
    PRESERVE BLANKS
    INTO TABLE TEST_SQL1
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    A CHAR(2000),
    B DATE "MM/DD/YYYY HH12:MI:SS AM"
    select * from TEST_SQL1;
    After this when I paste it in notepad I get the following result
    A B
    51146261"     14-APR-0013 16:55:18
    51146263"     12-APR-0013 16:55:32.
    I have no idea how the quotes or the newline appear. Is this a Toad bug? Any help would be greatly appreciated. Really urgent.
    Thanks in advance
    Regards

    Hi Harry,
    I actually thought that the str !##! was causing the problem. Actually my original export has some new lines in some specific columns so I can't keep the new line as my line terminator and hence I kept the !##! as my terminator.
    When I put the same data in a notepad and load it there is no problem at all. For e.g I just typed the following in a notepad and the data loaded just fine.
    A|B|!##!
    51146261|01-01-01 10:10:10 AM|!##!
    51146263|01-01-01 11:11:11 AM|!##!
    Its just when I load the exported file there the problem arises though I have verified the file using UNIX as well using octal dump and found no hidden characters.
    Regards,
    Prithwish

Maybe you are looking for

  • Not gettting quantity displayed in the alv grid

    hi experts iam displaying vbeln, matnr, quantity, sellingprice etc for an customer using fieldcat. in alv grid. iam able to get all the fields other than quantity in the output. i have taken vbap-kwmeng, actually in the va03 it is displaying from kom

  • Ipod shuffle non responsive?

    I have this ipod 4th gen shuffle working perfecatly until I lost my charging/sync cable. took out my old 2nd gen ipod and use that cable to sync & charge, but when I plugged it to my computer it didnt show up? cant detect my ipod shuffle and its not

  • Duet workflow configeuration

    Hi, We have configured duet workflow & implement a simple test workflow to test the same. After executing the workflow and the scheduled programs we get the following error in slg1 : Exception of type CX_SY_REF_IS_INITIAL has occurred. See details fo

  • Workflow Monitor Error MSG

    When clicking on MONITOR buuton in Contract Authoring Workbench Form of Project Contracts, JSP error msg shows up. Error Page You have encountered an unexpected error. Please contact the System Administrator for assistance.

  • How do i download onto drive f. drive c memory if full

    I have no memory left on my hard drive (c). error says no disk space. I am now trying to download on the USB external in drive (F). everything i try to download keeps going to C. how do i download onto the USB, drive f.