• Lowell,

    That was just the ticket!

    The select StripNonAlphaNumeric(name) produces exactly the ASCII without the UNICODE NULLs embedded. The update also seems to work in the testing I've done so far!!!

    For applying it to the entire table, I wanted to limit it to just the affected rows, so I use the earlier nested selects to narrow it down:

    update my_user_table

    set name=dbo.StripNonAlphaNumeric(name)

    WHERE ID in

    (select DISTINCT B.id FROM

    (select id, name, N as Position,

    SUBSTRING(name,N,1) As TheChar,

    ASCII(SUBSTRING(name,N,1)) TheAsciiCode

    from my_user_table

    CROSS APPLY (SELECT TOP 255 ROW_NUMBER() OVER (ORDER BY (SELECT NULL) -1) AS n

    FROM sys.columns) MiniTally

    WHERE MiniTally.n BETWEEN 0 AND 255

    AND MiniTally.n < LEN(name)+1) B

    WHERE B.TheAsciiCode=0)

    We have these UNICODE NULLS infecting many of the columns in many of our tables. I'm going to write a stored procedure that utilizes this function to programmatically clean every column in every table. I'll update this thread with my solution soon.

    For now, though, I wanted to let you know how much I appreciate the people who have helped me in this thread. I am HUGELY appreciative. Thank you so much.

    mtf