Joining 2 tables to make a query

  • Thread starter Thread starter Lenee
  • Start date Start date
L

Lenee

I have 2 tables that I have joined to make a query, the problem is that I do
not see all of the information from the 2 tables that I need. I have tried
using the join properties and used both options, but still not getting all of
the information. Can anyone help? I am really new at this so simple is always
better. Newbies need extra patients..
 
It would help us if you would identify your tables and fields, and show us the query you are executing.

You may be new, but we can't guess what you're doing. Please help us help you.
 
Go into SQL view and post the SQL here.
You should see at the top something like:

SELECT Mytable1.*, Mytable2.*
FROM....

This will give you all columns from both tables.
If you used the table designer, it probably lists every column individually
but you can delete all that and substitute the above.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Her is the info you asked for sorry I took so long. I want to learn to fish..

SELECT [2009 Cut File].[2009 Cut], [2009 Cut File].[Wk 1], [2009 Cut
File].[Cut Area], [2009 Cut File].[Cut Ord Num], [2009 Estimate
File].[Estimate ID], [2009 Cut File].[2009 Cut File ID], [2009 Cut
File].[Estimate ID], [2009 Estimate File].Street
FROM [2009 Estimate File] LEFT JOIN [2009 Cut File] ON [2009 Estimate
File].[Estimate ID] = [2009 Cut File].[Estimate ID]
ORDER BY [2009 Cut File].[Cut Area], [2009 Cut File].[Cut Ord Num];
 
Lenee said:
Her is the info you asked for sorry I took so long. I want to learn to fish..

SELECT [2009 Cut File].[2009 Cut], [2009 Cut File].[Wk 1], [2009 Cut
File].[Cut Area], [2009 Cut File].[Cut Ord Num], [2009 Estimate
File].[Estimate ID], [2009 Cut File].[2009 Cut File ID], [2009 Cut
File].[Estimate ID], [2009 Estimate File].Street
FROM [2009 Estimate File] LEFT JOIN [2009 Cut File] ON [2009 Estimate
File].[Estimate ID] = [2009 Cut File].[Estimate ID]
ORDER BY [2009 Cut File].[Cut Area], [2009 Cut File].[Cut Ord Num];

--
Lenee


"Dorian" wrote:

> Go into SQL view and post the SQL here.
> You should see at the top something like:
>
> SELECT Mytable1.*, Mytable2.*
> FROM....
>
> This will give you all columns from both tables.
> If you used the table designer, it probably lists every column individually
> but you can delete all that and substitute the above.
> -- Dorian
> "Give someone a fish and they eat for a day; teach someone to fish and they
> eat for a lifetime".
>
>
> "Lenee" wrote:
>
> > I have 2 tables that I have joined to make a query, the problem is that I do
> > not see all of the information from the 2 tables that I need. I have tried
> > using the join properties and used both options, but still not getting all of
> > the information. Can anyone help? I am really new at this so simple is always
> > better. Newbies need extra patients..
> > --
> > Lenee

Lenee,

What information did you want to see that is not shown?
Anything you want to see must be included in the SELECT portion of the SQL statement (before the FROM).
 
Her is the info you asked for sorry I took so long. I want to learn to fish..

SELECT [2009 Cut File].[2009 Cut], [2009 Cut File].[Wk 1], [2009 Cut
File].[Cut Area], [2009 Cut File].[Cut Ord Num], [2009 Estimate
File].[Estimate ID], [2009 Cut File].[2009 Cut File ID], [2009 Cut
File].[Estimate ID], [2009 Estimate File].Street
FROM [2009 Estimate File] LEFT JOIN [2009 Cut File] ON [2009 Estimate
File].[Estimate ID] = [2009 Cut File].[Estimate ID]
ORDER BY [2009 Cut File].[Cut Area], [2009 Cut File].[Cut Ord Num];

This should show all the records in [2009 Cut File], and any records from
[2009 Estimate File] with a matching [Estimate ID]; of course you will see
only those fields that you have included in the SELECT statement. The fields
from [2009 Estimate File] will be null (blank) if there is no matching record
in that table.

What are you *not* seeing that you want to see? Do you want to see all records
from [2009 Estimate File] even if there is no match?
 
Back
Top