Flat File Source Changing String Values When it Shouln't

  • Hi all,

    I had a csv file that loaded a table with one-time values. The table contains a list of URL links that will be iterated through at a later time. In the csv file that the links originally came from, they looked like:

    http://www20.statcan.gc.ca/tables-tableaux/cansim/csv/002600081-eng.zip

    However, after these links are loaded into a table called tblTable_And_Links, the dashes ("-") are removed and I'm not sure why. I just looked at the Data Flow Task and it seems to be at the Flat File Source with regards to this changing. I thought that when I connect to a flat file source that no alterations are made hence the reason I have attached a Data Conversion transformation to change certain properties of the flat file source. I'm confused.

    Regards:
    Mordred
    Keep on Coding in the Free World

  • What method are you using to load the data from the CSV files to your table?

    ---

    Note to developers:
    CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
    So why complicate your code AND MAKE MY JOB HARDER??!:crazy:

    Want to get the best help? Click here https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help (Jeff Moden)
    My blog: http://uksqldba.blogspot.com
    Visit http://www.DerekColley.co.uk to find out more about me.

  • Hi derek.colley and thanks for the response. As it turns out, I performed a find/replace on what I thought was one column but instead replaced all "-" characters from all columns. I wrote the macro this time to find and replace from just one column and now my issues are resolved.

    Regards:
    Mordred
    Keep on Coding in the Free World

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

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