Is this possible through sql loader

hi grus,
i want to load a data through sql loader but the problem is, data file contains some numeric values and after each numeric value there is sign character,
for example
position 1 to 9 = 12345678- (in case of negative)
or
position 1 to 9 = 12345678% (% represents blank space in case of positive)
is there any way to load this numeric value into one field, where the sign follow the numeric value?
Thanks

Hi Jim/Jenis
Just want to know why the below statement dosn't work.
when i used "MI" format then all the records which trailing blank rejected by the loader only trailing "-" loaded.
CURR_MON_OPEN_BAL      position(0045:0053) "to_number(:CURR_MON_OPEN_BAL, '99999999MI')"
then i use the following trick and works fine.
CURR_MON_OPEN_BAL      position(0045:0053) "to_number(rpad(:CURR_MON_OPEN_BAL,9,'+', '99999999S')"
Could you guys explain why the MI format doesn't work in my case?

Similar Messages

  • Is this possible through SQL

    Hi,
    Please find below the sample data
    Empl   Start Date   End Date
    A       2-JUN-11     30-JUN-11
    A       1-JUL-11      15-JUL-11
    A       16-JUL-11    NULL
    B       14-SEP-06   3-NOV-09
    B       10-APR-11   4-MAY-11
    B       5-MAY-11    NULLThe above is a sample extract from an employee detail table. Whenever there is a change in the employee data the active row in the table is end dated and a new row inserted with the new start date.
    In the above example employee A joined the organization on 2n June 2011 and is still employed by the organization, and moved teams twice. While B had joined in 14 September 2006, quit the organization on 3rd November 2009, and rejoined the org on 10th April 2011.
    Now, I want to frame a SQL query which returns employee name and his latest joining date. So for the above sample data the result set would be:
    Empl Start Date
    A     2-JUN-11
    B     50-APR-11Do you think this is possible through an SQL query?
    Thanks,
    CJM

    You were right the filter was wrong. I made a correction to my first post.
    A       2-JUN-11    30-JUN-11     0
    A       1-JUL-11    15-JUL-11     1
    A       16-JUL-11   NULL          1
    B       14-SEP-06   3-NOV-09      0
    B       10-APR-11   4-MAY-11    584
    B       5-MAY-11    NULL          1outer query
    A       2-JUN-11    30-JUN-11     0   /* max value */
    B       14-SEP-06   3-NOV-09      0
    B       10-APR-11   4-MAY-11    584   /* max value */Regards
    Etbin

  • Importing oracle.sql.BLOB through SQL Loader

    Hello,
    Currently the system we have creates .sql files and executes them. This takes a long time, so we're attempting to change to using SQL Loader. The one problem I'm having that I can't seem to fix is finding out how to imitate the behavior of this SQL statement through SQL Loader:
    INSERT INTO KRSB_QRTZ_BLOB_TRIGGERS (BLOB_DATA,TRIGGER_GROUP,TRIGGER_NAME)
    VALUES (oracle.sql.BLOB@515263,'KCB-Delivery','PeriodicMessageProcessingTrigger')
    I tried creating a lobfile and placing the text oracle.sql.BLOB@515263 within it this way
    INTO TABLE KRSB_QRTZ_BLOB_TRIGGERS
    WHEN tablename = 'KRSB_QRTZ_BLOB_TRIGGERS'
    FIELDS TERMINATED BY ',' ENCLOSED BY '##'
    TRAILING NULLCOLS
    tablename FILLER POSITION(1),
    TRIGGER_NAME CHAR(80),
    TRIGGER_GROUP CHAR(80),
    ext_fname FILLER,
    BLOB_DATA LOBFILE(ext_fname) TERMINATED BY EOF
    However, as expected, it merely loaded the text "oracle.sql.BLOB@515263" into the database. So does anyone have any ideas of how to imitate that insert statement through SQL Loader? The only information I have available is the string "oracle.sql.BLOB@515263", no other files or anything to aid with actually getting the binary data.
    When the .sql file is run with that insert statement in it, a 1.2kb BLOB is inserted into the database versus a 22 byte BLOB that contains nothing useful when done through SQL Loader.
    Alex

    My preference is DBMS_LOB.LOADFROMFILE
    http://www.morganslibrary.org/reference/dbms_lob.html
    did you try it?

  • Defaulting org id value into a table through SQL Loader program

    Hi ,
    We have a requirement that we need to load some data from flat file to a table.we are using sql loader to do that. so far no problem but now the requirement is that we need to populate the org id from which we are running the program.
    I tried fnd_profile.value('ORG_ID') and it is populating site level org id.
    Coudl any one please help me how to default org id or request id into a table through sql loader program.
    Thanks,
    Y

    user12001627 wrote:
    Hi Srini,
    Thanks for looking into this!!
    We are on EBS 11.5.10 and OS is solaris.
    I tried fnd_profile,fnd_global but no luck.
    Here is the control file which we are using to load data.
    load data
    infile *
    replace into table XXXX_YYYY_STAG
    trailing nullcols
    (line POSITION(1:2000)
    I would like to populate org id when I load the data from file.unfortunately there is no identifier in the file that says for which org id the data is in the file.Only the way to identify the file org is based on file name
    Where do you want to populate the ORG_ID ? There is no column for it in your stage table above
    Is there way we can pass through concurrent program parameters?
    Thanks
    YHTH
    Srini

  • Check data before loading through SQL *Loader

    Hi all,
    I have a temp table which is loaded through SQL*Loader.This table is used by a procedure for inserting data into another table.
    I get error of 0RA-01722 frequently during procdures execution.
    I have decided to check for the error data through the control file itself.
    I have few doubts about SQL Loader.
    Will a record containing character data for column declared as INTEGER EXTERNAL in ctrl file get discarded?
    Does declaring column as INTERGER EXTERNAL take care of NULL values?
    Does a whole record gets discarded if one of the column data is misplaced in the record in input file?
    Control File is of following format:
    LOAD DATA
    APPEND INTO TABLE Temp
    FIELDS TERMINATED BY "|" optionally enclosed by "'"
    trailing nullcols
    FILEDATE DATE 'DD/MM/YYYY',
    ACC_NUM INTEGER EXTERNAL,
    REC_TYPE ,
    LOGO , (Data:Numeric Declared:VARCHAR)
    CARD_NUM INTEGER EXTERNAL,
    ACTION_DATE DATE 'DD/MM/YYYY',
    EFFECTIVE_DATE DATE 'DD/MM/YYYY',
    ACTION_AMOUNT , (Data:Numeric Declared:NUMBER)
    ACTION_STORE , (Data:Numeric Declared:VARCHAR)
    ACTION_AUTH_NUM ,
    ACTION_SKU_NUM ,
    ACTION_CASE_NUM )
    What changes do I need to make in this file regarding above questions?

    Is there any online document for this?<br>
    Here it is

  • How can we transfer product attributes from an already existing site?  We have thousands of items and it would be tedious to do them one at a time.  Is this possible through a CSV?

    How can we transfer product attributes from an already existing site?  We have thousands of items and it would be tedious to do them one at a time.  Is this possible through a CSV?

    There are two parts to this:
    1) It may be that you should have an Apple Education Support person helping you with this. If you have enough computers for this to be a problem, you may benefit from a Server, a site license, and an occasional visit from an Education Support Specialist.
    2) The brief answer, if you want Individual Apple_IDs to control each computer, is to buy new copies of Mac OS X under those new Apple_IDs and re-download and re-Install. Mac OS X is customized to the Apple_ID before it is downloaded.

  • How can I load this XML with sql loader ?

    Hi,
    Im try to load a XML file into a XML table:
    Create table TEST of XMLTYPE;
    XML file is something like this:
    <!DOCTYPE list SYSTEM "myfile.dtd">
    <list>
    <item id = 1> lot of tags an info here </item>
    <item id = 9000> lot of tags an info here </item>
    </list>
    I dont know how to exactly create an appropriate control file to my XML. All examples I saw in documentation are similar to this one:
    this is an example control file
    LOAD DATA
    INFILE *
    INTO TABLE test
    APPEND
    XMLTYPE (xmldata)
    FIELDS
    I dont know how to complete this control file. Can anyone help me ?
    thank you!
    Message was edited by:
    pollopolea

    Well I found this working code
    LOAD DATA
    INFILE *
    INTO TABLE test APPEND
    xmltype(xmldata)
    FIELDS
    ext_fname filler char(30),
    xmldata LOBFILE (ext_fname) TERMINATED BY EOF
    BEGINDATA
    mifile.xml
    mifile2.xml
    mifile3.xml
    the main diference I found is that when i use:
    Insert into test values (XMLType(bfilename('XMLDIR', 'swd_uC000025127.xml'),nls_charset_id('AL32UTF8')));
    tag <!DOCTYPE list SYSTEM "myfile.dtd"> is expanded
    (I explain at DTD insertion and errors with long DTD entities
    Now using sql loader the tag is not modified.
    I dont know if is there any difference, between each case. did I lost performance?
    Message was edited by:
    pollopolea

  • Is this possible via SQL or not ?

    Hi There
    I have a scenario. Am not sure if this is possible via SQL or not.
    For Example Consider two tables
    T1
    product_id location_id stock
    A 1 100
    T2
    product_id location_id aging_phase received_qty
    A 1 1 20
    A 1 2 30
    A 1 3 70
    Now in T1 there is actual stock that is 100, while aging wise if i see stock that is 20+30+70=120
    What i want is, generate a SQL that should yield quantity equals stock in T1 but with AGING PHASE wise break up
    Result should be like this :
    product_id location_id aging_phase qty
    A 1 1 20
    A 1 2 30
    A 1 3 50
    It would be a great help if somehow it becomes possible. Anyone have some solution ?
    Regards
    Capri

    Capri wrote:
    May i have your email id please so that i can describe my problem in detail ?As Billy mentioned I would prefer not to do this. However, you can explain your problem here in detail. Please provide the following information:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements
    3. Expected output.
    4. The business logic to achieve the expected output.
    5. Please use \ tags to surround #2 and #3.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Extracting Multiple Logical Records through sql loader

    Hello gurus,
    I have few questions regarding the sql loader. I m totally new to this i have never used, this is the first time i m using
    1.
    How do i find the position number of the charcter or a number ? do i need to physically count the position ? is ther any specific way of counting or use textpad to do that ?
    I know it sounds like silly question... but i wanted to know if there is any better way of doing it
    2.
    example data
    1119 Smith      1120 Yvonne
    1121 Albert     1130 Thomas
    The following control file extracts the logical records:
    INTO TABLE emp
         (empno POSITION(1:4)  INTEGER EXTERNAL,
          ename POSITION(6:15) CHAR)
    INTO TABLE emp
         (empno POSITION(17:20) INTEGER EXTERNAL,
          ename POSITION(21:30) CHAR)---
    2. Can you please expalin me what does the "null if deptno = blanks " ?
    deptno POSITION(1:2)  INTEGER EXTERNAL(2)
                  NULLIF deptno=BLANKS,I really appriciate it ~
    Thanks

    Hi,
    The NULLIF means load blanks as NULL
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#sthref1129
    Not sure I understand your first question. You must of course know the format of the file, TextPad could be an ok tool for determining that format for a fixed column width file.
    Regards
    Peter

  • Hierarchy Report - is this possible through Crystal Report???

    Hello friends
    We have a requirment as follow:
    In Row : Hierarchy
    In Column: Qty
    we have 3 levels of hierarchy: level1 , level2 and level3
    we want level1 in row and rest two levels in column along with qty
    Row: :Level1
    Col: Level2, Level3, Qty
    please let me know whether its possible through Crystal Report or not,,,I tried out this in BEx (BW) but we cant do that

    Hi Aloke,
    This is possible,
    Create a group on Level1
    In Detail place Lavel2 ,Level3,Qty
    You may insert totals if required.
    Thanks,
    Sastry

  • Hierarchy Report - is this possible through BO???

    Hello friends
    We have a requirment as follow:
    In Row : Hierarchy
    In Column: Qty
    we have 3 levels of hierarchy: level1 , level2 and level3
    we want level1 in row and rest two levels in column along with qty
    Row: :Level1
    Col: Level2, Level3, Qty
    please let me know whether its possible through BO or not,,,I tried out this in BEx (BW) but we cant do that
    Edited by: Alok Kashyap on Feb 2, 2009 9:03 AM

    Hi Alok,
    As I understand you want to set different levels of hierarchies for different Columns objects in the report.
    BO doesnu2019t have the concept of Row and Column Level Hierarchy because when you select any value BO Select all values in column we canu2019t refer any single value in column and we canu2019t refer all related values as record thus Row level hierarchy is not possible.
    You can use Custom Hierarchies to set different hierarchies for different objects.
    Lets Say you Want Object in  Column A to follow Level 1 include that object in Level1 Hierarchy.
    Define Level 2, Level 3 Hierarchy and Include Object in Column 2 in those hierarchies thus Column 2 follows Level 2 and Level 3 Hierarchy.
    When there is confusion about which Hierarchy Level  to follow when at same level it asks user which way to go.
    I Hope this Helpsu2026
    Thanksu2026
    Pratik

  • Loading through sql* loader

    Hi,
    I want to load xml file data using sql*loader into Oracle.
    Kindly advice what could be the pros & cons for this.
    Is there any online document for this?
    Thanks
    Deepak

    Is there any online document for this?<br>
    Here it is

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

  • Is this Possible through a query?

    Hi All,
    i am calling this function in an update statement.
    this function queries a table based on the conditions and will return the latest(max) date from table.
    Is it possible to achieve this in a query?
    CREATE OR REPLACE Function getmaxdate(pRLK_RK number,
    pLN_RK number,pRLK_ACT_FLG varchar) Return date Is
    vnum number(3);
    pmaxdate date;
    Begin
    select (Trunc(RLOCK_END_DT) - Trunc(RLOCK_EXT_END_DT)) into vnum from rate_tab
    where RLK_RK=pRLK_RK
    and LN_RK=pLN_RK
    and RLK_ACTIVE_FLG=pRLK_ACT_FLG;
    dbms_output.put_line('Value of vnum'||vnum);
    If vnum < 0 then
         select RLOCK_EXT_END_DT into pmaxdate from rate_tab
         where RLK_RK=pRLK_RK
         and LN_RK=pLN_RK
         and RLK_ACTIVE_FLG=pRLK_ACT_FLG;
    elsif vnum > 0 then
         select RLOCK_END_DT into pmaxdate from rate_tab
         where RLK_RK=pRLK_RK
         and LN_RK=pLN_RK
         and RLK_ACTIVE_FLG=pRLK_ACT_FLG;
         --return pmaxdate;     
    End If;
    return pmaxdate;
    dbms_output.put_line('Value of pmaxdate'||pmaxdate);
    End;
    Any suggestions?
    Thanks.

    may be this
    select (case when (Trunc(RLOCK_END_DT) - Trunc(RLOCK_EXT_END_DT)) <0 then
                      RLOCK_EXT_END_DT
              when    (Trunc(RLOCK_END_DT) - Trunc(RLOCK_EXT_END_DT))> 0 then
                    RLOCK_END_DT
              end) max_date       
    from rate_tab
    where RLK_RK=pRLK_RK
         and LN_RK=pLN_RK
         and RLK_ACTIVE_FLG=pRLK_ACT_FLG;

  • Unable to load clob data through sql loader

    Hi Experts ,
    My ctl file is :
    LOAD DATA infile '$di_top/conversion/devtrack_notes.csv'
    truncate into table xxdi_proj
    fields terminated by ','
    optionally enclosed by '"'
    trailing nullcols (bugid,note *clob*)
    {code}
    The problem is note column is a clob and one of the
    values has line breaks like this :
    {code}
    Hi Sir,
    Would you please inform when the reports are scheduled for automatic process?
    Maria will stop his process to avoid duplication.
    Please inform asap
    With Regards ,
    Ronaldinho
    {code}
    When the data gets loaded ,
    The first column gets the sentence 'Would you please inform.....' i.e . the data of second columns gets loaded into first column as nulls are recognized as end delimiter.
    How to overcome this problem?
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Pl post your exact OS and database versions, along with your complete sqlldr command, the table description and a sample of your input csv file.
    HTH
    Srini

Maybe you are looking for

  • Font Problem In the Script.

    Hi, I used Times New Roman Font to Define Paragraph formats in the Scritps. And It is woriking in the Development fine. When we trasnported to the Quality the Font Properties and alignments are changing. What is the Problem ? Can any one Suggest me 

  • My top charts in my App Store will not show any game etc

    I cannot get my categories and the top chart to work in my App Store.  I have a iPad new.

  • OID - OperationalNotSupportedException: [LDAP: error code 53 - Server ... ]

    Hi, I'm using JNDI (Java Native Directory Interface) accessing OID, and I received a javax.naming.OperationalNotSupportedException: [LDAP: error code 53 - Server currently in read only mode.  Update operations not allowed]; I am not sure what's wrong

  • WHEN I SCAN TO PDF THE FILE COMES OUT HUGE!!

    HELLO EVERYONE!   WHENEVER I SCAN SOME DOCUMENTS INTO A PDF FILE, IT COMES OUT HUGE!  AROUND 25MB.  I WENT TO KINKOS AND HAD THE SAME FILE SCANNED AND IT WAS AROUND 110KB. IS THIS A PROBLEM WITH MY SCANNER? I CURRENTLY USE A DELL 962 ALL-IN-ONE. ANY

  • Change pdf export to landscape

    Hi, I have a document created by somebody else that I need the entire document to export pdf in landscape. The first and last page are exporting to portriate. I'm stumped how to get the entire document to be landscape. 50+ pages and I'm having troubl