473,387 Members | 1,502 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,387 software developers and data experts.

Queries --> Finding what is not in table 2 from the data in table 1

So if I were to take table 1 and relate it to table 2 (one-to-one), I
could then run a query which would display the records that are in
both tables.

I'm looking to run a query that would display the records in table 2
that are not in table 1. What is the easiest/best way to do this?

Thanks,

Ian

Jul 18 '07 #1
3 1437
Does this help?
http://www.fabalou.com/access/Queries/isnullquery.asp
john

"boston_dude" <ia********@gmail.comschreef in bericht
news:11**********************@e16g2000pri.googlegr oups.com...
So if I were to take table 1 and relate it to table 2 (one-to-one), I
could then run a query which would display the records that are in
both tables.

I'm looking to run a query that would display the records in table 2
that are not in table 1. What is the easiest/best way to do this?

Thanks,

Ian

Jul 18 '07 #2
select * from foo
where not exists
(
select * from bar
where bar.id = foo.id
)

boston_dude wrote:
So if I were to take table 1 and relate it to table 2 (one-to-one), I
could then run a query which would display the records that are in
both tables.

I'm looking to run a query that would display the records in table 2
that are not in table 1. What is the easiest/best way to do this?

Thanks,

Ian
Jul 19 '07 #3
On Jul 18, 9:17 pm, John Winterbottom <john...@rogers.cawrote:
select * from foo
where not exists
(
select * from bar
where bar.id = foo.id
)

boston_dude wrote:
So if I were to take table 1 and relate it to table 2 (one-to-one), I
could then run a query which would display the records that are in
both tables.
I'm looking to run a query that would display the records in table 2
that are not in table 1. What is the easiest/best way to do this?
Thanks,
Ian- Hide quoted text -

- Show quoted text -
Awesome. Thank you both, very much.

Cheers!

Ian

Jul 19 '07 #4

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

Similar topics

4
by: Matt | last post by:
Hi all, We recently upsized two Microsoft Access Databases to SQL. We're using an ADP (2002) as the front end. All the conversion issues have been resolved, except for one: Whenever we...
1
by: Sean | last post by:
I have a table (with tabular data) that I want to display on a webpage. Initially the talbe is empty. When a user clicks on a button, a child window opens up with a form and some text fields. ...
2
by: User 2084 | last post by:
Hello all. I'm an access newbie trying to learn how to do basic database data manipulations. I had a hard time searching the archives on this question as I don't really know what I'm looking for in...
1
by: stabbert | last post by:
We are on DB2 UDB 8.2.2 on AIX. I know this question has been asked many times on the ng but I am just not finding a real good answer. I need to be able to not only determine existing table data...
4
by: Jan | last post by:
Have an SQL create/import script. Running this on SQL would make it create a table with some values. Can Access2003 somehow use such and SQL script? I went into SQL query view to try it out, but...
4
by: John | last post by:
I am attempting to make a table data row editable once clicked on but I am not sure how to show the <tdwith two different states. I've got it to the point where the <tdis hidden then appears within...
2
by: gurusshetty | last post by:
Hi Please help me in finding out no. of rows in data table inside dataset using c# thanks guru
2
idsanjeev
by: idsanjeev | last post by:
hello guys how can fixed the table data which display if the word can not be completed in fixed table column then bareak it in new line not expend the column width like when using this table...
0
by: goldxr | last post by:
Hi, I'm new to MS Access and currently using the 2003 version. I have had very little VBA coding experience and need to set up a database which will enable to track staffing needs as projects...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.