A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

join tables sequencialy



 
 
Thread Tools Display Modes
  #1  
Old November 26th, 2008, 01:26 PM posted to microsoft.public.access.tablesdbdesign
Yossi evenzur[_2_]
external usenet poster
 
Posts: 33
Default join tables sequencialy

Hi
I have 2 tables, with sea temp per date, how can i join 2 tables one with
data from 01/01/2008 until 30/03/2008 and another table with data from
01/03/2008 to 01/11/2008. i don't want to cut the tables and don't want to
use SQL, is it possible?
  #2  
Old November 26th, 2008, 01:38 PM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default join tables sequencialy

On Wed, 26 Nov 2008 05:26:08 -0800, Yossi evenzur wrote:

Hi
I have 2 tables, with sea temp per date, how can i join 2 tables one
with data from 01/01/2008 until 30/03/2008 and another table with data
from 01/03/2008 to 01/11/2008. i don't want to cut the tables and don't
want to use SQL, is it possible?


Get someone else to write the SQL for you? You need a Union query and
that requires writing a small amount of SQL.

SELECT * FROM TableA
UNION ALL SELECT * FROM TableB

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
  #3  
Old November 26th, 2008, 02:10 PM posted to microsoft.public.access.tablesdbdesign
Yossi evenzur[_2_]
external usenet poster
 
Posts: 33
Default join tables sequencialy

so, no other option but SQL?

"Rick Brandt" wrote:

On Wed, 26 Nov 2008 05:26:08 -0800, Yossi evenzur wrote:

Hi
I have 2 tables, with sea temp per date, how can i join 2 tables one
with data from 01/01/2008 until 30/03/2008 and another table with data
from 01/03/2008 to 01/11/2008. i don't want to cut the tables and don't
want to use SQL, is it possible?


Get someone else to write the SQL for you? You need a Union query and
that requires writing a small amount of SQL.

SELECT * FROM TableA
UNION ALL SELECT * FROM TableB

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

  #4  
Old November 26th, 2008, 02:20 PM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default join tables sequencialy

On Wed, 26 Nov 2008 06:10:05 -0800, Yossi evenzur wrote:

so, no other option but SQL?


What is your objection to using SQL? I suppose you could insert both
tables into a third table with append queries and then display that.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
  #5  
Old November 26th, 2008, 02:41 PM posted to microsoft.public.access.tablesdbdesign
Yossi evenzur[_2_]
external usenet poster
 
Posts: 33
Default join tables sequencialy

don't know SQL very well (hmmm, rimes), also tried your example and got an
error massage "Too many fields defined". both tables are identical, and i
want to have a single table without the overlapping entries, do i have to
union only the date field?

"Rick Brandt" wrote:

On Wed, 26 Nov 2008 06:10:05 -0800, Yossi evenzur wrote:

so, no other option but SQL?


What is your objection to using SQL? I suppose you could insert both
tables into a third table with append queries and then display that.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

  #6  
Old November 26th, 2008, 02:46 PM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default join tables sequencialy

On Wed, 26 Nov 2008 06:41:01 -0800, Yossi evenzur wrote:

don't know SQL very well (hmmm, rimes), also tried your example and got
an error massage "Too many fields defined". both tables are identical,
and i want to have a single table without the overlapping entries, do i
have to union only the date field?


Access will balk if the total of both tables exceeds 255 fields. If that
is what you have then your design is most likely messed up. If you
didn't want any duplicates in the output then you would use UNION instead
of UNION ALL, but you will have to resolve the (too many fields) problem
before it will work.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
  #7  
Old November 26th, 2008, 02:54 PM posted to microsoft.public.access.tablesdbdesign
Duane Hookom
external usenet poster
 
Posts: 7,177
Default join tables sequencialy

Seems to me if you got "Too many fields defined", you would tell us how many
fields you have in your tables in the query. You should also provide the SQL
view of the query.

Is your date field unique/primary key in each of the tables? Do you really
want to exclude all records that are common to both tables or just display
one of the duplicate date records?
--
Duane Hookom
Microsoft Access MVP


"Yossi evenzur" wrote:

don't know SQL very well (hmmm, rimes), also tried your example and got an
error massage "Too many fields defined". both tables are identical, and i
want to have a single table without the overlapping entries, do i have to
union only the date field?

"Rick Brandt" wrote:

On Wed, 26 Nov 2008 06:10:05 -0800, Yossi evenzur wrote:

so, no other option but SQL?


What is your objection to using SQL? I suppose you could insert both
tables into a third table with append queries and then display that.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

  #8  
Old November 26th, 2008, 03:03 PM posted to microsoft.public.access.tablesdbdesign
Yossi evenzur[_2_]
external usenet poster
 
Posts: 33
Default join tables sequencialy

the date field is not unique and i want to display one of the duplicate recodrs

"Duane Hookom" wrote:

Seems to me if you got "Too many fields defined", you would tell us how many
fields you have in your tables in the query. You should also provide the SQL
view of the query.

Is your date field unique/primary key in each of the tables? Do you really
want to exclude all records that are common to both tables or just display
one of the duplicate date records?
--
Duane Hookom
Microsoft Access MVP


"Yossi evenzur" wrote:

don't know SQL very well (hmmm, rimes), also tried your example and got an
error massage "Too many fields defined". both tables are identical, and i
want to have a single table without the overlapping entries, do i have to
union only the date field?

"Rick Brandt" wrote:

On Wed, 26 Nov 2008 06:10:05 -0800, Yossi evenzur wrote:

so, no other option but SQL?

What is your objection to using SQL? I suppose you could insert both
tables into a third table with append queries and then display that.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

  #9  
Old November 26th, 2008, 03:16 PM posted to microsoft.public.access.tablesdbdesign
Yossi evenzur[_2_]
external usenet poster
 
Posts: 33
Default join tables sequencialy

hmmm, i couldn't understand from the help how union works, when i state
"union all" i'm forcing access to multiply the fields? if i have 5 fields in
both query, does union all creates a table with 10 fields?

"Rick Brandt" wrote:

On Wed, 26 Nov 2008 06:41:01 -0800, Yossi evenzur wrote:

don't know SQL very well (hmmm, rimes), also tried your example and got
an error massage "Too many fields defined". both tables are identical,
and i want to have a single table without the overlapping entries, do i
have to union only the date field?


Access will balk if the total of both tables exceeds 255 fields. If that
is what you have then your design is most likely messed up. If you
didn't want any duplicates in the output then you would use UNION instead
of UNION ALL, but you will have to resolve the (too many fields) problem
before it will work.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

  #10  
Old November 26th, 2008, 03:30 PM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default join tables sequencialy

On Wed, 26 Nov 2008 07:16:13 -0800, Yossi evenzur wrote:

hmmm, i couldn't understand from the help how union works, when i state
"union all" i'm forcing access to multiply the fields? if i have 5
fields in both query, does union all creates a table with 10 fields?


I believe in a UNION query the error is raised when there are too many
fields in the source tables. I don't think it matter how many fields are
in the output. Even though the output is combined vertically (by row
rather than column) the combined total of the fields in the input tables
cannot exceed 255.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.