Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete records
Message
From
25/09/2006 07:13:54
 
 
To
25/09/2006 07:02:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01156848
Message ID:
01156861
Views:
22
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform