473,803 Members | 3,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Joining two tables

I need help joining info from two tables.
Table1 and Table 2 have the same
fields(Node,Car d,Slot,Facility ,Sub-Port,Channel,Gr oup,Cic) Group is
text, rest are number.
Table 1 contains records for all possible combinations of
Node,Card,Slot, Facility,Sub-Port,Channel which indicates a physical
port on a piece of equipment. Table 2 is imported from a piece of
equipment containing all above info that has an assigned Group and Cic.
I want to the populate Table 1 with the Group and Cic from Table 2,
their will always be a match between the physical port fields. The only
other quirk is the sub-port field is not always populated, but it would
be consistent between the two tables. How would I make this happen.

Nov 13 '05 #1
1 1921
Hi Brian,

I think your starting point should be an update query that populates Table2
from the corresponding records in Table2:
UPDATE Table1 INNER JOIN Table2
ON (Table1.Channel = Table2.Channel)
AND (Table1.[Sub-Port] = Table2.[Sub-Port])
AND (Table1.Facilit y = Table2.Facility )
AND (Table1.Slot = Table2.Slot)
AND (Table1.Card = Table2.Card) AND (Table1.Node = Table2.Node)
SET Table1.[Group] = [Table2].[Group], Table1.Cic = [Table2].[Cic];

This matches on Sub-Port as well - when you say that
the sub-port field is not always populated, but it would
be consistent between the two tables

does that mean that if the Sub-Port is blank in Table2, then the matching
record in Table1 would also be blank? If so, then your update query will do
the job. If not, we would probably need a separate update query to handle
the blank Sub-Ports.

Hope that helps!

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #2

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

Similar topics

4
4295
by: Job Lot | last post by:
Is there anyway of Joining two or more DataTable with similar structure? I have three DataTables with following structures Data, AmountB/F, Repayments, InterestCharged and AmountC/F i want to join these tables on the basis of Date. I don't want three rows for each date, i want the values to be added for similar dates. thanx
2
3511
by: James | last post by:
Can anyone please shed some light on the following... I have a framework that uses dynamically created tables, named using an incremental "attribute set ID", as follows: attrdata_1 attrdata_2 attrdata_3 etc, etc...
3
4479
by: james | last post by:
Hi, I would like to get all the records from 9 tables that have the same field value in one field (it is a unique field)that is shared by all the tables. Would this method of joining work: select * from table 1, table 2, table 3 where table 1.com_field = table 2.com_field and table 2.com_field = table 3.com_field
2
3856
by: Coquette | last post by:
Hi all. I'm new here. I wanted to ask your opinion about *joining two tables* from *two different database* together. Is *that* possible? My project requires me to join identical tables from different database; *eg. MyTable* from *Friends.mdb* and *Foes.mdb* respectively. Is that achievable? I do hope anyone here can enlighten me on this one because I am really a newbie in using Access DB and also I'm using *ASP* in this project. Hope...
10
25546
by: Captain Nemo | last post by:
Hi I'm working on an ASP project where the clients want to be able to effectively perform SELECT queries joining tables from two different databases (located on the same SQL-Server). Does this involve creating virtual tables that link to another database, or am I completely on the wrong track? Any hints as to where I might find more information (buzz-words, etc.) would
3
9301
by: Reader | last post by:
Hello all, I am joining two tables in a query and the output should be all those records where two fields in table1 match two corresponding fields in table2. I joined the tables using both fields in design view and the Select statement in SQL view looks good. The query runs perfectly and shows the result I want but when I save the query and close it, re-opening in design view shows the error message "Microsoft Office Access can't
2
2604
by: nkechifesie | last post by:
I have created 9 tables in access via visdata and need to create another table joining all these tables. I have used the query in visdata to do this but it gives me an outrageous view. I have entered 2 records in each table but it gives me 65 records in the query. Please could you help me out. This is the code genreated by Visdata after I created the query, please what is wrong. the common field in 8 of the tables is Vehicle no and the common...
4
1565
by: Rnt6872 | last post by:
Table A Table B BOL# B_BOL# Chargeback# Hi All, I have been struggling with this for the past few months. I have two tables that I'm inner joining on BOL#=B_BOL#. This works fine. Now for the problem....When there are chargeback# fields associated with B_BOL# they aren't being captured as additional records. None of my tables
2
2266
by: Supermansteel | last post by:
I am joining these 2 tables together in Access 2003 and can't figure out the exact way of writing this script......Can anyone help? I have the following SQL: SELECT PL_Input.Date_ID,Count(PL_Input.+PL_Input.+PL_Input.+PL_Input.+PL_Input.) AS FROM Country INNER JOIN PL_Input ON Country.Country_ID = PL_Input.Country_ID WHERE (((. & "" & . & "" & . & "" & . & "" & .) Like "*2*"))
0
9700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10292
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7603
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.