Need to Skip the fields duaring the data upload by SQL*Loader.

Hi all,
I am not able to get how to skip some fileds in the file while uploading it thru SQL*Loader. Let us have a look the below scenario.
The table has 4 columns. but in the input file came up with 6 fields. Let us assume the four fields came as first in the order. Then, we can populate the data into the 4 columns of the table. At the same time we want to skip the remaining fields. Even those fields/columns are no longer available in the database table.
For example:
create table data_temp(sno number,name varchar2(10 char),sex char(1),loc varchar2(20 char));
Data file
sno,name,sex,loc,organization,contact
1,ram,M,India,HP,998976789
2,Shesha,M,India,IBM,7890808098
Control_file
OPTIONS(SKIP=1)
LOAD DATA
INFILE *
APPEND INTO TABLE data_temp
FIELDS TERMINATED BY ',' optionally enclosed by '"'
TRAILING NULLCOLS
sno "trim(:sno)",
name "SUBSTR(trim(:name),1,20)" ,
sex "SUBSTR(trim(:sex),1,1)",
loc "SUBSTR(trim(:loc),1,20)" ,
Please suggest me how to implement the above scenario in the control file.
Thanks in Advance!!
Regards,
Vissu.....

Use FILLER. Control file:
OPTIONS(SKIP=1)
LOAD DATA
INFILE *
APPEND INTO TABLE data_temp
FIELDS TERMINATED BY ',' optionally enclosed by '"'
TRAILING NULLCOLS
sno "trim(:sno)",
name "SUBSTR(trim(:name),1,20)" ,
sex "SUBSTR(trim(:sex),1,1)",
loc "SUBSTR(trim(:loc),1,20)" ,
organization filler,
contact filler
begindata
sno,name,***,loc,organization,contact
1,ram,M,India,HP,998976789
2,Shesha,M,India,IBM,7890808098
{code}
Now:
{code}
SQL> create table data_temp(sno number,name varchar2(10 char),sex char(1),loc varchar2(20 char));
Table created.
SQL> host sqlldr scott/tiger control=c:\temp\vissu.ctl log=c:\temp\vissu.log
SQL> select * from data_temp
  2  /
       SNO NAME       S LOC
         1 ram        M India
         2 Shesha     M India
SQL>
{code}
SY.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Need to skip the data load for one of the sub chain.

    Hi All,
    In our project, we have one meta chain and have many sub chains inside that. Today we don't want to run one of the sub chain. As we are in BW7.0, Skip options are not available. Can you please help how to stop the data load for the particular sub-chain.Please suggest.
    Thanks.

    Hi Jalina,
    If this is a frequent request then you can create a custom ABAP Program and then use the below simple logic to skip/run the meta chain, but you will also have to change the link between the sub chains as "Always" instead of "Successful" so that no matter if the dependent chain is successful OR not the nex chain will proceed. If you are comfortable with event then you can also use event to achieve this
    Program Logic- Create a new table where you maintain meaningful values (indicator/description) in it and the program should read the data from the table, Based on the values in the table the program will be successful/fail
    Thanks
    Abhishek Shanbhogue

  • Dual Language Data upload using SQL*Loader

    I have to load data consisting of English and Traditional Chinese characters into 8.1.5 from external files. These external files are in MS Excel.
    Is there any way that I can user SQL*Loader for this ? If yes, how ? If not, is there any other way out.
    The NLS in the database is currently AMERICAN.
    null

    ORA-00604 error occurred at recursive SQL level string
    Cause: An error occurred while processing a recursive SQL statement (a statement applying to internal dictionary tables).
    Action: If the situation described in the next error on the stack can be corrected, do so; otherwise contact Oracle Support Services
    This kind of error occurs when data dictionary is
    query a lot.
    Joel P�rez

  • Need to change the date of joining of employee

    Hi All,
    I have gone through some threads similar to this subject an also tried to do changes from PA41 but i am facing some problems during the procedure.
    We have transferred some employees to sap system with their original date of joining and payroll was run from some other date for those employees. So i need to change the date of joining of those employees.
    For example : Below is the line items of one employee from table infotype 0.
    End date Start date Changed on
    22.02.2009 19.02.2007 19.02.2009
    31.03.2009 23.02.2009 19.02.2009
    31.12.2009 01.04.2009 14.10.2009
    31.12.9999 01.01.2010 21.01.2010
    Payroll was run from Feb-09 onwards and i want put date of joining for this employee as 23.02.2009.
    I want to know which date i need to change??...When i am trying to change the first start date i.e. 19.02.2007 to my desired start date, but it is not allowing me to do that as end date is smaller.
    Please tell me how would i change the joining date of employee as 23.02.2009 ?.
    Thanks.

    Try this
    22.02.2009 19.02.2007
    31.03.2009 23.02.2009
    31.12.2009 01.04.2009
    31.12.9999 01.01.2010   take this record form PA30  IT0000 Over View (Shif +  F8)  Copy that record and change the Start date
    as 2302.2010  so  another record will be created
    22.02.2010    01.01.2010
    31.12.9999    23.02.2010
    Just try and let me know

  • I need help proving the date tag on a photo stored in my iPhoto is from the date it was sent to my iphone/date it was imported into iphoto - and that it is NOT the date the photo was actually taken.  Please help!

    I need help proving the date tag on a photo stored in my iPhoto is from the date it was sent to my iphone/date it was imported into iphoto - and that it is NOT the date the photo was actually taken.   I recieved a photo via text on my iphone and then I synced my iphone to my macbook and now it is in iphoto.  I already know that the date on the photo per the tag that shows up on it in iphoto is NOT the date the photo was actually taken.  I need article or literature or something confirming the tag is from when it was sent to the iphone and/or when it was imported.  I greatly appreciate some assistance!

    All I am trying to do is find something on a forum board or article etc stating that the the date showing in iphoto could be the date it was imported or synced or sent to me and not the actual date taken.
    The date on the photo could be anything because you can edit the date with iPhoto or any of 100 apps, free and paid for. So, the date on the photo will prove nothing, I'm afraid.
    Regards
    TD

  • I need to know the date of the last Monday

    I need to know the date of the last Monday
    If today is Monday then I need todays date
    If today is Tuesday then I need yesterdays date etc....
    If today is Sunday then I need to know the date 6 days ago etc....

    the day() function will tell you what day of now() is as an integer: 1=Sunday 7=Saturaday.
    You know that Monday is 2.  The difference between today's number and Monday's number (with a little mathmatical juggling to wrap Sunday to the previous week  -- I would probably just convert -1 to 6 with a simple if statement after substracting 2 from the day() value.).
    Subtracting (adding a negative value) of this difference with the dateAdd() function will give you the date of that previous Monday.

  • How to skip the date in breakdown maint order

    Dear PM Guru's,
    please suggest me how to skip the date inbetween the two working days. please check the below scenario: based on factory calendar (production ) saturday was holiday. one breakdown maintenance order was opened on friday afternoon and its closed on sunday afternoon. now user wants only breakdown hours of production running days/ hours. production was produced upto saturday earlymorning and its renewed sunday morning. where as saturday producion was not planned and its not produced , so user wants to skip that time from the breakdown duration calculation. please suggest me is it right practice? if its right how we have to do in SAP? please let me know it.
    thanks in advance to all the PM guru's
    regards
    Jalu

    Hi,
        check this link Equipment Downtime
    I believe u may have to recalculate the breakdown hrs using some FM in user exit QQMA0014 QM/PM/SM: Checks before saving a notification

  • I need to display the date of every month 1st

    Hi All,
    I need to display the date from 01/01/2007 to 09/01/2008.
    example like this
    01/01/2007
    02/01/2007
    03/01/2007
    01/01/2008
    02/01/2008
    09/01/2008
    could u pls help me
    thanks,
    Dharma.

    This should give you something to work with:
    SQL> SELECT ADD_MONTHS(TO_DATE('01/01/2007','MM/DD/YYYY'),LEVEL-1) AS months from dual connect by level <= 21;
    MONTHS
    01/01/2007 00:00:00
    02/01/2007 00:00:00
    03/01/2007 00:00:00
    04/01/2007 00:00:00
    05/01/2007 00:00:00
    06/01/2007 00:00:00
    07/01/2007 00:00:00
    08/01/2007 00:00:00
    09/01/2007 00:00:00
    10/01/2007 00:00:00
    11/01/2007 00:00:00
    12/01/2007 00:00:00
    01/01/2008 00:00:00
    02/01/2008 00:00:00
    03/01/2008 00:00:00
    04/01/2008 00:00:00
    05/01/2008 00:00:00
    06/01/2008 00:00:00
    07/01/2008 00:00:00
    08/01/2008 00:00:00
    09/01/2008 00:00:00
    21 rows selected.Hope this helps!

  • Need to get the date's.

    Hi,
    I need to get the dates in interval of 7.
    My Scenario:
    When my user gives the date as 04/01/2013. My output should be like
    04/01/2013
    04/02/2013
    04/03/2013
    04/04/2103
    add of 4 dates. How can i acheive this in sql query? Could any one pls help me?
    Regards,
    Prasad k T,

    wilhelm wundt wrote:
    Hi,
    I need to get the dates in interval of 7.Your expected output is not talking about th einterval of 7 days..
    >
    My Scenario:
    When my user gives the date as 04/01/2013. My output should be like
    04/01/2013
    04/02/2013
    04/03/2013
    04/04/2103Is this date dd/mm or mm/dd
    If you need 4 consecutive dates, use
    select input_date+level-1
    from dual
    connect by level <= 4;>
    add of 4 dates. How can i acheive this in sql query? Could any one pls help me?
    Regards,
    Prasad k T,

  • How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    There is no way to see where he has been.
    Go into Settings > General > Restrictions > Safari and turn it off. Then add the MacGruff browser from the app store. After that go back to Restrictions and turn off the ability to add apps.

  • Why we need to Stage the Data in DSO/ODS before InfoCube?

    Hi
    I have one question related to BW modeling.
    1.   Why we need to stage the data in DSO/ODS before loading into InfoCube?
    Thanks
    Raj

    There are multiple reasons:
    one, some extractors specially finance send you data after image, in that case you can only do overwrite in dso not in cube.. cube is always addition. Second, you keep detail data in DSO and more summarized data in the cube and write a jump query if you need detail data. This is more for performance reason. Third, in some cases you can generate delta within dso, so dso is very important here. Forth, in dso you always store data as it comes from the source, you do your data massaging in the next layer. If you get some issues in the data, you don't need to go and get the data from the source, but from your dso. I know long time ago, space is issue and there was no need to store data in multiple layers, but now space is not issue so the benefite we are getting by storing the data in dso outweight the space concern.
    thanks.
    Wond

  • Need to save the data in mutiple tables

    Dear Experts,
    I need to insert the data ,which is accepted from the user at runtime using table control and also generate automatic number when clicked on the save button the data should be in the database as well.
    I am new to module pool, your help is reqd. The user will be awarded ample points if answered correctly.
    regards,
    Rachel

    Hi Rachel,
    For automatic number generation you need to create number range object using tcode SNRO and then use the foolowing logic.
    *&      Form  GET_NEXT_NUMBER
          text
    -->  p1        text
    <--  p2        text
    FORM get_next_number .
      DATA: w_quant   LIKE inri-quantity,    "dummy
            w_code    LIKE inri-returncode.  "returncode
    To lock the number range object
      CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
        EXPORTING
          object           = 'ZNUM'
        EXCEPTIONS
          foreign_lock     = 1
          object_not_found = 2
          system_failure   = 3
          OTHERS           = 4.
    To raise the exception to the corresponding exception of
    'NUMBER_RANGE_ENQUEUE'
      IF sy-subrc NE 0.
        MESSAGE e368(00) WITH text-006."'Object is not found'
      ENDIF.                         "IF sy-subrc NE 0
    To get the next number from the object
      CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
          nr_range_nr             = 'Z2'
          object                  = 'ZNUM'
          toyear                  = '2008'
        IMPORTING
          number                  = l_lbc_next
          quantity                = w_quant
          returncode              = w_code
        EXCEPTIONS
          interval_not_found      = 1
          number_range_not_intern = 2
          object_not_found        = 3
          quantity_is_0           = 4
          quantity_is_not_1       = 5
          interval_overflow       = 6
          buffer_overflow         = 7
          OTHERS                  = 8.
      IF sy-subrc <> 0.
        CLEAR ok_code.
        MESSAGE e368(00) WITH text-006."'Object is not found'
      ENDIF.               "IF sy-subrc <> 0
    To unlock the number range object
      CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
        EXPORTING
          object           = 'ZNUM'
        EXCEPTIONS
          object_not_found = 1
          OTHERS           = 2.
      IF sy-subrc NE 0.
        CLEAR ok_code.
        MESSAGE e368(00) WITH text-006."'Object is not found'
      ENDIF.              "IF sy-subrc NE 0
    ENDFORM.                    " GET_NEXT_NUMBER
    And for table control logic
    see the below link.
    Table control of Module Pool Program
    Regards,
    Raju

  • Need to grab the data from Web Page and send it to SAP using PI

    Hello Experts,
    I need to grab the exchanges rates from the below link.
    http://www.cbr.ru/scripts/XML_daily.asp?date_req=09-06-2011.
    This link returns an XML . I need to get the data from this XML page and post it to SAP ECC using PI.
    My requirement is that, process should start from the ECC and grabs the data from the web page which gives you the XML and post this data into ECC using PI. We have a RFC written in ECC side to post the data in ECC.
    Please help me to identify the adaptor's needed and what should I need to do to initiate the process from ECC.
    Would it be a Async or Sync process ?
    I would really appreciate the inputs.
    Thanks.
    Gaurav.

    Hi,
         Any particular reason that you want to go for a sync process as then you would need to either use a BPM (RFC to BPM where you use sync/async bridge to get the xml file from the specified link and then send the response back to ECC) or go for a synchronous Java proxy on the receiver side which will grab the exchange rates and then map back to the RFC response structure. In this case, you can avoid the BPM.
    Else, as mentioned in Michal's blog, you can break it up into 2 seperate scenarios. RFC/Proxy to File and then File to IDoc/RFC/Proxy which will get the exchange rates into ECC.
    Another option can be Proxy --> PI --> ECC(IDoc/Proxy/RFC). Here you can grab the exchange rates from the link in your message mapping through a UDF.
    Regards

  • Need to check the data flow from R/3 to BW server.

    Hi BI experts,
    This query is regarding need to check the data flow from R/3 to BW server.
    As of now I have some set of reports which I would need to take up in BW. The requirement is  to go through the list of transaction codes for reports in R/3 and find out if there are already  any existing objects in BW system which I can use for these reports.
    So, can u plz help me.

    Depends what are your Tcode or Reports users run in R/3 and they want the same in BW.Then in BI Content we have Out of the box Delivered reports.You can activate those Load data and use it.
    Gimme T-codes you have I can send you Standard reports in BI or Cube you can get these from.
    ~AK

  • Need to Extract the Data From "0BBP_TD_CONTR_2"

    Hi,
    I need to extract the data from SRM extractor "0BBP_TD_CONTR_2". I do not have much knowledge in SRM. Can any one give me the steps how can i check the extractor its not like R3. All kind of help will be appreciated.
    Thanks

    Never mind guys i figured it out. Thnaks

Maybe you are looking for