473,406 Members | 2,847 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,406 software developers and data experts.

Looking for help with a query

Jay
I have 2 tables related by an id

1)
id bigint(20) unsigned
url text

2)
site bigint(20) unsigned
word text

How can I find all of the records in table 2 where there is no record in
table one with an id=site ? I have orphaned words in the second table I
actually want to delete.

TIA,
Jay
Jul 20 '05 #1
2 1496
Jay wrote:
How can I find all of the records in table 2 where there is no record in
table one with an id=site ? I have orphaned words in the second table I
actually want to delete.


select site, word
from table2 left outer join table1 on table2.site = table1.id
where table1.id is null;

Bill K.
Jul 20 '05 #2
"Bill Karwin" <bi**@karwin.com> wrote in message
news:cg*********@enews1.newsguy.com...
select site, word
from table2 left outer join table1 on table2.site = table1.id
where table1.id is null;

Bill K.


Many thanks,
Jay
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dawnunder | last post by:
eg. Someone fills out 3 fields. (There will be more but this is just to give you an idea) 1. Country? 2. State? 3. City I want this script to generate a web page and list the people by
2
by: Alex | last post by:
Subject: Looking for an XML (database-based) Query Reporting Tool/advice First off, let me apologize if this thread is somewhat off topic... PLEASE REPLY TO: xml@solex-bi.com I am looking...
4
by: Diamondback | last post by:
I have two tables, WIDGETS and VERSIONS. The WIDGETS table has descriptive information about the widgets while the VERSIONS table contains IDs relating to different iterations of those widgets...
1
by: neptune | last post by:
At my company customers tend to change contracts in the middle of the month. I need a query that will match 1 customer to 1 contract. If the customer changes contracts before the 15th of the...
5
by: kadidarm | last post by:
Hi I have just started to make a Bill of Material Program (BOM) for my self using Microsoft Access 2003. I am looking to make a recipe database. The problem I am having is this: I have a table...
13
by: Maxi | last post by:
I have a table (Table name : Lotto) with 23 fields (D_No, DrawDate, P1, P2,.....P21) and it has draw results from 1st Sep 2004 till date. I have another table (Table name : Check) with 15 fields...
3
by: Rodney Garland | last post by:
Hi All, I am a relative beginner to Python and am looking for help with sending and XML message and getting back a return file. The server is: https://node.deq.state.or.us/node/node.asmx I...
3
by: Sam Durai | last post by:
Here is a small testcase of the problem which I'm facing in prod env. db2 =describe table tab1 Column Type Type name schema name ...
2
by: iboff | last post by:
Hi, here is my problem looking for this query that could help me. I have a table paquet_product that has the following fields: paquet - product 10 - 1 10 - 3 10 - 5 20 - 1
2
by: BD | last post by:
Hi, all. I'm trying to implement a REFRESH IMMEDIATE MQT to help with performance of a particularly sluggish query. I cannot create it with REFRESH IMMEDIATE, because of reason code "10",...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.