Empty fields and null values

  • This should be an easy one, but seems to be stumping me this afternoon. I have a textfile with several columns of numeric or blank values. The table allows ints or nulls only. So, these blank fields need to be changed to null values instead of copied directly. Is there an easy way to do this? The text file is tab delimited.

    Thanks!

  • This was removed by the editor as SPAM

  • Have you tried using BCP (cf. BOL) to import the file's data into a table and then updating the columns as required

    e.g. UPDATE TableName

    SET Col1 = null WHERE Col1 = ''

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

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