dbTalk Databases Forums  

2005 SSIS, SQL2Excel- varchar vs nvarchar

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


Discuss 2005 SSIS, SQL2Excel- varchar vs nvarchar in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter
 
Posts: n/a

Default 2005 SSIS, SQL2Excel- varchar vs nvarchar - 11-07-2006 , 08:23 AM






Hi folks,
I have a problem to dts a SQL table to an excel file.
from: in data flow window, select a table, with one column, type varchar
to: in data flow window, Excel destination, defining the excel
file's path
When I execute the package, I got one error "cannot convert between unicode
and non-unicode string dataset:.
Then, I created another project. The only difference was the table
column type - from varchar to nvarchar. The execution was completed
successfully.
Please advise. Thanks.
Peter

Reply With Quote
  #2  
Old   
Peter
 
Posts: n/a

Default RE: 2005 SSIS, SQL2Excel- varchar vs nvarchar - 11-07-2006 , 12:19 PM






I figured out by meself. The solution is add an Data control" in the middle
to convert "varchar" to "DT_WSTR". The later is unicode, used in Excel.
Peter

"Peter" wrote:

Quote:
Hi folks,
I have a problem to dts a SQL table to an excel file.
from: in data flow window, select a table, with one column, type varchar
to: in data flow window, Excel destination, defining the excel
file's path
When I execute the package, I got one error "cannot convert between unicode
and non-unicode string dataset:.
Then, I created another project. The only difference was the table
column type - from varchar to nvarchar. The execution was completed
successfully.
Please advise. Thanks.
Peter

Reply With Quote
  #3  
Old   
LoanXEngine
 
Posts: n/a

Default RE: 2005 SSIS, SQL2Excel- varchar vs nvarchar - 11-28-2006 , 01:58 PM



Peter,

I just ran into this same error... I'm sort of new at this. How do I add a
Data control to convert it properly...
--
alan


"Peter" wrote:

Quote:
I figured out by meself. The solution is add an Data control" in the middle
to convert "varchar" to "DT_WSTR". The later is unicode, used in Excel.
Peter

"Peter" wrote:

Hi folks,
I have a problem to dts a SQL table to an excel file.
from: in data flow window, select a table, with one column, type varchar
to: in data flow window, Excel destination, defining the excel
file's path
When I execute the package, I got one error "cannot convert between unicode
and non-unicode string dataset:.
Then, I created another project. The only difference was the table
column type - from varchar to nvarchar. The execution was completed
successfully.
Please advise. Thanks.
Peter

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

Default RE: 2005 SSIS, SQL2Excel- varchar vs nvarchar - 11-28-2006 , 02:42 PM



Hello LoanXEngine,

from the toolbox you can add a Data Conversion Transform to do the conversions
between datatypes.


Regards

Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com

Quote:
Peter,

I just ran into this same error... I'm sort of new at this. How do I
add a Data control to convert it properly...

"Peter" wrote:

I figured out by meself. The solution is add an Data control" in the
middle to convert "varchar" to "DT_WSTR". The later is unicode, used
in Excel. Peter

"Peter" wrote:

Hi folks,
I have a problem to dts a SQL table to an excel file.
from: in data flow window, select a table, with one column,
type varchar
to: in data flow window, Excel destination, defining the
excel
file's path
When I execute the package, I got one error "cannot convert between
unicode
and non-unicode string dataset:.
Then, I created another project. The only difference was the table
column type - from varchar to nvarchar. The execution was completed
successfully.
Please advise. Thanks.
Peter



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.