Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Deleted() in SQL
Message
 
 
To
16/08/1999 23:19:03
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00254376
Message ID:
00254445
Views:
25
>>First, SET DELETED is OFF. Why does the following SQL not work?
>>select cust_num, emp_num from customer ;
>>   where customer.emp_num in ;
>>   (select empid from employee where deleted())
>
>HOw do you expect DELETED() to know which alias to check DELETED in? I made this mistake before, trying to use DELETED in a SQL query, and found that you can only depend on it when there is one and only one table involved in the query, so SLQ doesn't get confused. Also, specifying the alias: DELETED("Employee") doesn't work either... apparently something along the line breaks when you try to mix the VFP DML (DELETED()) with SQL.

Yeah, I had also tried deleted("employee") to no avail. I do however expect the subquery to run first and for SQL to properly interpret a simple and explicit select contained within the parentheses. Looks fairly straightforward to me.

Bottom line, I was just making sure I had not overlooked some obvious error in my syntax. However, I still see no reason why this should not work. I am going to try a more creative way later tonight.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform