• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 726
  • Last Modified:

UNION ALL view '%.*ls' is not updatable because the definition contains a disallowed construct.

select department_item_id as rec_id, department_id, '' as user_id, dsrc_id, item_id, max_quantity, frequency,
      update_user, update_time
from department_item di
union all
select ui.user_item_id, 0, ui.user_id, ui.dsrc_id, ui.item_id, ui.max_quantity, ui.frequency,
      ui.update_user, ui.update_time
from user_item ui inner join users u on ui.user_id = u.user_id
      inner join department d on u.department_

error is

UNION ALL view '%.*ls' is not updatable because the definition contains a disallowed construct.
0
mcse20002000
Asked:
mcse20002000
2 Solutions
 
arbertCommented:
So is the above statement the basis of a view or is it just a recordset you're creating somewhere?

A view or a recordset will NOT be updatable if the underlying tables are ambiguous (SQL doesn’t know what table to update), or it's an aggregate query.

0
 
dbeneitCommented:
select department_item_id as rec_id, department_id, '' as user_id, dsrc_id, item_id, max_quantity, frequency,
     update_user, update_time
from department_item di
union all
select ui.user_item_id as rec_id, 0  as  department_id, ui.user_id, ui.dsrc_id, ui.item_id, ui.max_quantity, ui.frequency,
     ui.update_user, ui.update_time
from user_item ui inner join users u on ui.user_id = u.user_id
     inner join department d on u.department_
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now