- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2021 07:57 AM
データベースビューより、4つのテーブルを結合したい
設定、where句の記述がわからない(Where句が理解できていないです。)
対象テーブル
task、incident、change_request、problem
(2つはできた。task、incident)
4つは? できるのか?
Solved! Go to Solution.
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2021 03:04 AM
Got it, so you can create a database view like this,
o join all the four you may need to create 3 records in view tables related records for a database view record. Keeping task as base you can join with other table.
task with incident : task_sys_id=incident_sys_id
task with problem: task_sys_id=problem_sys_id
task with change : task_sys_id = change_sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2021 09:35 AM
To join all the four you may need to create 3 records in view tables related records for a database view record. Keeping Incident as base you can join with other table.
task with incident : task_sys_id=incident_sys_id
incident with problem: incident_problem_id=problem_sys_id
incident with change : incident_rfc = change_sys_id
For above conditions to work prefix for incident table is incident, change table is change and problem table is problem. Let me know if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2021 10:21 PM
うまく、条件を説明できてなくて、すいません。 条件は以下になります。
incidentと繋がりのないchangeとproblemもマージしたいです。(すべて)
イメージは、
Where task_number = incident_number || task_number = change_number || task_number = problem_number
incident、change、problemのそれぞれに、カスタムフィールドがあり、
タスクテーブルに結合して、1つのテーブルを作成したいです。
(レポート機能でグラフを作成するため)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 10:08 AM
Since you want to merge change, problem ,incident and task then in that case you dont even have to create a database view.
Task table is parent of Incident, Problem and change, so all you have to do is , open task table and put filter that Number starts with INC OR CHG OR PRB and you will get your result.
Let me know if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2021 01:15 AM
変更、問題、インシデントにカスタムフィールドを追加
タスクには追加していない。
上記の状況です。
しかし、
1つのテーブルとして、カスタムフィールドも含めて表示したい。
task_number = Incident_number || task_number = change_number || task_number = problem_number