sql server - Custom query converts dt_wstr in nchar sql type -


i create in ssis custom query:

select top 1 *  (select * [dbo].[tyrepoints]) [reftable] ([reftable].[brand] ? or [reftable].[brand] = '*')  order [reftable].[priority] desc 

the "?" replaced dt_wstr(20) variable , [reftable].[brand] nvarchar(20) field in db.

when check result of query sql profiler :

exec sp_executesql n'select top 1 *  (select * [dbo].[tyrepoints]) [reftable] ([reftable].[brand] @p1 or [reftable].[brand] = ''*'') order [reftable].[priority] desc',n'@p1 nchar(20)',n'test                ' 

why ssis converts dt_wstr type in nchar?

how can have result nvarchar type?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -