Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 29th, 2003, 10:51 AM
Authorized User
 
Join Date: Aug 2003
Location: , , India.
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to spraveens
Default Combining tables

Hi

     I have 2 tables, Now I need to combine these to tables as one table .Is there any method to do so?. eg: I have 2 tables table A and table B.now I want to create a table C which has all the fields of Table A and B including records.

pls help.


Reply With Quote
  #2 (permalink)  
Old December 29th, 2003, 11:01 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Using access queries.

Create a make table query using the results from your combined tables.



Reply With Quote
  #3 (permalink)  
Old December 29th, 2003, 11:08 AM
Authorized User
 
Join Date: Jun 2003
Location: , FL, USA.
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use a Union query to do this:

SELECT tblA.Field1, tblA.Field2
FROM tblA
WHERE tblA.Field1 <Some Criteria>
UNION ALL SELECT tblB.Field1, tblB.Field2
FROM tblB
WHERE tblB.Field1 <Some Criteria>;

In a Union query the total fields must be equal from each table (as above two fields requested) there are some variations in data types that can be combined. For more detailed info see "Combine data in fields from two or more tables using a union query" in Access help.

Kenny Alligood
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining PHP and C++ Waffles C++ Programming 0 August 3rd, 2007 01:20 PM
Combining two Queries arholly Access 1 January 16th, 2007 06:40 PM
Question of Combining Multipe Related Tables mariushung VB Databases Basics 0 January 12th, 2005 03:06 PM
Combining records OCM Access 2 November 19th, 2003 04:51 PM



All times are GMT -4. The time now is 01:43 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.