Creating a table with Updatable columns and Read-only columns

  • Here is My requirement, I'm not sure if this is possible.

    Creating table called master like col1, col2 col3, col4 , col5

    Where Col1, col2 are updatable - this can be done easily

    Col3, col4 are columns in another table but these can be just a read only ?? Is this possible ? this is possible with View but not friendly with share point CRUD

    Col 5 is a computed column of col 2 and col5 ? if above step can be done then sure this can be done I guess.

    Please advise if someone has done similar.

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • don't think you can do it directly. You could create views that include the primary key and then grant a group of users update permissions on the view.

  • Thank you ! That's what I thought too and could not find a way to do in SQL server. We end up with a trigger to do the insert to the newtable

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • @SQLFRNDZ (5/28/2015)


    Thank you ! That's what I thought too and could not find a way to do in SQL server. We end up with a trigger to do the insert to the newtable

    They're called "indexed views" in "Books Online".

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Yep, that's correct but I cannot use views because of its restrictions on updates to multiple tables under the hood through SharePoint CRUD.

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

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

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