Hi,
I need to create a SQL Select that would return the following query:
EQUIPMENT.EQUIP_ID, EQUIPMENT.EQUIP_DESC, TRANDETAIL.* FROM TRANDETAIL --- JOINS
Structure of tables (simplified):
TRANDETAIL EQUIP_PK
ORDER_NO
ORDERS ORDER_NO
EQUIP_ID
EQUIPMENT EQUIP_ID Char(15) - Unique field
EQUIP_PK
EQUIP_DESC Char(40) - Equipment descriptoin
The challenge is that the SQL Select should select All Records from TRANDETAIL and records
from EQUIPMENT either by the field TRANDETAIL.EQUIP_PK Jointed with EQUIPMENT.EQUIP_PK
or by Joining ORDERS on ORDER_NO and then Joining EQUIPMENT on EQUIPMENT.EQUIP_ID with ORDERS_EQUIP_ID.
Therefore, it looks like I will have the table EQUIPMENT twice and this creates many NULL values.
Is my explanation too confusing? Any suggestions?
TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham