Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete records
Message
De
25/09/2006 07:13:54
 
 
À
25/09/2006 07:02:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01156848
Message ID:
01156861
Vues:
24
Hi,
thank you for advice and code,
i get error message syntax error at..
DELETE FROM (ma) as original WHERE EXISTS(SELECT * FROM NEWADSL as copy WHERE copy.telno==original.telno)
>1. CLEAR EVENTS causes vfp to jump to any code after a READ EVENTS, therefore the DELETE is not executed at all. => removed that line
>2. if you want to adress the telno field, set lcField ="telno", not telno.
>3. xval2 is a string, in the delete you don't want to compare newadsl.telno to juststem(ma)+".telno" but to the value inside, therefore need an addtional eval(). Even better use an alias within the sql for the tables.
>plus several other issues.
>
>
>ma=JUSTSTEM(thisform.text1.value)
>USE (ma)
>*total = "8000"
>total = Val(THISFORM.TEXT2.VALUE)
>RAND(-1)
>INDEX ON RAND() TO SYS(2023)+'\RANDOM'
>COPY TO NEWADSL NEXT total
>SET INDEX TO
>ERASE SYS(2023)+'\RANDOM'
>DELETE FROM (ma) as original WHERE EXISTS(SELECT * FROM NEWADSL as copy WHERE copy.telno==original.telno)
>Pack
>
>
>Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform