How to display output of SQL Loader in a readable format

Hi All,
We have an inbound interface wherein we are uploading data from a flat file to Oracle Applications.
The entire process is happening in a request set -
1. Loading from flat file to staging tables via SQL Loader
2. Validating Data in staging tables
3. Uploading in Oracle standard tables
User says that the log file which shows the output of SQL Loader (step 1) is not readable and they want the data in some particular format which is understandable/readable for them.
Firstly, help me understand is it possible.
Also I have heard about BAD file, can anyone tell me where is it created and by what name and can we fetch that file created ?
Any pointers would be really helpful.
Regards,
Shruti

Hi
DATA :
  w_i TYPE i VALUE 1,
  w_temp TYPE i VALUE 1..
WHILE w_temp LE 10.
  w_i = 1.
  WHILE w_i LE w_temp.
    WRITE :
      w_i.
    ADD 1 TO w_i.
  ENDWHILE.
  SKIP.
  ADD 1 TO w_temp.
ENDWHILE.
Regards
Pavan

Similar Messages

  • How Can I Run a SQL Loader Job from Schedular

    How Can I Run a SQL Loader Job from Schedular , So that It Runs every Day.

    Depends on a couple of factors.
    If you are on a UNIX platform, you can create a shell script and schedule it with cron.
    If you are on a Windows platform, you can create a batch file and schedule it with the Windows scheduler.
    Or, if you are on Oracle 9i or 10g, you could use the external table feature instead of SQL*Loader. Then you could write a stored procedure to process the external table and schedule it using the Oracle scheduler (DBMS_JOB). This would probably be my preference.

  • How to use SQL loader with DBF fixed format record

    Hi everybody!
    My situation is that: I want to use SQL loader with Foxpro DBF format, it similar to case 2 study (Fixed format record) but DBF file has header, how can I tell SQL loader skip header.
    Thank you in advance

    Another option is to apply SQL operators to fields
    LOAD DATA
       INFILE *
       APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' (
       empno,
       ename,
       job,
       mgr,
       hiredate DATE(20) "DD-Month-YYYY",
       sal,
       comm,
       deptno CHAR TERMINATED BY ':',
       projno,
    loadseq "my_seq.nextval")This is a modified control file of Case Study 3 which originally demonstrated the use of the Sequence parameter

  • The output of sql loader displays '?' for the chinese character

    I'm run the sql loader to import the data. The following is the ctl script:
    LOAD DATA
    CHARACTERSET ZHS16CGB231280
    APPEND
    INTO TABLE xxabc_gti_feedback
    when (5:6) ='~~' and (8:9)='~~'
    FIELDS TERMINATED BY "~~"
    TRAILING NULLCOLS
    absoluted
    ,exist_lists
    ,invoice_type
    ,invoice_category_code
    ,invoice_number
    ,line_count
    ,invoice_date DATE "YYYYMMDD"
    ,invoice_month
    ,trx_number
    ,amount_without_tax
    ,tax_rate
    ,tax_amount
    ,gti_feedback_id "xxban_gti_feedback_s.nextval"
    ,creation_date sysdate
    ,last_update_date sysdate
    EBS version: R12(12.0.4)
    The characterset of database is UTF-8
    The file characterset is GB2312
    The following is the example of data file.
    SJJK0201~~已开发票传出
    39~~20110413~~20110413
    //发票1
    0~~0~~0~~325676740~~11085979~~3~~20110413~~04~~~~3336.71~~0.17~~567.24~~珠海XX机电设备有限公司~~440407897878~~珠海市香洲区XXX 0756-3666666~~建行前山支行777777~~XX电子(苏州)有限公司~~32170078678890~~苏州工业园区 6267565~~中国银行园区支行25456672~~1653\n31263\n67126~~XXX~~XXX~~XXX
    0~~aaa~~P83782~~个~~2~~6854.70~~0.17~~1165.30~~4010~~1~~1601
    1~~bbb~~~~~~~~-4065.00~~0.17~~-691.05~~~~1~~1601
    0~~ccc~~P80792~~个~~4~~547.01~~0.17~~92.99~~160~~1~~1601
    I create a sql*loader concurrent program to load the data. the data can be loaded into the table successfully(The chinese customer name is correct). Only for the aborted lines, it will be listed in the outtput of the concurrent request, but out of my expect, the chinese characters in the output are displayed as '?'.
    How to solve the issue? Thanks.
    Edited by: 852938 on 2011-4-17 下午10:41

    like the following:
    SJJK0201~~??????????
    39~~20110413~~20110413
    //???1
    0~~aaa~~P83782~~??~~2~~6854.70~~0.17~~1165.30~~4010~~1~~1601
    1~~bbb~~~~~~~~-4065.00~~0.17~~-691.05~~~~1~~1601
    0~~ccc~~P80792~~??~~4~~547.01~~0.17~~92.99~~160~~1~~1601
    You can find that any chinese characters are became '?'. The loaded line(Line 4th) is not listed in the output.
    Thanks for your quick answer! :)

  • SPOOL - how to display output list of more then 255 characters?

    Hi,
    First of all, I would like to say hi to all of you here, as a new member :)!
    I've just discovered this forum - I'm very new and let's say unexperienced in SAP, unlike you :)!
    Didn't know where to put my subject (in what folder) so I apologize in advance if I'm mistaken... I work as an ABAP programmer in SAP Core and SAP IS-T and currently I'm worried about this problem:(!
    We have these huge reports in IS-T that have to be run in background, because of lot of data. Most of reports are very wide and don't fit in those 255 characters that is SAP standard for spool display. Now I'm dealing with this RFC that has to provide spool display with 800 characters, and this has to be on production by tomorrow:)!!!!!
    First I created new format type (ZX_65_800) in transaction SPAD and assigned it to my local printer. I thought this would be enough, but I was wrong. Because when I try to run my programe in background, the system doesn't offer me my format at all :(!
    Is there anything else I must do in order to get it.... (I work in Release 620)
    If anyone had the same problem, please contact me!
    Thanks,
    BR,
    Sanja

    Hi All,
    We have been looking for a solution for what I believe is the same problem, for more than 2 years now. I would just like to verify with you, if your requirement are similar to ours.
    Problem:
    1.     Requirement is to run large HR reports – either standard or with Ad Hoc Query in background mode in a company with more than 50,000 employees.
    2.     Nobody wants printed reports these days.  We want to save the forests. Customers prefer to be emailed an Excel file so they can do further data analysis, filtering, pivot tables etc.
    3.     Reports are running OK in foreground for smaller sections of the organisation, where you send the output to Excel from ALV, or save as a local file in spreadsheet format.
    4.     But large reports for entire company are awkward, tie up your PCs resources, and complex reports accessing many tables can timeout before completion.
    5.     So scheduling these reports to run in background would be the ideal solution.
    6.     However when we access the report output from SP02, we find that most reports (say with more than 13 or so fields) have an output wider than 255 characters and the output of the spool file wraps to the next line in Excel.  It is very tricky to then parse the data back into one row for each employee.  And you have a problem if you output is for 50,000 or so employees, because then you file is 100,000 rows and will not load completely into Excel – limit problem of 65,536 characters.
    7.     We simply want a spool file that does not wrap the data to the next line after 255 characters.
    8.     But how to explain this simple requirement to some technical people. It seems a lot of posts on SDN think we always want to print a spool file.  NO – remember the forests!
    Possible Solutions:
    I see a lot of posts here that refer to OSS note 186603, but they don’t mention the target for the output of the spool is to import into an Excel File (i.e. spreadsheet format).  Just search for 186603 or ” Spool request with more than 255 columns”.  There is also a reference to OSS note 313566.  I am not sure if these will work?
    I have also seen the suggestions that you need to define a customer printer format that does not wrap the output after 255 characters (create a new format type in transaction SPAD).
    Did you find a solution yet to this problem, do the solutions above work, or can anyone else help us!
    John McKee

  • 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

  • How to do it with SQL Loader

    All,
    I have two tables HEADER_TABLE and LINE_TABLE. Each header record can have multiple line records. I have to load data from a flat file to these tables.Flat file can have two types of records. H-Header, L-Line. It looks as follows.. Each H record can have multiple corresponding L records
    H..........
    L.......
    L......
    L......
    H.........
    L.......
    L......
    L......
    I have HEADER_ID column in HEADER_TABLE and HEADER_ID, LINE_ID columns in the LINE_TABLE.
    While loading data using SQL Loader, I need to generate HEADER_ID and LINE_ID values as follows and load them.
    H..........<HEADER_ID = 1>
    L....... <HEADER_ID = 1><LINE_ID = 1>
    L...... <HEADER_ID = 1><LINE_ID = 2>
    L...... <HEADER_ID = 1><LINE_ID = 3>
    H......... <HEADER_ID = 2>
    L....... <HEADER_ID = 2><LINE_ID = 4>
    L...... <HEADER_ID = 2><LINE_ID = 5>
    L...... <HEADER_ID = 2><LINE_ID = 6>
    Is it possible to do this with SQL LODER?
    I tried to do this with sequences. But it loaded the tables as follows.
    H..........<HEADER_ID = 1>
    L....... <HEADER_ID = 1><LINE_ID = 1>
    L...... <HEADER_ID = 1><LINE_ID = 2>
    L...... <HEADER_ID = 1><LINE_ID = 3>
    H......... <HEADER_ID = 2>
    L....... <HEADER_ID = 1><LINE_ID = 4>
    L...... <HEADER_ID = 1><LINE_ID = 5>
    L...... <HEADER_ID = 1><LINE_ID = 6>
    Thanks
    Ketha

    Morgan,
    Examples given in the link are quite generic and I have tried them. But my requirement is focused on generating header_id and line_id values as i have described. It seems that SQLLDR scans all records for a particular WHEN clause and insert them into the specified table. I think that if SQLLDR is made to read recod in the data file sequentially, this can be done.
    ANy idea of how to make SQLLDR read the records from the file sequentially?
    Thanks
    Ketha

  • How to display output parameters in storedprocedures in front end?

    hi all ,thank you for all the support.
    Now i want your help .Here below i have given the general format of stored procedure we are using in our application . In procedure we are catching the exception and assigning to an output variable P_STATUS .
    If any exception occurs ,How we display this caught exception from front end that means how we display the exception in front end .We are using VB.NET and VS 2005 and Oracle 9i for development.
    CREATE OR REPLACE PROCEDURE SELECTINTERVALS
    P_MINVAL INTEGER,
    P_MAXVAL INTEGER,
    P_INTERVAL     INTEGER,
    P_USERID VARCHAR2,
    P_STATUS OUT VARCHAR2
    AS
    BEGIN
              SELECT STATEMENT or INSERT STATEMENT     
    EXCEPTION
              WHEN OTHERS THEN
              ROLLBACK;
              P_STATUS:=SQLERRM;
    END;
    If anybody knows, please help me
    thanks & regards

    Both methods are wrong. Returning error/exit codes for the reasons I've stated above.
    As for handling the exception... If you want to propagate the exception, then DO NOT CHANGE IT INTO A MEANINGLESS USER EXCEPTION!
    This is useless:
    WHEN OTHERS THEN
    ROLLBACK;
    P_STATUS:=SQLERRM;
    RAISE_APPLICATION_ERROR(-20011, SQLERRM);
    Why it is meaningless? Because the caller now has to parse the error message to determine just what the actual root exception was... as the root exception number has been replaced with a meaningless number.
    This is meaningful and (almost) correct:
    [pre]
    when OTHERS then
    rollback;
    raise; -- re-raise the exception
    PS. It makes better sense to trap the actual exception like no data found, duplicate PK violations, etc... it seldom makes sense to trap all other exceptions and then do something like a rollback.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can I only install Sql loader tools in my compupter?

    Hi all,
    I don't have sql loader in my computer and I just want to install sql loader in my computer without affect my computer's setting (oracle),how can I do this?
    Thanks

    Install Oracle Client in another Oracle Home.

  • How to display output without fieldnames in write statements

    hi,
    can any one tell how to get output with all fields values of a table without writing fieldnames in write statement.
    giv proper code for this task.Thaks in advance.

    hiii
    if you want to write just values then you can use write statement only ..no need to do anything else.simply write as follows
    LOOP AT t_customer INTO fs_customer.
      WRITE:/ fs_customer-customer_no,
              fs_customer-customer_name,
              fs_customer-customer_amount.
    ENDLOOP
    reward if useful
    thx
    twinkal

  • How to display output only sort format in alv

    Hi Experts,
    I have one problem in alv output display. I'm developing alv report for orders raised during the period.I want to display each order wise value(netwr) and order quatity (kwmeng) . i set 8 radio buttons one radio btn click then i want output ex.in grid display click on sort then each order wise calculate the value and quantity . that particular data to display when click on radio button.
    ex:click on sort in grid display.
    (branch) (order no)     (quantity)   (value)                        (BSTNK)
    AMUM     0000003354     2             10                                    3,271
    AMUM     0000003354     1              10                                    6,542
                                                       (above qty sum 2+1=3)  
    (SUM) =   AMUM       0000003354            3                       20            9,813
    HIP2         0000003362     2           5     17,810
    HIP2             0000003362     1          5     23,075
    (sum) = HIP2          0000003362                 10           40,885
    i display output in alv griddisplay.client asking one rb put in selection screen i want output like above only sum col.
    when i click one radio button output is come like (sum) above.
    Please help me.
    Thanks & Regards,
    Balakrishna Gajula

    hi you need to use sortinfo for your requirement.
    ie see the below code.
    "declare sortinfo at data declaration
    data:   wa_sort     type slis_sortinfo_alv,      "''' add this
                layout      type slis_layout_alv.          "add this
    ""make the below changes in your fieldcat
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'Td - Rvdt'.
      wa_fieldcat-fieldname = 'QUANTITY'.
      wa_fieldcat-do_sum    = 'X'.          """"""add this to your  *QUANTITY field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname   = 'FINAL'.
      wa_fieldcat-seltext_m = 'temp''.
      wa_fieldcat-fieldname = 'VALUE'.
      wa_fieldcat-do_sum    = 'X'.             """"""add this to your  *VALUE field*
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    """"" you need to add this after workarea of fieldcat
      wa_sort-fieldname =  'BRANCH'.  " Here Branch indicates the fieldname
      wa_sort-subtot    = 'X'.
      append wa_sort to it_sort.
      clear wa_sort.
      wa_sort-fieldname = 'ORDERNO'.
      append wa_sort to it_sort.
      clear wa_sort.
    " in your alv fm add sortinfo
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-cprog
          is_layout          = layout
          it_fieldcat        = it_fieldcat
          it_sort            = it_sort                   """""""""add this
        tables
          t_outtab           = final                   " your internal table name
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    This solves your purpose.
    Regards,
    koolspy.

  • How to Import data via SQL Loader with characterset  UTF16 little endian?

    Hello,
    I'm importing data from text file into one of my table which contains blob column.
    I've specified following in my control file.
    -----Control file-------
    LOAD DATA
    CHARACTERSET UTF16
    BYTEORDER LITTLE
    INFILE './DataFiles/Data.txt'
    BADFILE './Logs/Data.bad'
    INTO TABLE temp_blob truncate
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    (GROUP_BLOB,CODE)
    Problem:
    SQL Loader always importing data via big endian. Is there any method available using which we can convert these data to little endian?
    Thanks

    A new preference has been added to customize the import delimiter in main code line. This should be available as part of future release.

  • How to display output with 5min & 10min averages?

    Hi I’ve Data Like below in SqlServer Table
    DateTimeMin
    Field
    Value
    2014-10-09 11:01:00
    some
    1
    2014-10-09 11:02:00
    some
    2
    2014-10-09 11:03:00
    some
    3
    2014-10-09 11:04:00
    some
    4
    2014-10-09 11:05:00
    some
    5
    2014-10-09 11:06:00
    some
    6
    2014-10-09 11:07:00
    some
    7
    2014-10-09 11:08:00
    some
    8
    2014-10-09 11:09:00
    some
    9
    2014-10-09 11:10:00
    some
    10
    If I Run a query, I need Output like below (5 minute average)
    DateTimeMin
    Field
    Value
    2014-10-09 11:05:00
    some
    3
    2014-10-09 11:10:00
    some
    8
    If it’s 10 minute average, I need output like below
    DateTimeMin
    Field
    Value
    2014-10-09 11:10:00
    some
    5.5
    at where clause, I've to use  DateTimeMin between
    2014-10-09 11:01:00 and 2014-10-09 11:10:00
    Please advise, how?

    Hi Visakh
    at present I'm getting output like below
    ID
    DateTimeMin
    Value
    1
    2014-10-09 11:05:00
    3
    2
    2014-10-09 11:10:00
    8
    How to get output like below(I need to add the Field Column)
    ID
    DateTimeMin
    Field
    Value
    1
    2014-10-09 11:05:00
    some
    3
    2
    2014-10-09 11:10:00
    some
    8
    I tried several ways, but unable to get it(The Field Data is same from min 1 to 10)

  • How can I invoke a sql loader from oracle form?

    I'm got a problem on invoking sql loader command from oracle form where the sql loader product has been installed in Window NT.
    Thanks for your help!

    U can use HOST procedure with NO_SCREEN option.
    this will go like
    Host('d:\orant\bin\SQLLDR80 USERID=username/password@connect CONTROL=contril_file.CTL LOG=log_file.LOG discard=discard_file.dis bad=bad_file.bad', NO_SCREEN);
    Hope this will Work
    Good Luck :-)
    Naren

  • Problem with SQL*Loader and different date formats in the same file

    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    System: AIX 5.3.0.0
    Hello,
    I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
    ...;2010-12-31;22/11/1932;...
    I load this data using the following lines in the control file:
    EXECUTIONDATE1     TIMESTAMP     NULLIF EXECUTIONDATE1=BLANKS     "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
    DELDOB          TIMESTAMP     NULLIF DELDOB=BLANKS          "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
    The relevant NLS parameters:
    NLS_LANGUAGE=FRENCH
    NLS_DATE_FORMAT=DD/MM/RR
    NLS_DATE_LANGUAGE=FRENCH
    If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
    How can I get both date values to load correctly?
    Thanks!
    Sylvain

    This is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(

Maybe you are looking for

  • I'd like to stay with HP, but this GPU issue is a deal breaker

    I have an HP Pavilion p7-1267 with a Thermaltake 600w PSU and I'm installing a Radeon R9-270x-cdfr.  I cannot even boot up the computer.  I'm running windows 7 home premium 64bit and I have the new driver update for my BIOS.  The only guides that I'v

  • Using select list value as column name in SQL

    Folks, Thanks in advance for any help with this I have a select list with two values (Instance and Username) created by STATIC2:Username;USERNAME,Instance;INSTANCE I am trying to pass the value of this (:P2_SELECT) and use it as a column name in a SQ

  • Image pixelates when published

    Hey - Rather new to all this, but I'm trying to cut out a circular logo sent to me in a pdf, shrink it, and put it on my web page. now, i can do all this, but when i put the image on the page with dreamweaver, there is a definite loss of quality. I'v

  • Regional settings and currency

    All the way from 10.0, to 10.2 (even 10.2.1 so far as I know), have shown the following text: "The region settings are used to adapt date format, default currency and number format." The only way I can explain this is the '$' key on your keyboard sho

  • Cannot Lauch PS Touch - Licence Check Failed

    ive just installed this from my google play account and everytime I attempt to launch a tutorial or create a new file I get the above error message. Ive looked at some previous posts to find an answer to my problem and have not had any success so far