Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete all
Message
From
31/03/2000 15:41:47
 
 
To
31/03/2000 15:35:30
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00353580
Message ID:
00353605
Views:
16
Ack! Correct. It should be changed to:

DELETE FROM table1 WHERE custno+city IN (SELECT custno+city FROM table2)

My second goof today. sheesh.


>John,
>
>That won't necessarily do what she wants, will it? Your record in question could match on custno in the first sub-select, but might match the city of another customer in the second sub-select.
>
>>DELETE FROM table1 WHERE custno in (SELECT custno from table2) AND city in (SELECT city from table2)
>>
>>
>>>I keep thinking that I'm missing the obvious and I'm getting lost in multiple SQL statements. Here's what I'm trying to do:
>>>
>>>I have two tables with the same structure. I want to delete all the records in the first table that match a record in the second table. The whole record doesn't have to match; just the custno and city.
>>>
>>>I've been doing SELECTs into temp tables and setting relations and just generally getting myself confused. I have the feeling that there's a simple solution that I'm missing.
>>>
>>>Anyone know what it is?
>>>
>>>Thanks,
>>>
>>>Michelle
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform