Need to force a repeat value in a SQL select statement:

Need to force a repeat value in a SQL select statement:

table x has columns part_id and depot_id
there is a part (abc123) that exists in the UPS_NAMO depot, but not in the UPS_BRZ or UPS_LAR depot

how can I perform a select statement that will return 3 rows as follows, instead of the 1 row that it is currently returning:

part_id    depot_id
=====    ========
abc123  UPS_NAMO
abc123  UPS_LAR
abc123  UPS_BRZ


thanks!!
Fergal
fjkilkenAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
SELECT * FROm
(SELECT Distinct Part_ID  from x ) A
CROSS JOIN
(SELECT Distinct Depot_ID from x ) B
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
can you show the query you are using currently?

I guess you actually need a LEFT JOIN instead of INNER JOIN, but only guessing..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.