Forum Replies Created

Viewing post 1 (of 2 total)

  • RE: SQL to list the headers in a table?

    Create function [dbo].[AF_TableColumns](@table_name nvarchar(55))

    returns nvarchar(4000) as

    begin

    declare @str nvarchar(4000)

    select @str = cast(rtrim(ltrim(column_name)) as nvarchar(500)) + coalesce('' + @str , '')

    from information_schema.columns

    where table_name = @table_name

    group by table_name, column_name, ordinal_position

    order by...

Viewing post 1 (of 2 total)