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


SSIS 2008 - Pivot transformation and DT_NText Datatype


SSIS 2008 - Pivot transformation and DT_NText Datatype

Author
Message
AllaboutSQL
AllaboutSQL
SSC-Enthusiastic
SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)

Group: General Forum Members
Points: 187 Visits: 105
Hi,

Has anyone ever tried using a column with dt_ntext datatype in the pivot transformation for ssis 2008?
I am trying to use it and it gives me the following error -

Error at DFT - Load and Pivot DAta [Pivot[[40]]: The Input column "DataSubmitted" (2818) cannot be used as a Set Key, Pivot Key or Pivot Value because it contains long data.


If i use DT_WSTR it works fine but I need to use Dt_Ntext as length of the incoming data is not defined and I need to scope that in my ssis package.

Any help would be highly appreciated.. I am literally stuck here

Thanks..
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63336 Visits: 13298
Will the length ever be greater than 4000?
If not, you can just take DT_WSTR with a length of 4000.
Not great for package performance, but using a PIVOT isn't either :-)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
AllaboutSQL
AllaboutSQL
SSC-Enthusiastic
SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)

Group: General Forum Members
Points: 187 Visits: 105
I cannot use dt_Wstr because the length is expected to be more indefinite, which definitely can be 4000 characters. I think my only out with this will be to write some sql code to pivot the data rather than using the ssis pivot transformation. But it really is strange that SSIS pivot transformation doesn't support dt_ntext datatype :?
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63336 Visits: 13298
As long as the length is not more than 4000 characters, DT_WSTR shouldn't be a problem. Varying length is not an issue.

DT_NTEXT is BLOB (or CLOB, not sure) data, so it has all kinds of restrictions. Most likely because it's not that easy to inspect it's contents.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
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