Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DELETED() in SELECT statement with>1 table cannot be do
Message
From
28/02/2002 07:24:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/02/2002 19:10:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00626109
Message ID:
00626290
Views:
10
>Help!
>
>SELECT last,first,enter,left,st,myOtherTable.descr;
> FROM myTable INNER JOIN myOtherTable ;
> ON myTable.id=myOtherTable.id ;
> WHERE (ENTER<=CTOD('02/01/02') AND UPPER(St300.st)="A" AND DELETED()=.F.) ;
> OR (LEFT>CTOD('02/01/02') AND ST300.ST='I' AND DELETED()=.T.))
>
>
>where DELETED() refers to whether or not the corresponding record in myTable is marked for deletion.
>
>The above statement does not work. Does anybody know a workaround?
>Thanks all!

As Sergey writes, deleted records should be treated as non-existent.

Just use SET DELETED ON to omit deleted records.

Also note that deleted() = .T. is equivalent to deleted(), and deleted = .F. is equivalent to not deleted.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform