Forum Replies Created

Viewing 15 posts - 256 through 270 (of 851 total)

  • RE: Concurrency Question

    [font="Verdana"]Strange. I would have done that in the following way:

    begin transaction;

    if not exists (

    select1

    fromdbo.UserStats

    whereUserID = @user-id

    ) begin

    insert into dbo.UserStats(UserID)

    values (@UserID);

    end; -- if

    commit transaction;

    Unless you particularly want the...

  • RE: Are the posted questions getting worse?

    Jeremy Brown (5/6/2009)


    Shifting the subject a bit. After the latest patch from Blizzard, I still think Death Knights are way OP. Discuss.

    [font="Verdana"]DK's are supposed to be a hero...

  • RE: Are the posted questions getting worse?

    [font="Verdana"]Algol 68 was a later revision to the language. However, it may have been the first version of PL/1. Been, er, 20 years since I looked at either,...

  • RE: Are the posted questions getting worse?

    [font="Verdana"]Check out this chunk of code, posted by Adam Machanic on Phil Factor's blog:

    SELECT

    UPPER(RIGHT(LEFT(@@VERSION,2),1))+SUBSTRING(MiR,1,15%6)+RIGHT(LEFT

    (CONVERT(VARCHAR,[c6[[447]),4),1)+CHAR(CAST(STUFF(ZuB,2,0,REPLICATE('0',

    1))AS INT))+(SELECT(SUBSTRING(name,3,1))FROM[master]..[sysdatabases]

    WHERE(dbid)=(SELECT(MIN(dbid))FROM[master]..[sysdatabases]))+COALESCE(

    SUBSTRING([c6[[447],0^1034,((15-10)/5)-1),SPACE(1))+LEFT(SPACE(1)+RIGHT(

    [rD9 005],LEN([rD9 005])-(ASCII('9')-ASCII('0'))),2)+SUBSTRING([556 X10.]

    ,2,1)+RIGHT(REVERSE(rNNNNNNoPZZ),1)+SUBSTRING([rD9 005],7,1)+[64]+CHAR

    (ASCII(RIGHT(REVERSE(MiR),1))-14)+RIGHT(MiR,1)+CHAR(ASCII(LEFT(MiR,1))

    -(ASCII(LEFT(REVERSE(MiR),1))-ASCII(LEFT(MiR,1))))+CHAR(ASCII(LEFT(

    (SELECT(SUBSTRING(REVERSE(rNNNNNNoPZZ),3,2))x00R),1))-4)+RIGHT(LEFT

    ([c6[[447],6),2)+RIGHT([556...

  • RE: Are the posted questions getting worse?

    Jan Van der Eecken (5/6/2009)


    What is DDL?

    [font="Verdana"]It's a spray that you apply liberally to rid yourself of unwanted pests. :w00t:[/font]

  • RE: Are the posted questions getting worse?

    [font="Verdana"]I don't look like mine: the eyes are the wrong colour.[/font]

  • RE: Are the posted questions getting worse?

    [font="Verdana"]Does anyone remember a language called Algol? I believe that in the original form, it had no concept of "reserved words", so it was perfectly valid to write expressions...

  • RE: convert datetime to integer

    WayneS (5/5/2009)


    As you can see, just converting the field to an int is giving you the desired results.

    [font="Verdana"]Heh. I learn something every day. These two statements are equivalent.

    select

    datediff(day,...

  • RE: convert datetime to integer

    DBA (5/5/2009)


    sorry i edited

    29

    29

    62

    677

    677

    [font="Verdana"]That looks like the number of days from 1900-01-01. So your conversion will be something like:

    datediff(day, '19000101', MyDate)

    ...where MyDate is the name of the column...

  • RE: convert datetime to integer

    [font="Verdana"]What is in your "udDistID(int,not null)"?

    it sounds to me you are looking to replace a datetime column with an integer column. As a suggestion, try the following:

    1. Rename...

  • RE: Do You Need an IT or CS Degree to be a Successful DBA?

    [font="Verdana"]Bachelor of Computer Science, majoring in hardware interfacing, networking, computer programming languages and operating systems (circa 20 years ago.) Only one information systems course in the degree, and that...

  • RE: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    RBarryYoung (5/4/2009)


    I would like to ask Bruce and Samuel if they could describe what a minimally acceptable non-cursor solution would have to be. I am not asking you to...

  • RE: Are the posted questions getting worse?

    Paul White (5/3/2009)


    User-developed Access databases with no validation make baby Jesus cry...

    [font="Verdana"]This was from an Excel spreadsheet. I love Excel. Really I do. Honest. (Is it...

  • RE: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    Tom.Thomson (5/1/2009)


    Bruce W Cassidy (4/30/2009)


    [font="Verdana"]This is another "Look Ma! No cursor!" approach. Of the two, I would rather take the cursor (actually, just a loop, no cursor). Then...

  • RE: Are the posted questions getting worse?

    Paul White (5/3/2009)


    Current favourite feature: dates from the ninth century (typos) which really don't fit well with DATETIME.

    [font="Verdana"]I'll see your 9th century date and raise you one in 20009.[/font]

Viewing 15 posts - 256 through 270 (of 851 total)