Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete query
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00539028
Message ID:
00539070
Views:
13
>I tried to run this query
>
>delete from claim_detail where;
>claim_detail.line = claims02.Line and;
>claim_detail.claim_num = claims02.claim_num
>
>This query seems to be running but does not delete the rows. I know this query should delete 140 records as this select query.
>
>select claim_detail.* FROM claim_detail, claims02;
>where claim_detail.line = claims02.line and;
>claim_detail.claim_num = claims02.claim_num into cursor curDelete
>
>returns 140 records. Actually these 140 records I want to delete from the claims_detail table.
>
>Thanks for your concern
>Bhushan

Do you have key field in both these tables? If yes, then:
delete from claim_detail where KeyID in (select keyID from curDelete)
should do it.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform