And here is a way to fetch the data. There might be a better way...I just pulled this together off the top of my head:DECLARE @sql nvarchar(max) = 'SELECT ', @table_name varchar(50) = 'myTable'SELECT @sql = @sql + COLUMN_NAME + ', ' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @table_name AND DATA_TYPE = 'varchar'SET @sql = LEFT(@sql, len(@sql)-1) + ' FROM ' + @table_nameEXEC sp_executesql @sql
- LumbagoMy blog-> www.thefirstsql.com