Jack Corbett (3/4/2014)
Can you post the code you are using. I just tested using this:
DECLARE @data NVARCHAR(MAX) = 'EXEC Proc_gen @PsID=12, @kID=-1, @ID=3183';
SELECT @data AS theData ,
REPLACE(@data, ' ', '') AS dataNoSpaces;
Granted I tested on SQL Server 2012, but I'm not aware of any changes to the REPLACE functionality between 2005 and 2012.
I don't have access to a 2005 server to test on and I don't think I want to spin up a VM just for that.
I ran your code on both 2005 and 2008r2. Much as we both expected, it worked just fine and produced the same results.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/