Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

count column length input csv file

$
0
0

hey guys,

I am trying to insert data from an input csv file to a sql database.

my csv is an identic match with my database in amount columns and the naming of them, but i added 2 extra columns in my database with isvalid (default value = true) and a column errordescription ( default value = "" )

I am trying to input everything from my csv towards my database table, all my fields are nvarchar(64) in the flatfile i changed the data type to the unicode string so everything should work.

Now my problem is I am trying to add validation to my dataflow task to check if the length is not > 64. What i want to do is when a field has a bigger value then 64 I want to replace this field with an empty string and update my last 2 columns Isvalid = false and errordescription = column x is bigger then 64.

Is this possible in SSIS ? Also how can i check the length of my input CSV fields so my script would know this  field > 64, transform it to an empty string.

Thanks in advance,

Kimmiez


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>