473,396 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DELETE Statment Problem in VB6

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
4 1287
QVeen72
1,445 Expert 1GB
Hi,

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

Regards
Veena
Dec 28 '07 #2
elbatz
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
8,127 Expert 4TB
try this

delete from table where field1=the value form field1 of table1
Dec 28 '07 #4
QVeen72
1,445 Expert 1GB
Try this :

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

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

Similar topics

2
by: Gert Schumann | last post by:
I want to delete just parts of tables, so I can't use 'TRUNCATE'. As I want to delete about millions of lines, I need a very big rollback segment. The best way would be to delete without using...
2
by: Brian | last post by:
Hi there I want to creat a SQL statment that deletes all records but the first 7 i have tried DELETE FROM dbtable LIMIT 8,100 but it didn't work, what is the corret way?
5
by: Jona Schuman | last post by:
Hi, there was a memory leak in a programming assignment that I'm working on. The problem seems to have been a syntax error in a delete statment: delete V1, V2; //where V1 & V2 are pointers to...
6
by: Mark Kurten | last post by:
for some reason when i delete a row, the row doesn't get deleted from the acutal data table in SQL server. my code follows what am i missing? thanks. Dim row As DataRow Try
0
by: isaac2004 | last post by:
im trying to make a page that reads simple user information and posts them to a table. the user can edit, delete and add new records, through a form on the page.using SQLs modifications like...
1
by: sjoshi | last post by:
Hello I had a question reagrding MSDTC usage. I know that MSDTC will enlist each connection transactions as it's own (take ownership) and commit/abort accordingly. However I'm not sure what...
1
by: zeebiggie | last post by:
Good morning I have a form with the controls in the insert statment below. table1 has an Auto increment primary key hence is omitted in the insert statment and form. Am getting the error It didnt...
7
savanm
by: savanm | last post by:
Hi all... Wt's the difference between truncate and delete Anything other than this Truncate is a DDL statment Delete is a DML statment Truncate, drops the table then recreate it Delete,It...
8
by: Michel Esber | last post by:
Hello, Env: DB2 V8 LUW FP16 running Linux create Table X (machine_id varchar(24) not null, ctime timestamp not null); create index iFoo on X (MACHINE_ID, CTIME) allow reverse scans; alter...
0
by: mesut | last post by:
Hi, I'm using LINQ.. and I would like to understand if it's a bug or not in LINQ... I've a situation like: I'm reading all records via "Select" Statement and a specific select statment #1...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.