How can an external table handle data with line feed between delimiters?

I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
I have found that some of my VARCHAR fields have embeded line feeds.
Is it possible to have a definition that would remove any line feed characters between the delimiters?
Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
to also do this.
I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
Thanks for any help
Eric
CREATE TABLE table_ext
  id        NUMBER,
  desc1     VARCHAR2(64 CHAR),
  desc2     VARCHAR2(255 CHAR),
  add_date  DATE
ORGANIZATION EXTERNAL
  TYPE ORACLE_LOADER
  DEFAULT DIRECTORY data_dir
  ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    CHARACTERSET WE8ISO8859P1
    BADFILE     log_dir:'table_ext.bad'
    DISCARDFILE log_dir:'table_ext.dis'
    LOGFILE     log_dir:'table_ext.log'
    FIELDS TERMINATED BY '|' LDRTRIM
    MISSING FIELD VALUES ARE NULL
    id        INTEGER EXTERNAL(38),
    desc1     CHAR(64),
    desc2     CHAR(255),
    add_date  CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
  LOCATION( 'data.txt' )
PARALLEL
REJECT LIMIT UNLIMITED;
1|short desc|long desc|2001-01-01 00:00
2|short desc| long
desc |1999-03-03 23:23
3|short desc|  long  desc  | 2011-02-02 02:02

Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
Eric

Similar Messages

  • How can we get current time date with resultset?

    Dear All,
    I have to insert current time date in the table.So,i need to get the current time and date with result set.So,I will first get the time date and then insert it into the table.
    I know how can we get current time and date without resultset.i have created this function its working.But now i want to use this.mean using resultset i want to put in the table.
    How can i do this?
    public static String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
    public static String now() {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    return sdf.format(cal.getTime());
    }

    yuck. Why not simply set a "new java.sql.Date()" to the SQL parameter in question?

  • How can I add the expiration date at line item level

    My User is selling voucher. The voucher is sell at line item. eg GV$5, GV$10,etc
    Each voucher line item sold need to be entered with a EXPIRATION date of that voucher.
    Maybe 3 months from issue, maybe 6months/1 year from issue.
    How can I add this to the sales order line item level?
    Which field can I used and how to configure?

    Hi Colin ,
       The question is not very clear , but i assume that you are asking about the  self expiry date of the particular material ,
    1. The setting you can do by activating  shelf life data  in material master :Plant data/stor1
    2.  its better to have a batch managed material for that you can sort the material acording the self expiry date.
    3. Once you maintain self expiry date system by default pick  the material at the time of  delivery
    Note-Shelf life expiry it will give the life of the material from the day of manfacture,remaining shelf life also will  give .
    Hope it is helpful
    Best regards
    Venkat

  • How can I import CTI route points with line setting "Advertise Globally via ILS" enabled?

    I am using CUCM 10.5.1.10000-7 and am using ILS to propogate dial plans between two clusters.  We use quite a few CTI route points but so I generally import them into the cluster with all the appropriate settings and line association settings. I need to be able to enable and set the various ILS settings line Advertise Globally via ILS.  This can be done on phones and their line associations but not on CTI route points as far as I can figure.  The same goes true with the Bulk Administration, you can updates lines of the phones for these setting but not CTI route points.  Any trick or even obvious thing I  am missing?  Setting these manually is extremely time consuming.  

    I am using CUCM 10.5.1.10000-7 and am using ILS to propogate dial plans between two clusters.  We use quite a few CTI route points but so I generally import them into the cluster with all the appropriate settings and line association settings. I need to be able to enable and set the various ILS settings line Advertise Globally via ILS.  This can be done on phones and their line associations but not on CTI route points as far as I can figure.  The same goes true with the Bulk Administration, you can updates lines of the phones for these setting but not CTI route points.  Any trick or even obvious thing I  am missing?  Setting these manually is extremely time consuming.  

  • How can I read and display data with OR without recording at the same time?

    Hi all,
      This forum has been of much help to me, but I have a rather specific question I can't seem to find an answer to.  I am new to LabView, educating myself with tutorials, trial and error, and this forum. 
      Attached is what I have so far.  I would like to read data (three voltages) and write it to an excel file.  As written below, it will do nothing until I click the "Record" button, when it then takes data, displays it on the gauges and waveform chart, and writes it to a file.  What I would like it to do is display the data at all times, and record when I click the record button (while still displaying data being read).  I have tried to do this by moving the DAQ Assistant VI, gauges, and waveform graph outside of the loops, but when I do this, it will read until I press record, and then it simply records whatever value it's stuck on.  Sorry for the long post, thanks for any help. 
      --Nathan
    Attachments:
    Record and Write to File 2.vi ‏332 KB

    Sorry, I don't have any DAQ installed, so I won't comment on the DAQ parts.
    First of all, Your VI will do nothing until you (1) first set the record button to ON  and (2) press the start button in the tool bar. It almost seems that you are using the "continuous run" button. (Don't! That's not its purpose. Basically, it automatically restarts the program whenever it finishes). A toplevel VI should never stop during normal operation, so place a big while loop around all code and create a wait state that does nothing until you tell it to acquire.
    You don't need the inner while loop, simply place your code inside the big while loop (and accumulate your array data in an initialized shift register if really needed. Currently you do at the inner loop boundary for some reason). You have a big problem that the array can grow without bounds unless you clear the accumulated data once in a while or place it in a FIFO buffer of limited size. If you let ot grow forever like you do now, the program might run out of resources at one point in the future.
    Since you are appending to your file, maybe yo don't need any shift register, just use the data points of the current iteration. Place your save operations in a case structure and keep appending the new data to your file only if the case is true.
    It is also very inefficient to use highlevel file IO here,because each instance opens and closes the file. I recommend to open the file once outside the loop, then use low level IO to append, and close the file once the big loop is done.
    LabVIEW Champion . Do more with less code and in less time .

  • How to reject external table rows with some blank columns

    How to reject external table rows with some blank columns
    I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
    CREATE TABLE EXTTAB (
    ID NUMBER(10),
    TSTAMP DATE,
    C1 NUMBER(5,0),
    C2 DATE,
    C3 FLOAT(126)
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_DAT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
    LOGFILE EXT_LOG_DIR:'exttab.log'
    BADFILE EXT_BAD_DIR:'exttab.bad'
    DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
    FIELDS TERMINATED BY "|"
    LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL
    FIELDS (
    ID,
    TSTAMP DATE 'YYYYMMDDHH24MISS',
    C1,
    C2 DATE 'YYYYMMDDHH24MISS',
    C3
    ) LOCATION ('dummy.dat')
    REJECT LIMIT UNLIMITED
    So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
    The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
    KUP-01007: at line 1 column 41
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
    Thank you.
    Denis

    Another method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
    CREATE EXTTAB_VIEW AS
    SELECT * FROM EXTTAB
    WHERE not (c1 is null and c2 is null and c3 is null);

  • How can i transfer all my data 250 GB from external hard disk to MAC pro

    How can i transfer all my data 250 GB from external hard disk to MAC pro

    The simple answer is just connect the external hard drive and drag the files from there to wherever you want them to go. If you need to do something more specific, you'll have to provide more details.

  • Hi...i bought the new iphone 4 and would like to ask how can i transfer all my data from my old iphone to the new one?  If I will do "synchronization" through itunes with the old phone and the plug in the new one will that be the case?

    Hi...i bought the new iphone 4 and would like to ask how can i transfer all my data from my old iphone to the new one?  If I will do "synchronization" through itunes with the old phone and the plug in the new one will that be the case?

    Follow the instructions in this article to transfer your info: iPhone: Transferring information from your current iPhone to a new iPhone

  • I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date is created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date  created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    The Finder reports File information. The date and time of the photo are in the Photo's Exif metadata. The Finder has no awareness of this. All photos apps on any system do.
    Regards
    TD

  • I just lost my iphone5 in a foreign country. Was not able to register it with icloud and have not installed the findmy iphone app. How can i wipe out my data remotely without these setups? Please help!

    I just lost my iphone5 in a foreign country. Was not able to  previously register it with icloud and have not installed the findmy iphone app. How can i wipe out my data remotely without these setups? Is there any good app i can use to track it? Please help!

    No, nothing you can do to track it if you did not take any measures before the loss.

  • How can I link table KONV with table VBRP and VBRK using KSCHL field?

    Hi experts,
    How can I link table KONV with table VBRP/VBRK using KSCHL field so that items are fully filtered?
    Thanks,

    Hi,
    If you do not want to specify it as hard code, then define a variable for it if you want to pass the value for it from the selection screen so that it will be dynamic. Code will be as follows.
    select-options: x_KSCHL for T685l-KSCHL.
    select kwert
               kbetr
               knumv
               kposn
               kschl
          from konv
          into CORRESPONDING FIELDS OF TABLE it_konv
          FOR ALL ENTRIES IN it_all
          where knumv = it_all-knumv
          and   kposn = it_all-b_posnr
          and   kschl in x_KSCHL. "Dynamic Selection as per the selection screen input
      endif.
    Hope this helps.
    Regards,
    Chandravadan

  • How can i filter just te equipment with date to 31129999 ??

    Hi ,
    How can i filter just te equipment with dateto 31129999 ??  i need just the valid equipment with dateto 31129999 but this char i cant take it to filter, how can i do this?

    In the Update tab of the InfoPackage, you can select the Time-Dependent data. In this, if you only want to extract Equipment Master Data Attributes or Master Data Text for effectivity dates of current date through 31-Dec-9999, you can create a routine for the time interval by updating it as such:
      CONSTANTS: c_max_date TYPE d VALUE '99991231'.
      p_datefrom = sy-datum. "Current Date
      p_dateto   = c_max_date. "Max Date

  • I have new 2T iomega external HD (Mac Companion) - my Mac (2.8 GHz i7 - Lion OS) will not recognize HD if hooked up with Firewire, but it does recognize if hooked up via USB - how can I get it to recognize with Firewire?

    I have new 2T iomega external HD (Mac Companion) - my Mac (2.8 GHz i7 - Lion OS) will not recognize HD if hooked up with Firewire, but it does recognize if hooked up via USB - how can I get it to recognize with Firewire?

    Try a different FW800 cable and also try doing a SMC reset. If neither work try another FW800 device to see if it's recognized, if it is then  you know it's not the Mac it's probably the EHD.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Wait 15 seconds.
    Attach the computers power cable.
    Wait another 5 seconds and press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • How can i extract the particular data from Base tables

    Hi
    I have some Base R/3- Tables . I need to exact the data from these base tables.
    But i need to select some type of datarecords(eg: select Material Documents from MSEG and MKPF tables based on movement types 261,262).
    Something like that . So how can i select the particular category datarecords from base tables. Anyway im going to create the Custom DataSource.
    So please let me know . how can i extarct tha particular data from base tables
    kumar

    Hi Venkat
    See i have some 5-tables . I need to extarct from these tables.
    first i need to extract the data from one table fully.
    Then i need to extarct the data from second table based on profict centers, company codes of first table.
    Then i need to extract the data from third table based on profict centers of first table and movement type = 2p,2n,2s condition.
    So how can i extarct like this data from multiple tables.
    Please let me know
    kumar

  • How can I continuous​ly streaming data to disk with 1MHz sampling rate with PCI 6110?

    I can only save 3 seconds data with 1MHz sampling rate using PCI 6110. Is it possible to continuously save longer time data (say 1 minute)?
    Many thanks

    if the binary file is big the ASCII file is very very very big.
    1 measurement is coded in a I16 => 2Bytes ( 4bit is not used 611X is 12bit
    card)
    if you use +/-1V range the quantum is (2 * 1V) / 4096 = 0.0004883V or 0.4883
    mV you need to use 8 digits minimum.
    And If your binary file is 1 Mo your ASCII file is 4 Mo.
    You can use this VI for inpiration you need to add the translate I16 to DBl
    to make a real value before saving.
    For Help you can mail inthe newsGroup.
    I'am a french user and my english is not good Sorry..
    Fabien Palencia
    Ingenieur d'etude ICMCB CNRS
    "StephenZhou" a ?crit dans le message de news:
    506500000005000000A5AF0000-1031838699000@exchange.​ni.com...
    > Hi, Fabien Palencia
    >
    > The program is great.
    Do you happen to know how to convert the big
    > binary file to ascii file? Thanks
    [Attachment recup data I16.vi, see below]
    Attachments:
    recup_data_I16.vi ‏57 KB

Maybe you are looking for