Find Matching ID multiple times (1 Viewer)

ElcoyotldeAztlan

Registered User.
Local time
Today, 03:12
Joined
Jul 15, 2017
Messages
43
Hello all,

I believe there Is a query where I can find the IDs of the matching field,but if I ask to find the matching field name many times would the ID repeat itself ?
I dont know any SQL language so I try to create an example

Select.ID Copper,Copper,Wood,

in theory would my outcome be 1,1,2 if Copper has the ID number 1 and wood has the ID number 2?

Any thoughts
Thanks
 

Ranman256

Well-known member
Local time
Today, 06:12
Joined
Apr 9, 2015
Messages
4,337
the 2 tables will multiply in query,
t1 has 2 recs
t2 has 3 recs
gives 6 recs
 

ashleedawg

"Here for a good time"
Local time
Today, 03:12
Joined
Jun 22, 2017
Messages
154
Hello all,

I believe there Is a query where I can find the IDs of the matching field,but if I ask to find the matching field name many times would the ID repeat itself ?
I dont know any SQL language so I try to create an example

Select.ID Copper,Copper,Wood,

in theory would my outcome be 1,1,2 if Copper has the ID number 1 and wood has the ID number 2?

Everyone has to start learning somehow! :cool:

Can you give an example of the tables you're working with (or want to be working with), and an example of your desired query output? Did you want the ID to repeat, or you want to avoid it?

It's easier to picture what you're dealing with, with some sample data or maybe screen shots of the tables.

For example, here's my sample data:

[CODE]Table Name: tblBathroomParts

Field Name Data Type Sample1 Sample2
BRpart_ID Number 101 102
BRpart_Name Text Cabinet Pipes
BRpart_Color Text White Brown


Table Name: tblBuildingMaterial

Field Name Data Type Sample1 Sample2
BRpart_ID Number 101 102
BldMaterial Text Wood Copper


Desired Query Results

ID Part Material Color
101 Cabinet Wood White
102 Pipes Brown Copper
[/CODE]

Okay that's a pretty terrible example but I'm tired, plus the HTML formatting isn't cooperating with me the at moment. :rolleyes: And copper is brown is my world. :D

If you're new to table & query design, it might be helpful to check out some YouTube videos like this one.
 
Last edited:

Users who are viewing this thread

Top Bottom