Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change data type on all char(36) columns in db
Message
De
04/09/2013 21:42:57
 
 
À
04/09/2013 21:30:48
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01582234
Message ID:
01582236
Vues:
47
I'm literally thinking as I'm typing (dangerous combination).

If you queried sys.columns....

select * from sys.columns where max_length = 36 and system_type_id = 175

I "think" that would give you the columns. Now, you'd have to take the object_ids and join to sys.tables to get the table names.

It would seem to me that any loop to construct a full script would use that at the beginning.

Again, just a partial idea, but maybe that can help...(I'd be tempted to write a short .NET program to iterate through the rows and generate a t-sql script)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform