Forum Replies Created

Viewing 15 posts - 2,746 through 2,760 (of 7,636 total)

  • RE: SSC Members Name

    Paul White (4/30/2009)


    I used:

    Insert Into dbo.Users (UserName, LastLoggedIn)

    SELECT TOP 40000 CHAR(65+FLOOR(RAND(a.column_id*801020 + a.column_id*705020)*12)) + CHAR(65+FLOOR(RAND(a.column_id*6010 + b.object_id)*5)), DATEADD(dd,RAND(a.column_id*600 + b.object_id/1.5)*500,'2008/01/01')

    FROM master.sys.columns a CROSS JOIN master.sys.columns b

    Dude, what is going on...

  • RE: SSC Members Name

    Also, there is very probably a whole lot of other columns that Steve hasn't mentioned because they are unnecessary, unless you are recreating the whole table.

    Still, it's always bothered...

  • RE: Are the posted questions getting worse?

    john.arnott (4/30/2009)


    RBarryYoung (4/30/2009)


    ... I would have had him two feet off the ground, grasping at his own throat.

    ...as you sardonically tell him "I find your lack of respect...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    JohnG (4/30/2009)


    ...To return a record set from Oracle to ADO.Net you use "REF" cursors. The method that SQL Server uses (firehose output) is not ANSI compliant. ...

    Could you...

  • RE: Execute syntax problem

    RBarryYoung (4/30/2009)


    I am pretty sure that this is an Access problem and not a SQL Server one. You might have more luck if you moved this to the Access...

  • RE: Execute syntax problem

    I am pretty sure that this is an Access problem and not a SQL Server one. You might have more luck if you moved this to the Access forum.

    Anyway,...

  • RE: How to solve fibonacci series in tsql

    By the way, this has nothing to do with Fibonacci series, nor is it related to them (at least not what you have described so far). You are just...

  • RE: Are the posted questions getting worse?

    Heh. Thanks Lynn and Jeff.

    I don't usually post these, but this guy really takes the cake for me.

    Knows not to cross-post but at least I only did it once?!?...

  • RE: Script Search

    Adi Cohn (4/30/2009)


    You can use bcp with query on information_schema.routines. The column routine_definition contains the routine’s script. The column routine_type can help you filter only the records that...

  • RE: SSC Members Name

    The other thing to beware of is that there are issues with names whose length hits the max length (40 chars). I didn't see it until I used my...

  • RE: SSC Members Name

    OK, I used to following to generate test data:

    delete from Users

    Insert into Users

    Select TOP 1000000

    Left(c1.name, 19)

    + right(cast(newid() as varchar(36)), 2)

    + Left(c2.name, 19)

    , Cast( abs(c1.object_id+c2.column_id)/1000.0 as datetime)...

  • RE: SSC Members Name

    GilaMonster (4/30/2009)


    RBarryYoung (4/30/2009)


    Hmm, depending on the duplicates density, this might be faster:

    Better on IOs, worse on time (at least on my PC)

    Yeah, I'm pretty sure that there's a whole "seek...

  • RE: SSC Members Name

    Hmm, depending on the duplicates density, this might be faster:

    ;WITH cteUsers as (

    SELECT UserID

    , UserName

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

    FROM Users

    )

    UPDATE cteUsers

    ...

  • RE: SSC Members Name

    Steve Jones - Editor (4/30/2009)


    Anyone got a better performing solution than Gail?

    Heh. Now you know we'll need to see the execution plan to better answer that. 😀

    Seriously though,...

  • RE: Are the posted questions getting worse?

    Thanks, Steve 🙂

Viewing 15 posts - 2,746 through 2,760 (of 7,636 total)