export then import records whos fields contain crrlf

  • My name is Ed and I am a newbie 🙂

    I have 65k records in a MS SQL 2005 database. The records were created by SysInternals BGInfo. When I moved from an Access database to MS SQL I was able to do the 'query all, copy and paste'. Now I want to export the records into a delimited file which can be imported into MySQL database on a thumbdrive.

    Thanks for any and all assistance.

    BTW I have googled for everything I could think of. Most all responses assume I am going MS to MS.

    Ed

  • Ed i don't know if this is much help, but in the past when i wanted to get a table that had a field which contained CrLf, i ended up putting the data in a temp table, Replacing the field that had CrLf with "~#" for each CHAR(13) + CHAR(10), then exporting it out with bcp.

    that file then followed the expected rules of one record ending in CrLf, and then i ran a replace to put the CrLf back after importing into Oracle (in my case). Since i did not have access to the server, i could not make a linked server to it, so i had to import it in with the bulk tools Oracle provides.

    maybe that can give you one way to tackle it.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply