UNION ALL VIEW PROBLEM FOR INSERT

  • If I try to INSERT Data into UNION ALL VIEW I am getting the following ERROR:

    Server: Msg 4439, Level 16, State 6, Line 1

    Partitioned view 'Test_VW' is not updatable because the source query contains references to partition table '[Test1]'.

  • I dropped and recreated the Test_VW but now it's showing up the following error:

    Server: Msg 4416, Level 16, State 5, Line 1

    UNION ALL view 'Test_VW' is not updatable because the definition contains a disallowed construct.

  • Joe Celko will answer this better than I can because he explains it short and simple in SQL for Smarties why you are getting this error.  Now to your solution run a search for Indexed views which are updatable with an Instead of Trigger in SQL Server BOL (books online).  Hope this helps.

     

    Kind regards,

    Gift Peddie

    Kind regards,
    Gift Peddie

  • Could you please post the script of your view, tables and constraints. It's easier for people to help if they know exactly what you're doing.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply