Welcome to Sign in | Help

Re: SQL Querry ?

  •  06-10-2012, 10:32 PM

    Re: SQL Querry ?

    SET XACT_ABORT ON;

    BEGIN TRY

    BEGIN TRAN

    DECLARE @Members TABLE ( memb_id VARCHAR(10) )

    UPDATE MEMB_INFO
    SET cspoints = a.cspoints + b.PCPoints
    OUTPUT DELETED.memb_id
    INTO @Members
    FROM [CHARACTER] b
    INNER JOIN [MEMBINFO] a
    ON b.AccountID = a.memb_id

    UPDATE [CHARACTER]
    SET PCPoints = 0
    WHERE AccountID IN ( SELECT memb_id
    FROM [@Members] AS M )

    .............................
    Do the COMMIT, CATCH EXCEPTION, ROLLBACK etc


    nu stiu sa il citesc multumesc admin , ma insel amarnic , macar cand pun o intrebare vin cu raspunsurile pe forumurile unde am pus intrebarea ca alcineva care e la fel de incepator ca mine daca da search sa aiba si raspunsul

    Decat sa dau astfel de raspunsuri care nu ma ajuta deloc mai bine lasam postu fara vizite
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems