Results 1 to 3 of 3

Thread: Too damn lazy to this of SQl code at this time... anyone switched on enough to help??

  1. #1
    Nit
    Guest

    Lightbulb Too damn lazy to this of SQl code at this time... anyone switched on enough to help??

    I got a table, lets call it CALUsers.. in it I got two fields, Username (unique) and CALLevel.


    In my sp I want to update the level by one for a unique user...a bit like this:

    CREATE PROCEDURE [sp_levelup]
    @SYSUsername as char(50)
    AS
    Update (CALLevel += 1) from CALUsers
    where
    @SYSUsername = Username


    only I'm in C++ mode this morning and have forgotten my updates and inserts mantra...

    anyone awake enough to help?


    Nit

  2. #2
    Fanatic Member RSINGH's Avatar
    Join Date
    May 2001
    Location
    London
    Posts
    522
    [cod]
    CREATE PROCEDURE [sp_levelup]
    @SYSUsername as char(50)
    AS
    Update CALUsers
    SET CALLevel = CALLevel + 1
    where
    Username = @SYSUsername [/code]

    That should do it
    The liver is bad. It must be punished.

  3. #3
    Fanatic Member RSINGH's Avatar
    Join Date
    May 2001
    Location
    London
    Posts
    522
    Originally posted by Nit
    /me goes back to sleep
    NIt
    [Old fart mode]I dunno, students these days. When I was at Uni....... [/Old fart mode]
    The liver is bad. It must be punished.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width