Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Use Conditional Delete using SQL
Message
De
28/02/2014 14:50:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01595554
Message ID:
01595557
Vues:
35
Thanks Madam
Regards

>>Hi,
>>
>>I have a cursor with three columns. Detail, POSC, POSR
>>I am Deleting records from it like This
>>
>>
>>Delete From ABC  Where ;			
>>			posC=0 Or ;
>>			posR=0 Or ;
>>			posR>posRTOPMOSTVALUE Or ;
>>			GETWORDNUM(POS,Getwordcount(Alltrim(POS))-3)='(Page'
>>
>>
>>
>>I want to Delete Based on above critera, however I Do not want to Delete one record having Detal="ENDP" although it is having corresponding value of posR=0 or posC=0
>>
>>i.e I want to delete all posc, posr etc based on above but not the record having DETAIL="ENDP"
>>
>>What additional condition I need to Add on the above
>>
>>Regards
>>
>>
>>
>>
>>
>>
>>Using the above SQL for Delete
>
>
Delete From ABC  Where ;			
>			(posC=0 Or ;
>			posR=0 Or ;
>			posR>posRTOPMOSTVALUE Or ;
>			GETWORDNUM(POS,Getwordcount(Alltrim(POS))-3)='(Page') AND NOT Detail = 'ENDP'
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform