SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


import TEXT file into varchar(max)


import TEXT file into varchar(max)

Author
Message
Regan Galbraith
Regan Galbraith
Old Hand
Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)

Group: General Forum Members
Points: 383 Visits: 265
Hi all,

It's another work day, which means it's another question from the bemused...

I have a flat file source - a text file that will contain an undefined about of text. I want to import the entirety of that into a varchar(max) column. Currently I'm trying to do this in SSIS, using SSIS compoent, but I'm have a few issues - a couple of complaints about conversion from str to text (according to the component, it seemed to think that varchar(maz) = text. I cahnged the target column to a varchar(8000), and it worked. That's not going to be a solution, since I'm pretty certain we are looking at > 8000 characters.

Is there another way, or am I going to have to sink to using an SP, giving it the path to a file, and doing all the work 'outside' SSIS?

I've tried:
1> Text Source to SQL Destination
2> Import Column task

am I missing the boat again?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search