SSC Members Name

  • Hi Steve,

    can you regulate the SSC members name? I am seeing lot of duplications here. it is confusing a lot.

    can you assign the unique names or can you assign some number after the name which names are getting duplicate?

    karthik

  • There shouldn't be a lot of duplication. There are some older ones from before we had a unique check on the column.

    Who's duplicate?

  • my name only.

    you can see one more karthikeyan here. Probably you can see sql2000 --> TSQL --> forum topic = "1=1" which you answered just now.

    my name also karthikeyan. His name also karthikeyan.

    karthik

  • any updates?

    karthik

  • Sorry no update. We'll have to look into this and see who was a member first, then change names.

    It's not straightforward here.

  • Thanks Steve!

    I will be very happy if my name remain as it is. Politely saying, Since i visited our site more no of times(1370 visits from the joining date) and scored 1385 (comparing me with my related named persons only), I will be very happy if you give preference to me.

    Just i collected the statistics from 'members' area.

    There are around 140 members with the name 'karthikeyan' and most of them were visited less than 100 times.

    karthik

  • I wouldn't sweat the small stuff. You should be honored so many people with your name are in your field as well. You could always come up with a more unique handle for yourself. Mine is a combination of first initials of my wife, daughters and myself plus my last name. So far, haven't seen it used anywhere else. IMO - a pretty small issue in the grand scheme of things......

    -- You can't be late until you show up.

  • Wait... how will we know which karthikeyan you are? :w00t:

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • As i said earlier,

    Politely saying, Since i visited our site more no of times(1370 visits from the joining date) and scored 1385 (comparing me with my related named persons only),

    karthik

  • As i said earlier,

    Politely saying, Since i visited our site more no of times(1370 visits from the joining date) and scored 1385 (comparing me with my related named persons only),

    you can know me from my points.

    karthik

  • It's ok everyone! Crisis over! The problem is solved!!!

    I will simply run this query over the interweb interface:


    UPDATE records

    SET UserName = 'The *real* karthikeyan'

    FROM SQLServerCentral.com AS records

    WHERE user_id = (SELECT user_id FROM dbo.Users WHERE name = 'karthikeyan');

    [font="Courier New"]

    Msg 512, Level 16, State 1, Line 1

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, , >= or when the subquery is used as an expression.

    (0 user(s) affected)[/font]

    Darned duplicates!!!

    :crazy:

  • Paul White (4/29/2009)


    It's ok everyone! Crisis over! The problem is solved!!!

    I will simply run this query over the interweb interface:


    UPDATE records

    SET UserName = 'The *real* karthikeyan'

    FROM SQLServerCentral.com AS records

    WHERE user_id = (SELECT user_id FROM dbo.Users WHERE name = 'karthikeyan');

    [font="Courier New"]

    Msg 512, Level 16, State 1, Line 1

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, , >= or when the subquery is used as an expression.

    (0 user(s) affected)[/font]

    Darned duplicates!!!

    :crazy:

    LOLOLOLOLOLOLOLOLOLOLOL!!!!!

    Gaby
    ________________________________________________________________
    "In theory, theory and practice are the same. In practice, they are not."
    - Albert Einstein

  • karthikeyan (3/17/2009)


    As i said earlier,

    Politely saying, Since i visited our site more no of times(1370 visits from the joining date) and scored 1385 (comparing me with my related named persons only),

    you can know me from my points.

    Actually, no need to worry, we know who you are.

  • I suppose I need to fix this at some point.

    I'm leaning towards leaving the last logged in user as the original name and adding a 1, 2, etc. to the others after that.

    Anyone want to write a nice set-based solution to update the dups with row_number?

  • Steve Jones - Editor (4/30/2009)


    Anyone want to write a nice set-based solution to update the dups with row_number?

    Delegating work? 😉

    CREATE TABLE Users (

    UserID int identity primary key,

    UserName varchar(40),

    LastLoggedIn DATETIME

    )

    GO

    Insert into Users (UserName, LastLoggedIn) VALUES ('Joe', '2008/01/01')

    Insert into Users (UserName, LastLoggedIn) VALUES ('Joe', '2008/01/10')

    Insert into Users (UserName, LastLoggedIn) VALUES ('Joe', '2008/01/27')

    Insert into Users (UserName, LastLoggedIn) VALUES ('Bob', '2008/01/02')

    Insert into Users (UserName, LastLoggedIn) VALUES ('Tom', '2008/11/01')

    Insert into Users (UserName, LastLoggedIn) VALUES ('Tom', '2008/11/02')

    GO

    Update Users

    SET UserName = UserName + CASE incr WHEN 1 then '' ELSE CAST(incr-1 AS VARCHAR(3)) END

    FROM Users Inner join

    (SELECT UserID, ROW_NUMBER() OVER (Partition By UserName Order By LastLoggedIn DESC) incr

    FROM Users) sub on Users.UserID = sub.UserID

    select * FROM Users

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 1 through 15 (of 36 total)

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