SQL* Loader to load data format into tables??????

Hi,
Hai I am very much new to Oracle. I am trying to load data into a table using SQL*Loader and i getting error while it is using the data format.
the format used in data file is "Sep 6 2001 12:00:00:000AM"
and when i used to_date( :accountDate, 'YYYY-MM-DD HH:MI:SS AM or PM') function it throws me an exception like
"ORA-01821: date format not recognized". so anybody can help me to insert data with out changing the data file, whould be really helpfull
thanks
vijay

Also it looks like you need to change your date format mask.
If your data is formatted as "Sep 6 2001 12:00:00:000AM"
then you should use to_date( :accountDate, 'Mon DD YYYY HH:MI:SSAM')
This will work with a two digit second field, but not a three digit second field.

Similar Messages

  • Sql loader error with date format

    Hi everyone,
    I have table and have a data in one coulmn RECORDED_DATE like '20090224' and my client is asking me to load this coulmn data in 'yyyymmdd' format.I am strucked up with my ideas.I used to_date('20090124','yyyymmdd') in control file.but it is also not working Here it is my control file
    LOAD DATA
    INFILE 'C:\xxxx\SQLLDR\HE data\HE_data_Feb.txt'
    BADFILE 'C:\xxxx\SQLLDR\HE data.bad'
    DISCARDFILE 'C:\xxxx\SQLLDR\HE data.dsc'
    INTO TABLE LSCCMGR.FASTPAY_HE_DATA
    REPLACE
    fields terminated by X'09'
    TRAILING NULLCOLS
    (RECORDED_DATE "TO_DATE(:RECORDED_DATE,'mm/dd/yyyy')"
    AGENT_ID
    MEASURE
    TRANSACTIONS
    FEES
    If i excute like this i am getting the error like
    Record 1: Rejected - Error on table LSCCMGR.FASTPAY_HE_DATA, column RECORDED_DATE.
    ORA-01843: not a valid month
    Getting for all records,what i need o change to get the RECORDED_DATE as dateformat.Ple any one help me in this issue to resolve
    How can we perform this using sql loader pls let me know,Thanks in advance.
    Sravan

    Hi,
    >>(RECORDED_DATE "TO_DATE(:RECORDED_DATE,'mm/dd/yyyy')"
    *Change this line to*
    (RECORDED_DATE "TO_DATE(:RECORDED_DATE,'yyyymmdd')"Regards,

  • Xml data upload into tables using loader

    Hi,
    I have to load XML file data into multiple tables using sqlloader. i wrote a cotrol file to execute this ,but i was not able to load the data into multiple tables at the same time, first loading table in control file is able to load the data ,rest of the load is giving error,please refer the below control file and log. Help me with your great efforts.
    Have a great day!
    Control file:
    LOAD DATA
    TRUNCATE
    INTO TABLE Derivative_Security
    WHEN DERIVATIVESECURITYID != ' '
    FIELDS TERMINATED BY '</DerivativeSecurity>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler char(50000) Terminated by '<DerivativeSecurity ',
    DUMMY2 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157Level="' and '"',
    DUMMY3 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157MVAdjustable="' and '"',
    DUMMY4 filler char(200) Terminated by WHITESPACE enclosed by 'OriginalMV="' and '"',
    DUMMY5 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157MVDelta="' and '"',
    DUMMY6 filler char(200) Terminated by WHITESPACE enclosed by 'FAS157AdjustedMV="' and '"',
    DUMMY7 filler char(200) Terminated by WHITESPACE enclosed by 'PLCurrency="' and '"',
    DERIVATIVESECURITYID Terminated by WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    METDERIVATIVEID Terminated by WHITESPACE enclosed by 'MetDerivativeID="' and '"',
    MUREXTRANSNUMBER Terminated by WHITESPACE enclosed by 'MurexTransactionNumber="' and '"',
    DUMMY8 filler char(200) Terminated by WHITESPACE enclosed by 'Trader="' and '"',
    DUMMY9 filler char(200) Terminated by WHITESPACE enclosed by 'BuySell="' and '"',
    DETAILTYPE Terminated by WHITESPACE enclosed by 'DetailType="' and '"',
    DERIVATIVETYPE Terminated by WHITESPACE enclosed by 'DerivativeType="' and '"',
    AL_MANAGEMENTSIDE Terminated by WHITESPACE enclosed by 'AL_ManagementSide="' and '"',
    COUNTERPARTYCODE Terminated by WHITESPACE enclosed by 'CounterpartyCode="' and '"',
    COUNTERPARTYNAME Terminated by WHITESPACE enclosed by 'CounterpartyName="' and '"',
    CURRENCYCODE Terminated by WHITESPACE enclosed by 'CurrencyCode="' and '"',
    DUMMY10 filler char(200) Terminated by WHITESPACE enclosed by 'Coupon="' and '"',
    DUMMY11 filler char(200) Terminated by WHITESPACE enclosed by 'FixedFloatingIndicator="' and '"',
    DUMMY12 filler char(200) Terminated by WHITESPACE enclosed by 'IndexMultiplier="' and '"',
    DUMMY13 filler char(200) Terminated by WHITESPACE enclosed by 'IndexName="' and '"',
    DUMMY42 filler char(200) Terminated by WHITESPACE enclosed by 'Margin="' and '"',
    DUMMY14 filler char(200) Terminated by WHITESPACE enclosed by 'Comment11="' and '"',
    DUMMY15 filler char(200) Terminated by WHITESPACE enclosed by 'Comment12="' and '"',
    DUMMY16 filler char(200) Terminated by WHITESPACE enclosed by 'Comment13="' and '"',
    DUMMY17 filler char(200) Terminated by WHITESPACE enclosed by 'Comment21="' and '"',
    DUMMY18 filler char(200) Terminated by WHITESPACE enclosed by 'Comment22="' and '"',
    DUMMY19 filler char(200) Terminated by WHITESPACE enclosed by 'Comment23="' and '"',
    DUMMY20 filler char(2000) Terminated by WHITESPACE enclosed by 'TradeComment="' and '"',
    DUMMY21 filler char(200) Terminated by WHITESPACE enclosed by 'OptionCallPut="' and '"',
    DUMMY22 filler char(200) Terminated by WHITESPACE enclosed by 'OptionType="' and '"',
    DUMMY23 filler char(200) Terminated by WHITESPACE enclosed by 'SettleType="' and '"',
    DUMMY24 filler char(200) Terminated by WHITESPACE enclosed by 'RefISIN="' and '"',
    DUMMY25 filler char(200) Terminated by WHITESPACE enclosed by 'RefObligation="' and '"',
    DUMMY26 filler char(200) Terminated by WHITESPACE enclosed by 'Sensitivity="' and '"',
    DUMMY27 filler char(200) Terminated by WHITESPACE enclosed by 'EffectiveConvexity="' and '"',
    DUMMY28 filler char(200) Terminated by WHITESPACE enclosed by 'Vega="' and '"',
    DUMMY29 filler char(200) Terminated by WHITESPACE enclosed by 'NextResetDate="' and '"',
    DUMMY30 filler char(200) Terminated by WHITESPACE enclosed by 'LastResetDate="' and '"',
    EFFECTIVEDURATION Terminated by WHITESPACE enclosed by 'EffectiveDuration="' and '"',
    DUMMY31 filler char(200) Terminated by WHITESPACE enclosed by 'Instrument="' and '"',
    DUMMY32 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerCode="' and '"',
    DUMMY33 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerName="' and '"',
    DUMMY34 filler char(200) Terminated by WHITESPACE enclosed by 'IssuerREDCode="' and '"',
    DUMMY35 filler char(200) Terminated by WHITESPACE enclosed by 'Strategy="' and '"',
    DUMMY36 filler char(200) Terminated by WHITESPACE enclosed by 'StrikePrice="' and '"',
    MATURITYDATE Terminated by WHITESPACE enclosed by 'MaturityDate="' and '"',
    DUMMY37 filler char(200) Terminated by WHITESPACE enclosed by 'TickerSymbol="' and '"',
    DUMMY38 filler char(200) Terminated by WHITESPACE enclosed by 'MetPay="' and '"',
    DUMMY39 filler char(200) Terminated by WHITESPACE enclosed by 'MetRec="' and '"',
    DUMMY40 filler char(200) Terminated by WHITESPACE enclosed by 'Payrec="' and '"',
    DUMMY41 filler char(200) Terminated by WHITESPACE enclosed by 'RiskSection="' and '"',
    DUMMY54 filler char(200) Terminated by WHITESPACE enclosed by 'HedgedItem="' and '"',
    DUMMY43 filler char(200) Terminated by WHITESPACE enclosed by 'ResetFrequency="' and '"',
    DUMMY44 filler char(200) Terminated by WHITESPACE enclosed by 'ResetFrequencyNumber="' and '"',
    DUMMY45 filler char(200) Terminated by WHITESPACE enclosed by 'PaymentFrequency="' and '"',
    DUMMY46 filler char(200) Terminated by WHITESPACE enclosed by 'PaymentFrequencyNumber="' and '"',
    DUMMY47 filler char(200) Terminated by WHITESPACE enclosed by 'CapFloorCoupon="' and '"',
    DUMMY48 filler char(200) Terminated by WHITESPACE enclosed by 'RefIndexRate="' and '">',
    DUMMY50 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY51 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY52 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY53 filler char(1000) enclosed by "<Classification=" and "/>"
    INTO TABLE DERIVATIVE_POSITION
    WHEN PORTFOLIOCODE != ' '
    FIELDS TERMINATED BY '</NewDataSet>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler char(65000) terminated by '<DerivativePosition ',
    DERIVATIVESECURITYID TERMINATED BY WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    PORTFOLIOCODE TERMINATED BY WHITESPACE enclosed by 'PortfolioCode="' and '"',
    LONGSHORTINDICATOR TERMINATED BY WHITESPACE ENCLOSED BY 'LongShortIndicator="' and '"',
    FAS157Level filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157Level="' and '"',
    FAS157MVAdjustable filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157MVAdjustable="' and '"',
    OriginalMV filler char(100)TERMINATED BY WHITESPACE enclosed by 'OriginalMV="' and '"',
    FAS157MVDelta filler char(100) TERMINATED BY WHITESPACE enclosed by 'FAS157MVDelta="' and '"',
    FAS157AdjustedMV filler char(100)TERMINATED BY WHITESPACE enclosed by 'FAS157AdjustedMV="' and '"',
    CURRENTNOTIONALLOCAL TERMINATED BY WHITESPACE enclosed by 'CurrentNotionalLocal="' and '"',
    CURRENTNOTIONALUSD TERMINATED BY WHITESPACE enclosed by 'CurrentNotionalUSD="' and '"',
    OPENQUANTITY TERMINATED BY WHITESPACE enclosed by 'OpenQuantity="' and '"',
    ORIGINALNOTIONALLOCAL TERMINATED BY WHITESPACE enclosed by 'OriginalNotionalLocal="' and '"',
    ORIGINALNOTIONALUSD TERMINATED BY WHITESPACE enclosed by 'OriginalNotionalUSD="' and '"',
    ORIGINALQUANTITY TERMINATED BY WHITESPACE enclosed by 'OriginalQuantity="' and '"',
    ACCRUEDINTERESTLOCAL TERMINATED BY WHITESPACE enclosed by 'AccruedInterestLocal="' and '"',
    ACCRUEDINTERESTUSD TERMINATED BY WHITESPACE enclosed by 'AccruedInterestUSD="' and '"',
    ACCRUEDINTERESTBASE TERMINATED BY WHITESPACE enclosed by 'AccruedInterestBase="' and '"',
    CLEANMARKETVALUEENDOFDAYLOCAL TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayLocal="' and '"',
    CLEANMARKETVALUEENDOFDAYUSD TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayUSD="' and '"',
    CLEANMARKETVALUEENDOFDAYBASE TERMINATED BY WHITESPACE enclosed by 'CleanMarketValueEndOfDayBase="' and '"',
    DIRTYMARKETVALUEENDOFDAYLOCAL TERMINATED BY WHITESPACE enclosed by 'DirtyMarketValueEndOfDayLocal="' and '"',
    DIRTYMARKETVALUEENDOFDAYUSD TERMINATED BY WHITESPACE enclosed by 'DirtyMarketValueEndOfDayUSD="' and '"',
    PREMIUMLOCAL TERMINATED BY WHITESPACE enclosed by 'PremiumLocal="' and '"',
    PREMIUMUSD TERMINATED BY WHITESPACE enclosed by 'PremiumUSD="' and '"',
    PREMIUMBASE TERMINATED BY WHITESPACE enclosed by 'PremiumBase="' and '"',
    BIDDIES TERMINATED BY WHITESPACE enclosed by 'Biddies="' and '"',
    ADDONEXPOSUREUSD TERMINATED BY WHITESPACE enclosed by 'AddOnExposureUSD="' and '"',
    RegulatoryExposureUSD filler char(100) TERMINATED BY WHITESPACE enclosed by 'RegulatoryExposureUSD="' and '"',
    PARCR01 filler char(100) TERMINATED BY WHITESPACE enclosed by 'PARCR01="' and '"',
    FAS133DESIGNATIONGAAP TERMINATED BY WHITESPACE enclosed by 'FAS133DesignationGAAP="' and '"',
    FAS133DESIGNATIONSTAT TERMINATED BY WHITESPACE enclosed by 'FAS133DesignationSTAT="' and '"',
    TRADEDATE TERMINATED BY WHITESPACE enclosed by 'TradeDate="' and '"',
    EffectiveDate filler char(100) TERMINATED BY WHITESPACE enclosed by 'EffectiveDate="' and '"',
    ALLOCATION TERMINATED BY WHITESPACE enclosed by 'Allocation="' and '"' "round(:ALLOCATION,4)",
    DUMMY36 filler char(100) enclosed by '/' and '>'
    Log:
    Table DERIVATIVE_SECURITY:
    4079 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    28074 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Table DERIVATIVE_POSITION:
    0 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    32153 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 248196 bytes(26 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 32153
    Total logical records rejected: 0
    Total logical records discarded: 28074

    When there are multiple tables in a control file, SQL Loader assumes the data for the first file in the second table immediately follows the last field in the first table. You probably want SQL Loader to start looking for the first column of the second table at the start of the second table. You can do this by using the POSITION clause
    DUMMY51 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY52 filler char(1000) enclosed by "<Classification=" and "/>",
    DUMMY53 filler char(1000) enclosed by "<Classification=" and "/>"
    INTO TABLE DERIVATIVE_POSITION
    WHEN PORTFOLIOCODE != ' '
    FIELDS TERMINATED BY '</NewDataSet>' optionally enclosed by '"'
    TRAILING NULLCOLS
    DUMMY1 filler *position(1)* char(65000) terminated by '<DerivativePosition ',
    DERIVATIVESECURITYID TERMINATED BY WHITESPACE enclosed by 'DerivativeSecurityID="' and '"',
    PORTFOLIOCODE TERMINATED BY WHITESPACE enclosed by 'PortfolioCode="' and '"',
    .

  • Java.sql.SQLException:ORA-01801:date format is too long for internal buffer

    Hi,
    I am getting the following exception when i trying to insert data in to a table through a stored procedure.
    oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-01801: date format is too long for internal buffer
    when execute this stored procedure from ana anonymous block , it gets executed successfully, but i use a OracleCallableStatement to execute the procedure i am getting this error.
    Please let me know how to resolve this error.
    Is this error something to do with the Database Configuration ?
    Thanks & Regards
    Meenal

    I don't know if this will help, but we were getting this error in several of the standard OA framework pages and after much pain and aggravation it was determined that visiting the Sourcing Home Page was changing the timezone. For most pages this just changed the timezone that dates were displayed in, but some had this ORA-01801 error and some others had an ORA-01830 error (date format picture ends before converting entire input string). Unfortunately, if you are not using Sourcing at your site, this probably won't help, but if you are, have a look at patch # 4519817.
    Note that to get the same error, try the following query (I got this error in 9.2.0.5 and 10.1.0.3):
    select to_date('10-Mar-2006', 'DD-Mon-YYYY________________________________________________HH24:MI:SS') from dual;
    It appears that you can't have a date format that is longer than 68 characters.

  • How to convert Date format into day in ssrs reports?

    Hi
    How to convert date format into day?
    10/01/2010 as like Monday like that?

    =weekdayname(datepart("w",Fields!mydate.Value))
    -Vaibhav Chaudhari

  • 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 :-(

  • SQL Loader Problem with Date Format

    Dear all,
    I am dealing with a problem in loading data with SQL Loader. The problem is in the date format.
    More specifically, I created the following Control File:
    file.ctl
    LOAD DATA
    INFILE 'D:\gbal\chatium.log'
    APPEND INTO TABLE CHAT_SL
    FIELDS TERMINATED BY WHITESPACE
    TRAILING NULLCOLS
    (SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL2 char,
    SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL4 char,
    SL5 char,
    SL6 char,
    SL7 char,
    SL8 char,
    SL9 char,
    SL10 char,
    SL11 char,
    SL12 char,
    SL13 char,
    SL14 char,
    SL15 char)
    The data we want to load are in the following file:
    Apr 29, 2007 12:05:49 AM 1060615 Apr 29, 2007 12:05:35 AM 306978537730 24026384 chatium.user.userinfo WAP 0
    Apr 29, 2007 12:12:51 AM 1061251 Apr 29, 2007 12:12:27 AM 306978537730 24026384 chatium.channel.list WAP 0
    Apr 29, 2007 12:12:51 AM 1061264 Apr 29, 2007 12:12:32 AM 306978537730 24026384 chatium.channel.listdetail WAP 0
    Apr 29, 2007 12:13:51 AM 1061321 Apr 29, 2007 12:13:31 AM 306978537730 24026384 chatium.user.search WAP 0
    Apr 29, 2007 12:13:51 AM 1061330 Apr 29, 2007 12:13:37 AM 306978537730 24026384 chatium.user.userinfo WAP 0
    The error log file is the following:
    SQL*Loader: Release 9.2.0.1.0 - Production on Mon Apr 30 11:29:16 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Control File: file.ctl
    Data File: D:\gbal\chatium.log
    Bad File: chatium.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table CHAT_SL, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    SL1 FIRST * WHT DATE MonDD,YYYYHH:MI:SS
    SL2 NEXT * WHT CHARACTER
    SL3 NEXT * WHT CHARACTER
    SL4 NEXT * WHT CHARACTER
    SL5 NEXT * WHT CHARACTER
    SL6 NEXT * WHT CHARACTER
    SL7 NEXT * WHT CHARACTER
    SL8 NEXT * WHT CHARACTER
    SL9 NEXT * WHT CHARACTER
    SL10 NEXT * WHT CHARACTER
    SL11 NEXT * WHT CHARACTER
    SL12 NEXT * WHT CHARACTER
    SL13 NEXT * WHT CHARACTER
    SL14 NEXT * WHT CHARACTER
    SL15 NEXT * WHT CHARACTER
    Record 1: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 2: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 3: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 4: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    I wonder if you could help me.
    Thank you very much in advance.
    Giorgos Baliotis

    SQL> select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS FF3AM') from dual;
    select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS FF3AM') from dual
    ERROR at line 1:
    ORA-01821: date format not recognized
    SQL> ed
    Wrote file afiedt.buf
      1* select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS AM') from dual
    SQL> /
    TO_DATE(
    29/04/07
    SQL> Then, you defined blank space as separator, but there is spaces in your date inside your file. So, you should add double-quotes around the date field like below, and add optionally enclosed by '"' into your ctlfile.
    "Apr 29, 2007 12:05:49 AM" 1060615 "Apr 29, 2007 12:05:35 AM" 306978537730 24026384 chatium.user.userinfo WAP 0
    "Apr 29, 2007 12:12:51 AM" 1061251 "Apr 29, 2007 12:12:27 AM" 306978537730 24026384 chatium.channel.list WAP 0
    "Apr 29, 2007 12:12:51 AM" 1061264 "Apr 29, 2007 12:12:32 AM" 306978537730 24026384 chatium.channel.listdetail WAP 0
    "Apr 29, 2007 12:13:51 AM" 1061321 "Apr 29, 2007 12:13:31 AM" 306978537730 24026384 chatium.user.search WAP 0
    "Apr 29, 2007 12:13:51 AM" 1061330 "Apr 29, 2007 12:13:37 AM" 306978537730 24026384 chatium.user.userinfo WAP 0Example :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#sthref477
    Nicolas.

  • SQL Loader to append data in same table but using differnet WHEN clauses

    In my data file i have a header record and a detail record identified by Record_type = 1 and 2 respectively.
    The Database table has all the columns to capture detail records but i want to capture jus one column of header record now also in my existing table. So i have added that column (DATA_DATE)in my table but how to capture that value ?
    im writing my control file using two WHEN clauses, something like -
    load data
    into table t_bdn
    append
    when RECORD_TYPE = '2'
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    SEQUENCE_NO
    , RECORD_TYPE
    , DISTRIBUTOR_CODE
    , SUPPLIER_CODE
    , SUPPLIER_DISTRIBUTOR_CODE
    , DISTRIBUTOR_SKU
    , SUPPLIER_SKU
    when RECORD_TYPE = '1'
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    SEQUENCE_NO FILLER
    , RECORD_TYPE FILLER
    , CREATE_DATE FILLER
    , DATA_DATE "NVL(to_date(:DATA_DATE, 'YYYY/MM/DD'),to_date('9999/12/31', 'YYYY/MM/DD'))"
    im getting error " expecting INTO and foung WHEN RECORD_TYPE = '1' "
    if i give iNTO second time it will append a new row altogether in my table but i want the same row to be updated with this DATA_DATE value coming from RECORD_TYPE =1 and header record has 4 delimited data text fields only and i am interested in fetching just the 4th column..
    KIndly suggest what to do ?

    Ravneek, I could be wrong but sqlldr is a 'load' program, that is, it inserts data. I am unaware of any ability to update existing rows as you seem to want. What you appear to want to do is more the job of a merge statement.
    I would look at writing a pro* language, a .net, or a java program to perform inserts where some or all of the newly inserted rows are also to be updated.
    From the manual: (Oracle® Database Utilities 10g Release 2 (10.2) Part Number B14215-01)
    Updating Existing Rows
    The REPLACE method is a table replacement, not a replacement of individual rows. SQL*Loader does not update existing records, even if they have null columns. To update existing rows, use the following procedure:
    1. Load your data into a work table.
    2. Use the SQL language UPDATE statement with correlated subqueries.
    3. Drop the work table.
    HTH -- Mark D Powell --

  • Problem in loading 0calday infoobject date format through Flatfile in cube

    Hi All,
    I am facing problem  in loading the 0calday infoobject  data through flat file( format - test.csv) in infocube..
    Suppose consider we are having two flat files(test1.csv,test2.csv).
    1.First file(test1.csv) has a proper date format (ie YYYYMMDD), while loading it is succesfully .
    2.Second file(test2.csv) has improper date format(ie DDMMYYYY), loading fails because of this format..
    Is it possible to write the Routine(Start Routine) in the Infopackage (External data-Tab) in such a way the if the flat file(test1.csv) is proper date format load calday data without any conversion, if the file is test2.csv convert the date field format from (DDMMYYYY) to (YYYYMMDD) and finally laod data in cube.
    With regards,
    Hari.
    +91 9323839017

    Hello Dinesh,Anil
    There is no distinguishing field between the two flat file loads.
    We are using only one infoobject(ie 0calday) for two loads.
    We are using two external source system(one system generate file as YYYYMMDD date format,and another system generate date formate as DDMMYYY, here two file names are unique.
    Here my requirement is i have to compare two file names using start routine of the package (tab:External data) .
    if(test1.csv)
    load as it is 0calday data (since it is in proper format YYYYMMDD)
    else if(test2.csv)
    then convert from DDMMYYYY to YYYYMMDD and load data to 0calday infoobject in cube.
    Is it possible to compare two files names using start routine.
    with regards,
    Hari

  • Downloading loading option and date format

    Hello,
    While downloading a pdf file by mistake i checked on both "Save File" and also "Default", following to which whenever i download any file its directly saving file wherein i need to just open the file withou saving the save.
    Am not able to find options tab under Tools inorder to reset my setting to Default
    Also currently under Firefox date format is MM/DD/YYYY, could we change this to DD/MM/YYYY
    Am using 3.6 (corporate version),
    Thanks, Karthik ([email protected])

    setDateFormat() is expecting a format mask that is valid for the java.text.SimpleDateFormat object.
    So, just do:
    setDateFormat("d/M/yyyy");
    You can find more helpful information on using the XDK at my website: www.webspedite.com/oracle.
    Jason M Cohen

  • URGENT: XML-SQL: Error parsing different date formats in the same XML file.

    Hi Everyone,
    I have a big problem while using the XML-SQL utility. I have a XML file with different date formats. I get exception like the one below.
    "oracle.xml.sql.OracleXMLSQLException: 'java.text.ParseException: Unparseable date:"
    And the XML file is :
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Info Key="ID">
         <Insert>
              <ID>1</ID>
              <BookingDate>10.12.2001</BookingDate>
              <OpeningTime>19:16</OpeningTime>
         </Insert>
    </Info>
    I have tried using different setDateFormat which is contrary.
    sav.setDateFormat("d.M.y");
    sav.setDateFormat("H:m:s");
    Can someone help me on the same.
    Thanks in advance.
    Subramanian.

    You might have to describe the columns as varchar then modify the table to the right format.

  • Date format in Table Editor

    I am using Oracle 8.1.7. I tried to set the date format by setting the NLS_DATE_FORMAT variable, but it worked for sqlplus only. How can I set it for the Enterprise Manager's Table Editor? Thanks

    I guess you have to change that parameter in init.ora file of the database. According to what I know you can not set that format in OEM.
    Joel P�rez

  • Date format in table TCURR

    In table TCURR the Value from field holds the date in the following format 79909771. What does this mean in normal date format?

    99999999 - 79909771 = 20090228 = 28/02/2009

  • Convert Creationtime column to date format in table cwsys.cw_workspaces_tab

    How to convert the creationtime column value to date in the table cwsys.cw_workspaces_table using sql or otherwise.
    -Tarun

    I'm pretty interested in this one as several reports can be created using this field, any inside help??

  • Date format in table

    incorrect date format saved thru transaction spro>General settings>Currencies>Enter Exchange rates. date format entered is 98.98.9898 now the system wont allow you to maintain exchange rates without specifying correct date format for the entries. in tables TCURR i cannot get the entries as they are stored in nines compliment. how then can i delete the entries with abap script??

    Hi,
    use delete statement on TCURR table.
    ex:
    delete from TCURR where KURST = <your exchange rate type>.
    commit work.
    Reward points for helpful answers,
    Satish
    Message was edited by:
            Satish Panakala

Maybe you are looking for

  • Error while Transporting the cube to Testbox

    Hi  All, I  Have enhanced my cube  with new Keyfigurs & transportinmg to Test box .It is giving errors like: Key field DIMID has num. type INT4: Buffering not possible, Transport restricted The SQL statement was not executed Table /BIC/FZBKUPC (Error

  • Creation of EMCS Document

    Dear all, i have not found a clear instruction how to create a customs document for EMCS. I know that there is a function call "/SAPSLL/API_6800_EMC_CREATE". But i don't know how and where it is triggered in ECC? Must i call this function call  on my

  • Autoreconcile many statement lines against payment batch

    Hi all, I'm trying to reconcile many bank statement lines against one payment batch via the Autoreconcilation report. But is this possible? If yes, what are the steps which i should follow? First of all i created invoices in AP, validate and account

  • FTP Job Problem

    I'm struggling with an issue with an SFTP job that fails no matter what with the following; In the Audit Log tab, it reports that "There is a problem with spool file for job" In the Output tab it reports "FTP JOB Failed : Attempted to read or write p

  • HP Pavilion g6 ___ Problem : Windows 7 Bitlocker.

    Hi. I have an HP Pavilion g6.  My problem is that. I have a 150 GB logical drive. I protected that drive with Win 7 Bitlocker protection. Accidentlly I formatted that drive using quick format. Main scenario is that I formatted that drive when it was