Microsoft SQL Server
--
Questions
--
Followers
Top Experts
I keep getting this error where it takes the excel data and tries to insert into SQL server table.
The Excel source is selecting hard coded text into the two columns.
--------------
So sample SQL for Data Flow Excel Source is:
SELECT '12345' as accountnum,
      'the test account' as fundname,
      * from [SHEET!$A:$B]
Error Message:
"...columns cannot convert between unicode and non-unicode string data types."
--------------
I try to add a "data conversion" dataflow object and choose  DT_STR (string) and DT_WSTR (Unicode string).
The SQL table two columns are varchar(20) and varchar(max). I have no idea how to fix this, i tried changing the columns to nvar on the SQL table, but that didn't work either.
Please help!
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
SELECT Â convert(varchar(50), '12345') as accountnum,
   'the test account' as fundname,
   * from [SHEET!$A:$B]

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
SQL:
SELECT Â Â CONVERT([varchar](255), 'TEST') AS Name, CONVERT([varchar](20), '8292') AS AcctNum, CONVERT([varchar](255), 'Chicago') AS Location from [SHEET$A:$D]
That Data Conversion trick didn't work either. I manage to get around it by defaulting the column values in the table since it was unique and also a script that updates the table following the other columns are inserted so it isn't using excel as the source.
Thanks for all your help guys!
Microsoft SQL Server
--
Questions
--
Followers
Top Experts
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.