• This is the solution that you want to use. VARCHAR(MAX) can be as large as any TEXT datatype and is superior in virtually every respect. You can add all of the other columns onto this statement:

    [Code]

    Select distinct Col1Name

    , Col2Name

    ...

    , CAST(TextColName as Varchar(MAX)) as [TextColName]

    , ...

    into table_remove_dups

    from table_A

    [/code]

    If you really want to keep the TEXT in the output (though I strongly encourage you to move to Varchar(MAX)), this this should work:

    [Code]

    Select Col1Name

    , Col2Name

    ...

    , CAST(TextColName as TEXT) as [TextColName]

    , ...

    into table_remove_dups

    from (Select distinct Col1Name

    , Col2Name

    ...

    , CAST(TextColName as Varchar(MAX)) as [TextColName]

    , ...

    from table_A) as A

    [/code]

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]