linked server query with nvarchar | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

linked server query with nvarchar

Hello there,
I have server A(2K5SP1) server B (2k5sp2). I have setup the linked server between them. I am running a Query on Server B it is not reutrning 2 values string. It is retuning only one. If I run same statement with VARCHAR insetad of nVARCHAR it is retutning correct result set. Is there any problem with linked servers with NVARCHAR datatype DECLARE @v_Survey_list nvarchar(4000)
SELECT @v_Survey_list =
COALESCE(rtrim(ltrim(@v_Survey_list)) + ‘, ‘, ”) + ”” + rs.Client_Survey_Code + ””
FROM SOMETABLE rs with(nolock)
WHERE rs.FIELD_ID = 9116
GROUP BY rs.Client_Survey_Code
SELECT @v_Survey_list
What is the data type of the Client_Survey_Code column? And for completeness – what is de collation of that column, and what is the default collation of your current database?
]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |