How to remove carraige return from the field while loading external table

I am facing an issue of not getting rid of carraige returns present in the fileds of the source .csv file while loading the records into external table.
I had tried using LRTRIM, but it does not help.
The error I am getting is:
KUP-04021: field formatting error for field POPULATION_DESCRIPTION
KUP-04037: terminator not found
I am pasting one record out of the .csv file which is causing this error as below:
"Business Card Accounts
",123,7 BizCard - Gamers,Control,"Business Card Accounts
",75270,75271
You can see the carraige return in the 1st field as well as 5th field. Filed are separated by commas & eclosed by double quotes.
Could anybody help on this please?

Can you copy the file to an external table only version, and then dos2unix it?
Alternatively, you can use the ACCESS PARAMETERS area in your external table definition to set that your RECORDS DELIMITED BY carriage returns, instead of the default.
Check out the example here http://www.psoug.org/reference/externaltab.html

Similar Messages

  • Remove carriage returns from a field in an oracle table

    I have a field that is defined as a LONG in my oracle table; the data contained in this field has carriage returns/line feeds (it's free form text); as i'm selecting data from this field, i need the carriage returns removed so that the data from this field all appears on one line.
    I tried using the TRANSLATE function to convert the carriage returns to something else, but that doesn't work.
    Example:
    Select comment from Notes:
    COMMENT
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant to confirm app"
    How can i do this? Can the decode function be used to remove the carriage returns in this field?

    when i used translate its giving correctly,
    SQL> ed
    Wrote file afiedt.buf
    1 select translate('the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5 How can i do this? Can the decode function be used to remove the carriage returns in this field
    6* ',' ') from dual
    SQL> /
    TRANSLATE('THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONF
    the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant t
    SQL> ed
    Wrote file afiedt.buf
    1 select 'the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5* How can i do this? Can the decode function be used to remove the carriage returns in this field
    SQL> /
    'THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONFIRMAPPTHIS
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4
    How can i do this? Can the decode function be used to remove the carriage returns in this field?
    SQL>

  • How to remove available downloads from the list

    how to remove available downloads from the list without it resuming when i open itunes or check for available downloads?

    There is not a way to remove them from the list.  Just let them download, and then delete them from your library when they are done.

  • How to remove SD Card from the Card Reader slot - Satellite A100?

    Hi,
    Is there anyone to help me? I inserted a 64 MB SD card in the card reader slot of my Toshiba A100 model. It's the first time i have inserted the card. The card is inside the slot. I can not take it out! I don't have any idea how to remove the card from the card reader slot. I can see the contents of my SD card, can open the files too. But how to remove it out from the slot. Please help me giving your idea to remove the card out from the slot.
    Arjun

    Hi
    In my knowledge the SD card slot doesnt has a any additional helps like the PCMCIA slot to remove the card.
    You have to remove it simply. Try to grab the card and move it out. You can try to use the pair of tweezers. Maybe it helps

  • How to remove unused objects from the webcatalog In OBIEE11g

    Hi,
    I want to delete unused objects from obiee11g catalog, i know in obiee10g it's working fine (i.e: we can do it via manage catalog then delete the unused objects) is there any way to do it automatically like RPD utility --->removing unused objects from Physical layer in RPD
    fyi: I don't want to delete manualy. i need somethink like button/link to find unused objects(report,filter,folder..etc) from my obiee11g catalog.
    Thanks
    Deva
    Edited by: Devarasu on Nov 29, 2011 12:06 PM
    Edited by: Devarasu on Nov 29, 2011 3:15 PM

    Hi,
    Checked with Oracle Support team and confirmed below points
    --> incorporated into the Current product and consider as BUG it may resolve future release
    --> Currently there isnt any automatic method to remove the unused objects like reports, filters,folder etc from catalog.
    Treated as Bug
    Bug 13440888 - AUTOMATICALLY REMOVE OF UNUSED CATALOG OBJECTS FROM WEBCATALOG
    FYI:
    SR 3-4984291131: How to remove unused objects from the webcatalog in obiee11g
    Thanks
    Deva

  • HT2500 Does anyone know how to remove a group from the address panel in mail?

    Does anyone know how to remove a group from the address panel in mail?

    I haven't seen too many questions like this on this forum.  Did you also try the photoshop forums?

  • Return code 471 is returned from the server while saving a crystal report

    Hi All,
    The return code 471 is returned from the server while saving a crystal report.
    Could some one give me a solution how to overcome this problem and to save my crystal report.
    Thanks
    Jiten

    Hi Jitendra,
    request you to provide the complete error message along with the work-flow to reproduce the error and the version of both the Crystal Reports Designer and Enterprisee installed on the server.
    Regards,
    Jayendra.

  • How to remove link content from the link structure field

    Hi,
    I created a UDF as Link struture in marketing document title to link external file. After file has been linked to the UDF and saved, how do I remove it to empty the field? I tried to point to the field and right click, but couldn't find any function to remove the link.
    KC

    Press ALT + Double Click to remove the Link content from the UDF

  • How to remove characters/lines from the beginning of an InputStream

    Hi,
    I have a program which receives several InputStreams. From each of these streams I have to remove 2 lines from the beginning. After the lines are removed, all the streams are combined to one with SequenceInputStream and read in one chunk. Is there an easy/simple way of doing this?
    One option I thought would be to read the char by char until 2 end of line chars have been detected and then read the rest of the data to a buffer. And the create a ByteArrayInputStream out of this buffer. Problem with this approach is, that the amount of data can be large, so putting all the data in to memory might cause problems.
    Another option is to use BufferredInputStream and use the readline() method twice to get rid of the lines that are not needed. After this I would write the data to some output stream, which is then converted back to input stream. Propably would work, but sound too much of work for a simple thing like this. There has to be better way.
    To make it simple, what I need is a method that looks like the following, or something similar
    *  Removes n number of lines from the beginning of a InputStream.
    *  @param is InputStream where the lines are removed
    *  @param numberOfLines int value to indicate how many lines whould be removed
    *  @return InputStream where lines have been removed.
    public InputStream removeLines(InputStream is, numberOfLines);Thanks.

    Here's the code, feel free to use it. Comments are also welcome.
    public InputStream removeLinesFromTheBeginning(InputStream is, int numberOfLines) throws IOException
              char c = 'c';
              int i = 0;
              for(int n = 0 ; n < numberOfLines ; n++)
                   do
                        c = (char)is.read();
                        System.out.print(c);
                        if(c == (char)-1)     // end of stream reached before any newline characters were found.
                             return null;
                        i++;
                   while(c != '\n');
                   System.out.println();
                   System.out.println("Characters removed:" + i);
                   System.out.println("n: " + n);
                   i = 0;
              return is;
         }Edited by: dave_spaghetti on Jun 16, 2009 5:42 AM
    Fixed a bug.

  • HT2905 How to remove duplicate songs from the iPhone when the duplicates are not listed in the iTunes library on the computer.

    How can I remove duplicate songs from the iPhone4. The duplicates are not listed in the computer iTunes library.

    The simplest thing may be to back-up and then restore the iPhone. If you don't fancy that then remove all media that is currently synced to it, then double check and manually remove any media that remains on the device, before reselecting your sync options.
    If you've been manually managing the device and your library doesn't contain copies of all your media then see Recover your iTunes library from your iPod or iOS device.
    tt2

  • Veeam - How to remove a drive from the rotated hard drive media pool

    Does anyone know of a way to remove a drive from the media pool of the rotated drive media repository?
    I accidentally added one to the repository and now I want to get it out of there so Veeam Backup & Replication  does not try to backup to a drive that is normally full.
    This topic first appeared in the Spiceworks Community

    Hi Frank, and a warm welcome to the forums!
    There still is that paper clip hole, but on some G4s you have to remove the faceplate or even drive to do it.
    Does it boot into Open Firmware with CMDOption+of ?
    http://docs.info.apple.com/article.html?artnum=42642
    Boot into Open Firmware and eject If you have a Mac that will not startup properly and has a stuck disc, try booting into Open Firmware by holding down Command, Option, O key and F key during startup. After booting into Open Firmware, type the command eject-cd.

  • How to remove numeric value in the fields of a table

    Environment: SQL Server 2008R2
    Tools: MSMS
    Code:
    a. Table Definition 
    USE [DLPT_CMS1_RESTORE]
    CREATE TABLE [dbo].[Mocha]
    [id] [int] IDENTITY(80,1) NOT NULL,
    [Login_ID] [char](10) NULL,
    [PE4] [varchar](8000) NULL,
    [PE9] [varchar](8000) NULL,
    [PE11] [varchar](8000) NULL,
    [PE15] [varchar](8000) NULL,
    [PE17] [varchar](8000) NULL,
    [PE20] [varchar](8000) NULL,
    [PE22] [varchar](8000) NULL,
    [PE25] [varchar](8000) NULL,
    [PE28] [varchar](8000) NULL,
    [PE29] [varchar](8000) NULL,
    [PE27] [varchar](8000) NULL
    b. data
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293595,293595,293737,293737,293737,293737,293737,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293841,293841,293841,293841,'293841 I feel that the product should be more holistic'
    ,'293841 I would like for the customer support to give more immediate feedback'
    ,'293841 Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss',
    293841,293841,293841,293841,293841,293841)
    Challenge: 
    1. Delete / Remove login_ids from a string found in one or more of the fields in Mocha table 
    Example: the following string contains login_id '293841 I would like for the customer support to give more immediate feedback' , remove the login_id in the narrative field which could be PE4, PE22. or PE28
    2. Count the response or narrative field for each column after the deletion is completed 
    My script and still working progress
    SELECT * FROM MOCHA
    WHERE ISNUMERIC(PE4) = 1 and [PE4] like '%[0-9]%'
    Thanks for the support

    I added a new data which shows inaccurate results using your last updated code. The mistake appears in the 3rd row culomn name PE25 is null but counts it as 1 
    CREATE TABLE [dbo].[Mocha]
    [id] [int] IDENTITY(80,1) NOT NULL,
    [Login_ID] [char](10) NULL,
    [PE4] [varchar](8000) NULL,
    [PE9] [varchar](8000) NULL,
    [PE11] [varchar](8000) NULL,
    [PE15] [varchar](8000) NULL,
    [PE17] [varchar](8000) NULL,
    [PE20] [varchar](8000) NULL,
    [PE22] [varchar](8000) NULL,
    [PE25] [varchar](8000) NULL,
    [PE28] [varchar](8000) NULL,
    [PE29] [varchar](8000) NULL,
    [PE27] [varchar](8000) NULL
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293737,293737,293737,293737,NULL,293737,NULL,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],
    [PE15],[PE17]
    ,[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293841,293841,293841,293841
    ,'293841 I feel that the product should be more holistic'
    ,'%%293841%% I would like for the customer support to give more immediate feedback'
    ,'%%293841%% Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss'
    ,293841,NULL,NULL,293841,293841)
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293735,'293735 my name',NULL,NULL,NULL,NULL,NULL,NULL,'%%293735%%I dont think',293735,293735,'this helps to fight free radicals and ward off disease')
    select
    Replace(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE4
    ,Replace(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE9
    ,Replace(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE11
    ,Replace(Replace([PE15],RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE15
    ,Replace(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','')PE17
    ,Replace(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE20
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE22
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE25
    ,Replace(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE28
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE29
    ,(case when len(PE4)-Len(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe4] is null or Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP4
    ,(case when len(PE9)-Len(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe9] is null or Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP9
    ,(case when len(PE9)-Len(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe11] is null or Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP11
    ,(case when len(PE15)-Len(Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe15] is null or Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP15
    ,(case when len(PE17)-Len(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe17] is null or Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP17
    ,(case when len(PE20)-Len(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe20] is null or Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP20
    ,(case when len(PE22)-Len(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe22] is null or Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP22
    ,(case when len(PE25)-Len(Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe25] is null or Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP25
    ,(case when len(PE28)-Len(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe28] is null or Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP28
    ,(case when len(PE29)-Len(Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe29] is null or Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP29
    from mocha

  • How to remove namespace link from the output XML

    i have to remove 'xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions"' (namespace) from the output xml file which is generated from the BIP. I need my output XML file without that namespace link, this namespace link is coming for each element.
    Anybody know how to do that please help.
    output xml file
    <?xml version="1.0" encoding="UTF-8" ?>
    <Reports version="2.00">
    <deliveryNote xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <subjectId />
    </deliveryNote>
    <deliveredReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <referDate>[Delivery note->H4]</referDate>
    </deliveredReports>
    <simpleReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <numberOfReports>2</numberOfReports>
    <nReport>
    <reportName>Xyz</reportName>
    <reportVersion>1.0</reportVersion>
    <observations>
    <numberOfObservations>15</numberOfObservations>
    <columnObservation>
    <y>9</y>
    <rO>
    <x>14</x>
    <o>11</o>
    <o>21</o>
    <o>121</o>
    </rO>
    </columnObservation>
    </observations>
    </nReport>
    </simpleReports>
    </Reports>
    my xslt file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions" >
    <xsl:output method="xml" encoding="UTF-8"/>
    <xsl:template match="/">
         <xsl:element name="Reports">
              <xsl:attribute name="version">2.00</xsl:attribute>
                   <deliveryNote>
                        <subjectId></subjectId>
                        </deliveryNote>
                   <deliveredReports>
                        <referDate>[Delivery note->H4]</referDate>
                   </deliveredReports>
                   <simpleReports>
                        <numberOfReports>2</numberOfReports>
                        <nReport>
                                  <reportName>Xyz</reportName>
                                  <reportVersion>1.0</reportVersion>
                                       <observations>
                                       <numberOfObservations>15</numberOfObservations>
                                       <columnObservation>
                                            <y>9</y>
                                            <rO>
                                                 <x>14</x>
                                                      <xsl:for-each select="TEST_XML/LIST_R1/R1">
                                                           <o><xsl:value-of select="xdoxslt:lpad(COL1,10,' ')"/></o>
                                                      </xsl:for-each>
                                            </rO>
                                       </columnObservation>
                                       </observations>
                             </nReport>
                        </simpleReports>
              </xsl:element>
    </xsl:template>
    </xsl:stylesheet>

    Please post the same in BI Publisher forum
    BI Publisher
    Thanks,
    Vino

  • OSB: how to remove soap envelope from the $body

    Hi,
    In Assign activity when i assign: xquF1:url-decode(fn-bea:serialize($body),"UTF-8") = variable1,i am getting:
    $variable1 =
    <soap-env:Body      xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
         <MESSAGE>
    <aa>12</aa>
    <bb>34</bb>
    </MESSAGE>
    </soap-env:Body>
    How should i remove 'soap-env:Body' from the above xml. I need only:
    $variable1 =
         <MESSAGE>
    <aa>12</aa>
    <bb>34</bb>
    </MESSAGE>
    Kindly advise how to acheive the same.
    Thanks in advance.
    Edited by: user9223904 on Apr 17, 2013 2:25 AM
    Edited by: user9223904 on Apr 17, 2013 2:26 AM

    just use $body/* and you will have what u wanted.

  • How to remove -ve sign from the deduction wagetype in payslip

    Hi Experts,
    Plz tell me how i can remove the -ve sign from the deduction column in
    the Payslip.
    Regards
    TS

    Hi ,
    Do you just have to show the sign different in payslip and the RT .
    Coz what it seems is that the RT is having a negative WT , so in order to make it positive you goto
    PE51 , enter the form you are using and change the cumulation id for deduction wage type .
    Hope this helps.
    Regards,
    SureshP

Maybe you are looking for