Forum Replies Created

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

  • RE: Table Column as Variable

    My problem is resolved. The last step was done using David's method (as above). Thanks alot.

    Thank you so much everyone! 🙂 Really couldn't have done it without you..

    By the...

  • RE: Table Column as Variable

    As for what I am trying to achieve...

    I want to log a user's update action on a specific table. However, I do not want to go checking one-for-one the fields...

  • RE: Table Column as Variable

    So, I used a temporary table to get the value, with the code below:

    --check if table exists and if it does, drop it

    If Object_Id('tempdb..#temp') is Not Null

    Drop table #temp

    SELECT *...

  • RE: Table Column as Variable

    I should have mentioned that I tried changing the name : #deleted to #del with the same error:

    "There is already an object named '#del' in the database."

    In other words, I...

  • RE: Table Column as Variable

    So, I added the following lines as advised:

    SELECT * INTO #deleted FROM deleted

    SELECT @tcolname = ('SELECT '+@colname+' FROM #deleted')

    EXEC (@tcolname)

    and this is the error I get:

    "There is already an object...

  • RE: Table Column as Variable

    I have no hope of getting this resolved? (sigh)

    I'll post the code tomorrow, as it's on another computer that I can't get to right now. However, I don't think that...

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