Query to get all the columns in a view
Why have one function for tables and a separate function for views? You can handle both just by removing the restrictive filter on type = 'u' (and actually you don't need sys.objects at all). Here is a rewrite with some other minor enhancements:

CREATE FUNCTION dbo.get_columns
(
  @object_name nvarchar(513) 
  -- needs to support Unicode!
  -- should pass schema.object
)
RETURNS nvarchar(max) -- can contain Unicode!
AS
BEGIN -- we don't need any variables
  RETURN 
  (
    SELECT STUFF((SELECT N', ' + name 
      FROM sys.columns WITH (NOLOCK)
      WHERE [object_id] = OBJECT_ID(@object_name)
      AND name &lt;&gt; N'row_timestamp'
      FOR XML PATH(''), TYPE).value(N'.[1]',N'nvarchar(max)'),1,2,'')
  );
END