Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from ...select issue
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Delete from ...select issue
Divers
Thread ID:
01254242
Message ID:
01254242
Vues:
56
Hi All,
i've syntax like below ,
main target deleting records from main table (user01) which is not matching records on userforms table.
Below codes running but not happens :( exactly first SQL finds the differences between two table but last codes doesnt
delete records from user01 tables , where is the wrong ? or how can i delete records from user01 table that doesnt match records as crsDiff01 cursor records ?

TIA
lcSource01=[user01]
lcTarget01=[userforms]

&& finding not exist records in user01 tables as userforms table
Select * From (m.lcSource01) Where formName Not In ;
	( Select formName From (m.lcTarget01) )  ;
	inTO Cursor CrsDiff01 Readwrite NOFILTER

If _Tally # 0 && 
	Select user01
	Delete From user01 where CrsDiff.formName=user01.formName in user01
	Tableupdate(2,.T.,[user01])
	Messagebox([Records has been deleted from user rights table that doesnt matching user rights items table..],64,[Info],3)
Endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform