New line duplicated when import from Excel

An SQL server (2014) field of type nvarchar(MAX) is populated directly by pasting data copied from Excel.
In corresponding Excel cell there are several "\r\n" (CR/LF), but after pasting it seems like each "\r\n" is duplicated. How to paste and get the same number of "\r\n" as the originating cell value ?

Thanks and I must admit that my description of import above was wrong:
The description above stated "...populated directly by pasting data copied from Excel..."
Actually I used SSIS import (by starting the wizard from Management Studio: Right click Database and choosing Tasks/Import Data... which starts DTSWizard.
So the problem was actually showing up when using SSIS import...
On the other hand, when directly pasting the same data (by using something like Management Studio, right click Table and choosing "Edit Top 200 rows"), only the first line (the text before the first "\r\n") is kept and prepended by a
double quotation mark (") which is a loss of data and of course an even bigger issue.
And silly me, my statement was wrong again (and all the time).
I was fooled by C# (theStringFromDatabase.Split("\r\n".ToCharArray());) actually returned with the empty strings (lines) between the "real" lines, don't understand why though.

Similar Messages

  • I get a Pre-execute error message when importing from Excel using the wizard.

    Hello, I get the following pre execute error message(see below) when I try to import a table from Excel when using the wizard. I wrote my own code in the edit window. i noticed after writing it that the data types did not appear changed in the mappings window.
    Can anyone explain what these errors mean and how they can be solved. Thank you.
    Operation stopped...
    - Initializing Data Flow Task (Success)
    - Initializing Connections (Success)
    - Setting SQL Command (Success)
    - Setting Source Connection (Success)
    - Setting Destination Connection (Success)
    - Validating (Success)
    Messages
    * Warning 0x80049304: Data Flow Task 1: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available.  To resolve, run this package as an administrator,
    or on the system's console.
    (SQL Server Import and Export Wizard)
    - Prepare for Execute (Success)
    - Pre-execute (Error)
    Messages
    * Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Unspecified error".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "The metadata could not be determined because every code path results in
    an error; see previous errors for some of these.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Invalid object name 'dbo.PriceTable$'.".
    (SQL Server Import and Export Wizard)
    * Error 0xc0202040: Data Flow Task 1: Failed to open a fastload rowset for "[dbo].[PriceTable$]". Check that the object exists in the database.
    (SQL Server Import and Export Wizard)
    * Error 0xc004701a: Data Flow Task 1: Destination - PriceTable$ failed the pre-execute phase and returned error code 0xC0202040.
    (SQL Server Import and Export Wizard)
    * Information 0x4004300b: Data Flow Task 1: "Destination - PriceTable$" wrote 0 rows.
    (SQL Server Import and Export Wizard)
    - Executing (Success)
    - Copying to [dbo].[PriceTable$] (Stopped)
    - Post-execute (Stopped)
    frustrationmultiplied

    Hello,
    Are you willing to try other ways to do the same?
    http://www.excel-sql-server.com/excel-import-to-sql-server-using-linked-servers.htm
    http://support.microsoft.com/kb/321686 (Distributed queries)
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Error when importing from Excel in SAP

    Hello experts,
    My gets error when importing price list using the import form Xl menu :
    (-1200) DBMCconnBase::EndTransaction SQLEndTran sqlState 08S01, nativeErr: 0, errText:[Microsoft][SQL Native Client] Communication link failure
    This happens only when connected with SAP Client, it never happens when connected in terminal server directly on SAP server.
    Server 2003, MSSQL 2005 SP2
    SAP 2007 Sp01 PL08 HF01
    This has always been working before, it has stopped working when he changed the motherboard 3 weeks ago. Nothing else have changed.
    Any idea where to look at?
    Thanks!
    Chris

    hello Gordon,
    Thanks for your answer. that would have probaly fix the issue
    my techs fixed the issue by doing the 2 following thinks, i don't know if only one of them would have fix it.
    1. in the boot.ini file there was a /3G in the end, restricting the memory to 1G for the OS. The tech deleted it.
    2. in management studio, the technician changed the memory reserved for sql from 9/12 to 14/16Gb
    there was probably not enough RAM available for the import.
    since that change it works well.
    Thanks again!
    Christophe

  • Import from Excel not escaping quote (')

    Hi,
    I'm having problems with text fields in an Excel spreadsheet that contain single quotes (') not being escaped when the insert commands are built using the Import from Excel wizard.
    It's pretty much the same problem as that described in the post below (but for importing Excel spreadsheets):
    <Re: DDL in the SQL tab does not escape apostrophes
    SQLDev 1.2.1.32.00
    WinXP SP2
    Excel 2003
    Any chance of getting this fixed?
    Thanks,
    Simon

    OK, so have updated to
    SQLDev 1.2.1.32.13
    and still see problem when importing from Excel.
    The generated SQL looks like this:
    insert into INV_CONTAINERS (CONTAINER_NAME) VALUES('Tetramethylethylenediamine, N,N,N',N'-');
    That's supposed to be just one item in the VALUES term.
    Is there another way to do this? If not, how do I lodge this as a bug?
    Simon

  • Can someone help me change the line width of my numbers table, its not set to thin or none and its stuck on .25. its a spreadsheet i imported from excel.

    Can someone help me change the line width of my numbers table, its not set to thin or none and its stuck on pt25. its a spreadsheet i imported from excel.

    MR,
    Apparently the import wasn't a good one.
    The best option at this point might be to start a new table. Insert a new Table, Copy the old table cell range, select the first cell in the new table and Edit > Paste and Match Style. This will throw out all the old formatting. A bit of work, but a nice clean start.
    Jerry

  • Data Import from Excel for Items

    I have used the data import for items, in the past , to import the prices for existing item. I am using this for the first time in SAP version 9.0. There are new fields due to the additional currencies. In an running a test with two items and two price list codes, code 1 and code 10. When I run the import gets stuck in a loop and keeps giving me errors on line 1 with invalid price code.
    I want to import two price lists Price List 1 and Price List 10. For example I want price list 1 to be $10.00 and price lit 10 to be $5.00
    In the import from excel I have the following fields
    A  Item Number
    B  Price List Code
    C  Unit Price - Primary Currency
    D  Primary Currency
    E  Unit Price - Additional Currency 1
    F  Additional Currency 1
    G  Unit Price - Additional Currency 2
    H  Additional Currency 2
    I  UoM Code
    J  Price List Code
    K  Unit Price - Primary Currency
    L  Primary Currency
    M  Unit Price - Additional Currency 1
    N  Additional Currency 1
    O  Unit Price - Additional Currency 2
    P  Additional Currency 2
    Q  UoM Code
    I am using the following columns
    A item number
    B 1
    C 10.00
    J 10
    K 5.00
    This is the way I use this function in SAP versions 2007 and 8.8
    Any suggestions
    Dennis

    Hi Gordon,
    I tried what you suggested, but does not work. I tried with two items, when I run the import SAP gets stuck in a loop displaying error lines. The only way to stop is to restrt SAP.
    I attched a screen shot of the error

  • Data Import from Excel - Users Logged on

    Hello all,
    I am new the forums and am learning SAP from a user and administrator perspective so please excuse if some of my questions seem obvious.  I appreciate everyone's help very help
    I have the task of setting up two new company profiles in addition to our current one.
    I am at the stage of importing Item Master and Business Partner data.
    1) What is the preferred method?  DTW vs. Import from Excel?  Is one more suitable then the other for this purpose?
    2) The help file for importing via excel states "If SAP Business One is running on a network, you have ensured that other users will be logged off the system during the import."  Could someone please explain:
    - What are the risks of running DTW or imports while users are logged in?
    - If users are logged into the live version of our company but I am testing DTW/excel imports from a TEST copy of that company are there still risks or is this okay?
    - If users are logged into one database but I am performing data imports on a different company database (for example I would be the only one logged into the companies currently being set up - is this okay even though users are logged into SAP server but accessing a different company?)
    Thanks very much!
    Richard

    Hi Kiwi,
    Referring to the Rules of enagement you have to post one thread per question. Please adhere to the rules from your next post.
    DTW is the very much Preferred method you have simulation to see if you record are find to be imported before importing to the DB, using DTW Import from Excel will only help importing  BP and Item master data. If you have to make any updates then it will be a task again. In DTW you can save the template and keep adding data and changes can be updated from the template and re-imported
    Please refer to the link below to "Differences between the Import From Excel and Data Transfer Workbench templates" the screen shots for DTW are from version before 2007A SP01 PL09.
    [http://wiki.sdn.sap.com/wiki/display/B1/DifferencesbetweentheImportFromExcelandDataTransferWorkbenchtemplatesandwhathappenswhentheyare+interchanged.]
    1. When users are logged on It can cause some inconsistency, ensure no user is logged on the live DB before performing any major DTW import
    2. It will be ok if you are Test importing data to test DB on the same SQL server.
    Regards,
    Rakesh N

  • SQL Developer: import from Excel bug

    SQL Developer 1.1.2.25 Build MAIN 25.79
    This is a test for import from Excel.
    Test table:
    create table bla
    (x number null,
    y varchar2(1) null);
    Excel data:
    x y
    1 a
    2 b
    3
    SQL Deveoper generates:
    Error at line 3:insert into BLA (X,Y) VALUES(3,'NULL')
    IMPORT into table BLAcomplete
    Inserted 2rows.
    Failed to insert 1rows.
    SQL Error:ORA-12899: value too large for column "BCRCEK"."BLA"."Y" (actual: 4, maximum: 1)
    I think there is a bug, because there must be generated NULL without apostrophe.
    insert into BLA (X,Y) VALUES(3,NULL);

    Hi Barry,
       That's[b] GREAT NEWS !!!.
       So, i just update current release 1.1.2.25 to 1.1.2.25.79 ?
    Thanks for the great work.
    Zack
      Oops !!! Am already using 1.1.2.25.79, same as bcrcek above. So need to wait for Patch Release ?
    Regards
    Zack
    Message was edited by:
            Zack.L                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Import from Excel to Project - blanks cells are having dates automatically added

    Hi. I'm very new to Project but have started setting up a Roadmap using it which is working fairly well so far, although have hit one snag.
    I have data in Excel: it is a list of projects with 4 columns containing the dates of various stages (planning, initiate, execute, close). I have created a reusable map so this can be imported into Project and the Gantt chart to show pre-defined markers
    on the timeline for each stage on each project row. All well and good so far.
    However, not all of the projects in Excel have all of their dates defined. E.g. a project might not yet have a close date. But when this is imported into Project a date gets applied for it. I have no idea why!
    How do i get the import into Project to allow any blank cells from Excel to remain as blank so that nothing is plotted on the Gantt chart for that particular section?

    Thanks for both of your replies. I have tried this and the same issue occurs. I have checked each row in the imported Project data and they are all showing as set to 'manually selected' yet at some point in the import Project is adding data to blank cells.
    I have retried using a simple test excel sheet and when this too is mapped into Project, any blank cells get populated with the date that appeared in the preceding row for some reason:
    I can then go through and manually delete this cell in Project (which then replaces it with an "NA") - but if i have to manually do this whenever importing from Excel into Project then it makes it very time consuming.
    Surely there must be a way for Project to not auto-populate blank cells? Or am i missing something fundamental?

  • I am unable to receive texts on my new LG G2 when sent from some other iPhones

    I had an iPhone 4 and switched to LG G2 android.  I am unable to receive texts on my new LG G2 when sent from some other iPhones.  I've done everything Sprint and Apple have suggested - turned off imessaging, made sure the contact info on the other iPhones is plain mobile numbers, deactivated my iCloud account.  Nothing is working.  Anybody have any suggestions?

    See this support document http://support.apple.com/kb/TS5185. If you have done everything there, then look at the last line which says to get in touch with Apple Support. This is not Apple support, this is a user to user forum. Call Apple support based on your location with information from this support document. http://support.apple.com/kb/HE57

  • How Can I Delete Originals I Don't Care to Keep When Importing From SD Card?

    Hi All,
    Just installed LR3 thanks to Santa. Have been going thru the video tutorials as well as the Lightroom_3_Help PDF and Lightroom-GettingStarted_Lo PDF but I can't figure out how to simply delete files from the gitgo when importing from SD Card or from my HDD (files already moved to HDD but not yet culled or imported into LR3). I was hoping I could, in LIBRARY, just r/c on a file that is plainly not worth keeping and just delete it so I dont have to do it later. Seems like I could, this way, be able to concentrate more on the shots requiring editing.
    Also, need suggestions as to how I should import my files using DNG, Copy, Move, or Add. First off, I am not a working pro but am an occasional serious amateur. I'm picky and I like things to look good the first time and I like options.  The pix already on my HDD are in the PICTURES folder; those imported from SD card get moved to that PICTURES folder. I have, in the past, moved the processed verssions to a different DESTINATION folder - now I still have the originals and I have processed copies to post and share.
    I understand that LR3 does ND editing but I assume that if I only keep a DNG then any time I want a JPEG or PNG of a picture I have to open LR3 to make one. Since I only have been shooting a few hundred pix a year (though with my new D5000 this will change) I am not gonna load up my HDD any time soon. So, is there a way I can make a DNG file, keep the original RAW or JPEG file AND save a processed JPEG or PNG copy in my DESTINATION folder in one swell foop?
    Thanks in advance,
    Phil in San Diego

    Phil,
    PhilipCWells wrote:
     I understand that LR3 does ND editing but I assume that if I only keep a DNG then any time I want a JPEG or PNG of a picture I have to open LR3 to make one. Since I only have been shooting a few hundred pix a year (though with my new D5000 this will change) I am not gonna load up my HDD any time soon. So, is there a way I can make a DNG file, keep the original RAW or JPEG file AND save a processed JPEG or PNG copy in my DESTINATION folder in one swell foop?
    The LR Exchange site has three plug-ins that allow you to keep a "mirror" copy of your DNG/RAW images in JPG format for use by others without having to go into LR and generate them when needed.  The link is:
    http://www.adobe.com/cfusion/exchange/index.cfm?searchfield=tree&search_exchange=25&search _category=-1&search_license=&search_rating=&search_platform=0&search_pubdate=&num=25&start num=1&event=search&sticky=true&sort=0&rnav_dummy_tmpfield=&Submit=
    One of them should help you with this.
    Jeff (in San Diego as well)

  • How to add a new line item when i click on UPDATE in orderpage B2B webshop?

    Hi Gurus,
    I need to add a new line item based on some condition when i click on update in the order page in b2b web shop. Is there any way to pass some parameters to the BADI crm_isa_basket_items and create a new line item when i update? If so can you please tell the parameters that i need to pass to the badi.
    Any help will be highly appreciated!!!!!
    Thanks in advance,
    Lakshman.

    You can put condition when you call java script function while clicking on "update" button.
    On order.jsp  update button call "submit_refresh()" java script function. You can check your condition over here.
    You can find this function in "orderTools.js" file.
    And when you enter item in last line on order page and click on the update button it will automatically add new empty lines on your order page as per your selected new line items from drop down box.
    Or may be you can call your custome action class when you click on update to check particular condition.
    I hope it will help you.
    Thanks and Regards.
    eCommerce Developer

  • Issues with importing from excel

    I have been running into a several issues with importing from Excel.
    First my configuration
    I am running SQL Developer ver 1.5.5 Build MAIN-5969
    I am on a Windows XP Professional Version 2002 with Service Pack 3
    I am importing into an Oracle 10g database.
    1. SQL Developer doesn't work on Excel 2007, I have to save all my files into Excel 97-2003 format before I can use them.
    2. If I run into an error loading and stop the process, SQL Developer doesn't release the Excel file and I get a sharing violation if I try to save the spreadsheet without closing SQL Developer.
    3. I have found that I have to set print area to the area I want to work with, otherwise the import wizard tries to keep adding rows.
    4. When using the Import wizard, it keeps adding commas on fields with numerics unless I specify the column in excel as text. Currently the column is formatted as General in the spreadsheet or I can change the wizard format to say the column is an integer, but it actually is just a code field with numeric characters so it may have leading zeroes that I need to keep.
    This might be related,
    I have a column in excel defined as text but only contains numerics. It is of length 4, but the wizard sets a precision of 5 with a datatype of VARCHAR2. If I try to change it to 4, I get an error saying the field is not large enough. Yet, when I do a LEN on the column, it only gives me a 4. I have other fields in the same sheet that a 3 position numeric and 2 position numeric and those are fine. I am thinking this is related to the comma being inserted in a numeric field for anything greater than 3 positions.
    5. Importing excel dates to oracle dates doesn't work. I have to convert the excel date column to text then import as a VARCHAR, then convert to Date once in the database.
    6. The default of nullible is not set on any columns and I have to set them before the import. (I would prefer it set to nullible and I have to uncheck the box to make it not nullible. I would prefer to import all of the data and then deal with the nulls after they have been pulled in)
    7. When I select header columns included it uses that as the column names. Is it possible to do the name length check then? It has bit me a few times where I try to import and forget to check the name length and then I get an error when I start running the import.
    8. If one of the columns to import has all nulls, then the precision comes out to 0 and if it isn't changed an error occurs on import. Could this situation default to a precision of 1?
    9. It would be nice if there was a completion message displayed and a cancel option while running.

    On point 3.
    I have a column in excel that consists of numbers. 4 digit numeric codes. Ex, 1111, 2345, etc
    The column's format is general. It displays as just 4 numbers.
    When I start the wizard initially, the column appears with data as 1,111, 2,345, etc, on the Data Preview screen.
    It determines the precision to be 5 on the column definition screen.
    If I change the precision to 4 then continue, that field will error out when I verify with "not big enough to hold the data in source columns"
    If, I change the excel column to a TEXT column.
    Excel still displays as 1111, 2345, etc
    The wizard then displays the same data 1111, 2345 on the Data Previeiw screen
    Yet, when I get to the column definition screen it still sizes it as a 5
    If I change it to a 4, I get the same error when verifying.
    If I leave them alone as 5, then it processes just fine.

  • When importing from a Word document placing the text in InDesign

    When importing from a Word document placing the text in InDesign I can only see the text from the first page of the Word document. I have increased the number of pages in the Indesign document to more than what is in the Word document, still only text from the first page is shown. What am I doing wrong or did I not set a setting correctly?

    When you want to auto flow text while placing, hold down the Shift key when clicking with the Place cursor on the first page. New pages will be generated and text will be auto flowed using the margins set up on the master page.

  • Error Message in Data IMport from Excel

    Hi All
    Please can you help - I am trying to import some BP data using the option in the menu Administration - Data Import/Export - Data Import from Excel.
    I have created my import file as a text file and provided the relevant mappings. Having located my text file, I then get the following error message:
    Row Number 1:Internal error (-2007) occurred.
    Has anyone got any ideas as to what this means I've done wrong?
    Thanks

    Dear, 
    Kindly refer to note 1296487 below:
    Symptom
    In attempt to import a Business Partner from an Excel file to SAP
    Business One, the following error messages are displayed and the
    Business Partner is not imported:
        o  When there are no House Banks in the company, the following error
           messages are displayed:
        Row Number 1: Internal error 'House Bank Accounts' occurred,
    and,0 Records imported successfully.
         o  When there are no Payment Methods in the company, the following
            error messages are displayed:
         Internal error 'Payment Methods for Payment Wizard' (OPYM)
    (-2007) occurred, and, 0 Records imported successfully.
         o  When Payment Methods and House Bank are defined in the company,
            the following error messages are displayed:
         Row Number 1: Internal error (-2007) occurred, and,
         0 Records imported successfully.
    Other terms
    DB, export, BP
    Reason and Prerequisites
    Application error
    Solution
    SAP intends to provide patches in order to solve described problem.
    The section Reference to related Notes below will list the specific
    Patches when available.
    The corresponding Info file of Patches on SAP Service Marketplace will
    show the correction / SAP Note number also.
    Be aware that these references can only be set at Patch release date.
    SAP will deliver Patches only for selected Releases at its own
    discretion, based on the business impact and the complexity of the
    implementation.
    If it is your case, We would like to inform you that we plan to fix the problem you raised,
    in patch 05 for SAP Business One 2007 A FP01 / SP01 Release.
    For SAP Business One Patch Delivery Schedule please look at:
    http://service.sap.com/smb/sbo/patches
    Best regards,
    Apple

Maybe you are looking for

  • Replacement Hard Drive

    Hi I have replaced my internal hard drive on my MacBook with a Western Digital Scorpio Black 750GB 2.5" SATA, I did a direct restore using the Disk Utility. The machine boots up but it seems to take a lot longer to boot up now, anyone got any suggest

  • CS4 Clone Stamp and Dodge/Burn not Working

    CS4 clone stamp is kaput. Flattening image does not help. Source region shows in the cursor circle when pointing to target region, but when I left-click and hold, the target region shows, and cloning does not occur. Tried resetting the tool, no help.

  • Trouble updating to v2.2.1

    I have been trying to update my ipdod touch from v2.1 to v2.2.1. The download seems to go along fine but after a long time I get a message that says the network connection timed out and I see an error code of 3259. I know the connection has not timed

  • Does SIRI need location service switched on

    Hi, I am trying to sort my location services out... Does SIRI need this to be switched on ? Thanks

  • Slow performance from Premiere Elements 10

    Hi guys, I recently purchased Premiere Elements and Photoshop Elements 10 to edit some wedding video.  I am experiencing some slow performance with the software (and random lockups for that matter).  My CPU usage shows nearly nil when using the progr