when i tried this:
DECLARE @var nvarchar(500) collate Arabic_BIN
i got that:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'collate'.
that is the full code, it works, i do not know how but the person who give it to me have used it successfully
CREATE FUNCTION fn_RemoveTashkeel (@InputString nvarchar(2300) )
RETURNS nvarchar(2300)
AS
BEGIN
DECLARE @OutputString nvarchar(2300) COLLATE Arabic_BIN
DECLARE @TashkeelChr char(8) COLLATE Arabic_BIN
DECLARE @feed int
SET @OutputString=@InputString
SET @TashkeelChr='ًٌٍَُِّْْْْْ'
SET @feed=1
WHILE @feed<=LEN(@TashkeelChr)
BEGIN
SET @OutputString=REPLACE(@OutputString,SUBSTRING(@TashkeelChr,@feed,1),'')
SET @feed=@feed+1
END
RETURN(@OutputString)
END