会社の階層を保持するテーブルがあります。社内にレベル数が決まっていないため、このフラットテーブルを使用することにしました。テーブルはうまく機能し、クライアントでカスケードリストを使用する場合は完璧です。ただし、「セクション」と、それが所有する他のすべての「セクション」を確認する必要があります。うまくいけば、以下の情報が私ができる必要があることのアイデアをあなたに与えるでしょう。
テーブル定義
create table SECTION
(
SECTION_ID NUMBER(38) not null,
SECTION_NAME VARCHAR2(75) not null,
SECTION_MANAGER NUMBER(6) not null,
SECTION_LEVEL NUMBER(3) not null,
OWNER_SECTION_ID NUMBER(38)
)
データ
1 IT 901763 2 0
2 Business Systems 904241 3 1
3 Business Analysis 900813 4 2
4 Development 900976 4 2
5 Testing 907052 4 2
6 Systems Architecture 908012 4 2
7 Mobilisation 904241 4 2
8 Operations 900885 2 0
9 Area 2 900456 3 8
0 Executive 1 0 0
私が見る必要があるもの
0 Executive 1 8 Operations
0 Executive 1 1 IT
0 Executive 1 0 Executive
0 Executive 1 2 Business Systems
0 Executive 1 7 Mobilisation
0 Executive 1 6 Systems Architecture
0 Executive 1 4 Development
0 Executive 1 3 Business Analysis
0 Executive 1 5 Testing
0 Executive 1 9 Area 2
1 IT 901763 2 Business Systems
1 IT 901763 7 Mobilisation
1 IT 901763 6 Systems Architecture
1 IT 901763 4 Development
1 IT 901763 3 Business Analysis
1 IT 901763 5 Testing
2 Business Systems 904241 7 Mobilisation
2 Business Systems 904241 6 Systems Architecture
2 Business Systems 904241 4 Development
2 Business Systems 904241 3 Business Analysis
2 Business Systems 904241 5 Testing
8 Operations 900885 9 Area 2
7 Mobilisation 904241
6 Systems Architecture 908012
4 Development 900976
3 Business Analysis 900813
5 Testing 907052
9 Area 2 900456
クライアント側のC#でこれを行うことはできますが、データベースのビューとして使用したいと思います。
誰かがこれを手伝ってくれませんか。それも可能ですか?
何か説明が必要な場合は、コメントを残してください。詳細をお知らせします。