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.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question