Database view on extended tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2015 10:59 PM
Hi All,
I have a requirement to create database view on two tables. In which one table is extended from some other table and the other is not. I also read "Rotated and extended tables cannot be included in a database view. Also, an existing database view cannot be a component of another database view".
So need to know any other way to combine the tables and write a query on it. Also, need to know other possibilities of joins like union, intersection etc. except left join.
Thanks,
Sowmya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2015 11:32 PM
Hi Sowmya,
The phrase "Rotated and extended tables cannot be included in a database view. " refers to tables present under "Table Rotation" menu (tables that can be of type: rotated/extended). This doesn't mean you cannot create a database view on an extended table as like task->incident or task->change_request. This is still possible.
Can you try it out and let me know if it doesn't work?
Regards,
Sergiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2015 11:58 PM
Hi Sergiu,
I tried left join on the tables Skill(name:cmn_skill) -> Application File and User Skill(name:sys_user_has_skill). I'm not getting the correct result as left join is not working on these tables.
I also tried with the tables which are not extended from any other tables. For these type of tables I'm getting the correct result.
Thanks,
Sowmya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2015 12:04 AM
Have you added view fields?
http://wiki.servicenow.com/index.php?title=Database_Views#Task_3:_Specify_Fields_to_Return

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2015 12:08 AM
Also change the order to 100 and 200 and change the condition as
usr_skill=cmns_name
Make sure that the field types are compatible ..