By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

DELETE Statment Problem in VB6

P: 14
Does Anyone know how to code this example in DELETE STATEMENT?

Table1 , Table2
field1 , field2 , field1 field2
22 , aaaa , 22 , aaaa
22 , bbbb , 22 , cccc
22 , cccc , 22 , bbbb
33 , ssss , 33 , ssss
33 , xxxx , 33 , xxxx

Suppose I'm going to delete all records from Table2 using Table1.Field1 as reference.All 22 in Table2 must be deleted. How to code this one?
Dec 28 '07 #1
Share this Question
Share on Google+
4 Replies


QVeen72
Expert 100+
P: 1,445
Hi,

Which field of table2 is linked with table1's which field....?

Regards
Veena
Dec 28 '07 #2

P: 14
Hi,

Which field of table2 is linked with table1's which field....?

Regards
Veena

table2.field1 linked to table1.field1

thanks
Dec 28 '07 #3

debasisdas
Expert 5K+
P: 8,127
try this

delete from table where field1=the value form field1 of table1
Dec 28 '07 #4

QVeen72
Expert 100+
P: 1,445
Try this :

Expand|Select|Wrap|Line Numbers
  1. Delete From Table2 Where Field1='22'
  2.  
Regards
Veena
Jan 2 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.