Click here to Skip to main content
15,885,870 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to build a dynamic script to update column with datatype xml to nvarchar(max) in few tables in Sql?

My script right now is as follows:
SQL
select @ColumnList= @ColumnList+','+
     column_name 
    from information_schema.columns  where
     table_name = @TableName  and DATA_TYPE not in ('timestamp')
Posted
Updated 15-Jul-15 4:04am
v2
Comments
Wendelius 15-Jul-15 10:44am    
Do you mean change the type of a column from XML to nvarchar or what does updating mean?
Alex345098 15-Jul-15 11:14am    
cast that column alone with xml data type to nvarchar after fetching the entire columns of the tables in DB
Wendelius 15-Jul-15 11:22am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900