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

Can I join an ID in a table with a First and Last Name in another table?

1
I want to join a patient id from a table to a first name and last name in another table, how can i do that?
May 18 '15 #1
2 1142
zmbd
5,501 Expert Mod 4TB
HH22:
Sounds like an unusual table setup.
Normally you would link in the primary-key field(s) to the foreign key field(s) between the two tables. Then using a query one would pull the related information for use in reports etc.

Table relationships are established in several ways and with several options; however, the most common is via the database tools ribbon/menu and then by the table relationships option in a one to many relationship. (MS-Tutorial here) Mind you, I very rarely ever use cascade delete... too easy for the user to delete all of one's data by accident... made that mistake once and thankfully I had just backed up the data tables!

The articles located at:Microsoft Access / VBA Insights Sitemap may prove to be helpful for many of your questions and in particular the article on Normalization and Table Structures might help you with the design.
May 18 '15 #2
NeoPa
32,556 Expert Mod 16PB
The simple answer is "No. You can't."

JOINing must be done with similar values as that's what it means. "John" will match "John", but never 34127. In most cases, even the fields that store the data are constrained to be set up the same.
May 18 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Kenneth Osenbroch | last post by:
Hi. I want to create a trigger that only allows delete from table A if corresponding record in table B does not exist. Any idea on how this can be done? Thanks, Kenneth.
6
by: Michael | last post by:
I have two tables with a 1-many relationship. I want to write a select statement that looks in the table w/many records and compares it to the records in the primary table to see if there are any...
7
by: Philip Mette | last post by:
I have been searching many postings and I cant seem to find anyone that has this answer so I decided to post. I am using SQL (Transact-SQL).If I have 2 tables with columns...
2
by: Colm O'Hagan | last post by:
Hi there, I having a problem with a database I'm setting up, I would be delighted if someone out there could help. The database I'm setting up is a task register datebase, it will be used to...
2
by: Tony Ciconte | last post by:
Does anyone know of or have any VBA code or similar logic that can help distinguish similar first/last name combinations? For example, we would like to prompt the user of a possible match when any...
1
HaLo2FrEeEk
by: HaLo2FrEeEk | last post by:
I've got a table where I store tips for a challenge. Its structure is this: tip_id, challenge_id, user_id, ip_address, tip_date, tip_text The tips can be voted up or down, I store vote data in...
8
by: Sandra Walsh | last post by:
Hello - I have a local table in my database called t_CompanyData that holds a subset of the fields in another table called dbo_INT_AUX_LISTING. dbo_INT_AUX_LISTING is a linked table via an...
2
by: sudam burkule | last post by:
I have a one problem that, Cut the record from One table and Paste that record into another table Example :- i have two table Coll_name & Coll_name1 & i want to delete record from Coll_name...
1
by: MurtazaKhambaty | last post by:
Hello I have a table name Product 1.ProductCode 2. ProductName Product Sub Table 1.ProductCode
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: 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
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,...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.