importing a CSV file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank

    importing a CSV file


    I have a CSV file that i need to import into a SQL table. The problem
    is the values in the first column are not brackited in "". There are
    over 700K rows. Is there an easy way to fix the data or have SQL
    correctly import the the data?

    The data looks like this

    1, "xxx","zzz"
    2, "aaa","bbb"
    an so on...

    Thanks
  • Erland Sommarskog

    #2
    Re: importing a CSV file

    Frank (darkwarmbreeze @yahoo.com) writes:
    I have a CSV file that i need to import into a SQL table. The problem
    is the values in the first column are not brackited in "". There are
    over 700K rows. Is there an easy way to fix the data or have SQL
    correctly import the the data?
    >
    The data looks like this
    >
    1, "xxx","zzz"
    2, "aaa","bbb"
    an so on...
    Which version of SQL Server? Which import tool do you want to use? I could
    give the answer for BCP, but if that is not what you are using, it would
    not help you...


    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server 2005 at

    Books Online for SQL Server 2000 at

    Comment

    Working...