When exporting data from SQL server 2005 to csv files, columns do not align properly.

  • Hi All,

    I want to migrate data from SQL server 2005 to Company owned database.

    I created csv files but some columns have special characters and it causes non alignment in the columns thereby changing all the values.

    I was thinking of directly transfer whole SSQL server 2005 database to our private database. Can it be done? how?

    Or

    Is there any other way I can keep the values in the column intact?

    Pls advice.

  • What kind of database is the private database? you could probably use SSIS to do it. Or a Linked Server...

  • Are you using quotes around the values in the export? How lengthy is the field(s) that is causing the issue? How are you creating the files?
    If migrating a database is your trade here then consider the SSIS task built just for that. (Transfer database task). Note this will not transfer the permissions, you can recreate those at the destination or employ the Transfer Logins task.

    ----------------------------------------------------

  • MMartin1 - Friday, January 13, 2017 1:25 PM

    Are you using quotes around the values in the export? How lengthy is the field(s) that is causing the issue? How are you creating the files?
    If migrating a database is your trade here then consider the SSIS task built just for that. (Transfer database task). Note this will not transfer the permissions, you can recreate those at the destination or employ the Transfer Logins task.

    Thanks for the reply Martin.
    Actually I just want some of the tables out of database.
    So this is a Summary Field value Eg: 

    From: annabellin@google.com; Re: (APPROVUA0172630) The Big 5 - 10/21/2009 - 'GTG' - need more info | please kindly help as this i
    please kindly help as this is an urgent case
    | thanks
    | Annabel
    |
    | On Wed 

     So this is one cell value(205 char/256) but it came on next couple of rows which disturbed the whole format of the csv file.
    I did use Quote strings options and I created file through Select the grid->Copy->Right click ->Save as Results to .csv file.

    Regards,
    Sayli

  • I would think that you already have a copy of these tables from the most recent backup. What is the "private" database that you want to migrate only some tables to? (Remember referential integrity is broken if this sub set of tables rely on others that you may not be migrating). 

    If you right click your database > tasks > export ... it opens up a wizard. Has this not helped?

    ----------------------------------------------------

  • MMartin1 - Friday, January 13, 2017 5:20 PM

    I would think that you already have a copy of these tables from the most recent backup. What is the "private" database that you want to migrate only some tables to? (Remember referential integrity is broken if this sub set of tables rely on others that you may not be migrating). 

    If you right click your database > tasks > export ... it opens up a wizard. Has this not helped?

    Nope.. it dint help.. 🙁
    And private database is nothing but company specific.So its a file system where we are gonna dump all data and then there is company specific query engine through which we query that data.

    So, I have basically dumped my working csv files there( which do not have the above format problem) and after querying, it works fine and I can see all the data, but not for the above file as csv file is broken.

    Regards,
    Sayli

  • What is the exact data type of that one field that stores the email message body? Does your new private database support the XML type?

    ----------------------------------------------------

Viewing 7 posts - 1 through 6 (of 6 total)

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