Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Truncating a table
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01525264
Message ID:
01525368
Vues:
43
>Hi,
>
>I am going through a testing phase of converting a VFP database to SQL Server database. And I expect to have to truncate SQL tables maybe several times as I fix problems. But what happens is on the first truncate (even when ALL tables of SQL Server have no records) I get message that "truncate cannot be executed because table has FOREIGN KEY constraints". I understand that it is logical not to allow breaking of a foreign key constraint but the tables have no records/rows. Therefore at this point there should not be (at least IMHO) a reason not to allow truncate. What am I missing? TIA.

This blog post
http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/MSSQLServer/delete-all-data-in-database-when-you-hav

solves this problem.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform