0
UNIONを使用して2つのビューを接続したい(ビューCSPには1列が含まれていますので、2番目のビューの項目が1番目のビューにない場合は2番目の*を使用したい)良いですが、正しい値と*のどちらかを重複した設定IDがありません。別の列を持つ連合
これを解決し、cspに値があるときに '*'で行を削除するにはどうすればいいですか?
SELECT csp.customer_no,
csp.contract,
csp.customer_part_no,
csp.configuration_id,
csp.catalog_no
FROM customersomething csp
UNION
SELECT spc.customer_no,
spc.contract,
spc.customer_part_no,
'*' AS "configuration_id",
spc.catalog_no
FROM
superproduct spc
+-------------+----------+-----+------------------+--------+
| customer_no | contract | ... | configuration_id | |
+-------------+----------+-----+------------------+--------+
| 17 | whatever | ... | * | view A |
| 17 | whatever | ... | right_one | view B |
+-------------+----------+-----+------------------+--------+