I am new to SQL, so please bear with me.
I am working with two tables that do not have common fields. I am trying to create simple hierarchy based on the two tables that look like this:
Table 1.
Cul 1 Cul 2
==============
S10000 Name
S20000 Name 1
S30000 Name 2
S40000 Name 3
Table 2
Cul 1 Cul 2
=====================
A10000 Test
A10001 Test 123
A20000 Test 1
A20001 Test 999
A30000 Test 2
A30002 Test 5555
A40000 Test 3
A40006 Test 84384848
I would like to write a query that will display ‘Name’ field from Table 1 based on matching numeric values in the first columns from table 1 & 2.
So if Table 1 is S10000, display A1000 – Test
Is that possible?
Thank you
1 Answer