can''t update

  • I have the following update statement that joins to a view, vwqPostalCode. I am unable to update the LocationAddress table. The columns shown are essentially the whole table. I need the view to limit records to just those for postal codes. How can I make this updateable? It's not a lock problem.

     

    SELECT la.LocationAddressID, la.AddressID, la.LocationID

    FROM dbo.LocationAddress la

    INNER JOIN vwqPostalCode v ON v.LocationID=la.LocationID

    WHERE la.AddressID = 32064

  • I'm confused... you post a SELECT and call it an UPDATE (I have the following update statement that joins to a view).  You want to limit to "just those for postal codes" but you have no apparent postal code information (column) in the code.

    I'm thinking you're gonna need to cough up just a bit more info to get help on this one...

    --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)

  • sorry for the unclear question. I've got it worke out. Thanks so much.

  • Care to share the solution?

    --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)

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

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