dbTalk Databases Forums  

Data Flow Task - Converting DT_NTEXT To DT_STR

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Data Flow Task - Converting DT_NTEXT To DT_STR in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lloyddsilva@gmail.com
 
Posts: n/a

Default Data Flow Task - Converting DT_NTEXT To DT_STR - 07-12-2007 , 08:31 PM






Hi Guys,

I'm currently using SSIS to copy data from a source table, change some
of the datatypes and pump it into a destination table.

The problem I'm facing is with conversion of an NTEXT field to a
VARCHAR field in the destination.

What I'm doing right now is:

Step 1: Extract From Source (OLE DB Source). The data comes in as
NTEXT
Step 2: Data conversion from DT_NTEXT to DT_TEXT
Step 3: Data Conversion from DT_TEXT to DT_STR
Step 4: Pump into destination VARCHAR column (OLE DB Destinations)

The above works, but i dont think its the neatest way to do it.

I was wondering if anyone could help me combine step 2 and step 3 into
a single step.. or if there is a better way that I'm supposed to use
to convert ntext to varchar.

Any help would be really appreciated.

Thanks in advance.

Cheers, Lloyd


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Data Flow Task - Converting DT_NTEXT To DT_STR - 07-13-2007 , 01:46 AM






Hello lloyddsilva (AT) gmail (DOT) com,

The way you are going is the way to do it using the Derived Column Transform.
The page

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/d4e915cc-1c7b-4b2e-93b0-13a8b0cb9242.htm

Shows us that DT_NTEXT to DT_STR is an illegal cast so we have to go through
the step of DT_TEXT

So in a Derived Column transform I might do this for a column named "Val"
that is DT_NTEXT

(DT_STR,20,1252) (DT_TEXT, 1252) [Val]




--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

Quote:
Hi Guys,

I'm currently using SSIS to copy data from a source table, change some
of the datatypes and pump it into a destination table.

The problem I'm facing is with conversion of an NTEXT field to a
VARCHAR field in the destination.

What I'm doing right now is:

Step 1: Extract From Source (OLE DB Source). The data comes in as
NTEXT
Step 2: Data conversion from DT_NTEXT to DT_TEXT
Step 3: Data Conversion from DT_TEXT to DT_STR
Step 4: Pump into destination VARCHAR column (OLE DB Destinations)
The above works, but i dont think its the neatest way to do it.

I was wondering if anyone could help me combine step 2 and step 3 into
a single step.. or if there is a better way that I'm supposed to use
to convert ntext to varchar.

Any help would be really appreciated.

Thanks in advance.

Cheers, Lloyd




Reply With Quote
  #3  
Old   
lloyddsilva@gmail.com
 
Posts: n/a

Default Re: Data Flow Task - Converting DT_NTEXT To DT_STR - 07-13-2007 , 02:50 AM



Hi Allan,

Thanks for much for the help.

Cheers, Lloyd

On Jul 13, 2:46 pm, Allan Mitchell <al... (AT) no-spam (DOT) sqldts.com> wrote:
Quote:
Hello lloyddsi... (AT) gmail (DOT) com,

The way you are going is the way to do it using the Derived Column Transform.
The page

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/d4e915cc-1c7b-4b2e-93b0-13a8b0cb9242.htm

Shows us that DT_NTEXT to DT_STR is an illegal cast so we have to go through
the step of DT_TEXT

So in a Derived Column transform I might do this for a column named "Val"
that is DT_NTEXT

(DT_STR,20,1252) (DT_TEXT, 1252) [Val]

--

Allan Mitchellhttp://wiki.sqlis.com|http://www.sqlis.com|http://www.sqldts.com|http://www.konesans.com

Hi Guys,

I'm currently using SSIS to copy data from a source table, change some
of the datatypes and pump it into a destination table.

The problem I'm facing is with conversion of an NTEXT field to a
VARCHAR field in the destination.

What I'm doing right now is:

Step 1: Extract From Source (OLE DB Source). The data comes in as
NTEXT
Step 2: Data conversion from DT_NTEXT to DT_TEXT
Step 3: Data Conversion from DT_TEXT to DT_STR
Step 4: Pump into destination VARCHAR column (OLE DB Destinations)
The above works, but i dont think its the neatest way to do it.

I was wondering if anyone could help me combine step 2 and step 3 into
a single step.. or if there is a better way that I'm supposed to use
to convert ntext to varchar.

Any help would be really appreciated.

Thanks in advance.

Cheers, Lloyd



Reply With Quote
  #4  
Old   
sneha
 
Posts: n/a

Default RE: Data Flow Task - Converting DT_NTEXT To DT_STR - 03-30-2010 , 08:04 AM



hi

From http://search.yahoo.com/search?p=>+ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/extran9/html/d4e915cc-1c7b-4b2e-93b0-13a8b0cb9242.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.