回答編集履歴
2
修正
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
, case when '組織コード'=any(組織名)
|
34
34
|
|
35
|
-
or exists(select 1 from テーブル3 where '組織コード'
|
35
|
+
or exists(select 1 from テーブル3 where '組織コード'=組織コード and 会員id=t1.会員id)
|
36
36
|
|
37
37
|
then '組織名' else 'その他' end as organization
|
38
38
|
|
1
修正
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
select *
|
32
32
|
|
33
|
-
, case when '組織コード'=any(
|
33
|
+
, case when '組織コード'=any(組織名)
|
34
34
|
|
35
35
|
or exists(select 1 from テーブル3 where '組織コード' = テーブル3.組織コード and 会員id=t1.会員id)
|
36
36
|
|