Forum Replies Created

Viewing 15 posts - 3,856 through 3,870 (of 5,504 total)

  • RE: Are the posted questions getting worse?

    Kit G (4/5/2010)


    ... Memories of holding my breath during reboot hoping that the operating system (Windows 3.11) would come up abound. ...

    Wasn't Windows 3.11 "just" an application back...

  • RE: Sql Query on one table sub query required

    What would be your expected output based on some sample data provided asdescribed in the first link in my signature? (Your current post doesn't really include a quesition...)

    Side note: How...

  • RE: Intermitent Primary key violation in Nightly jobs

    Quoting the OP's first post:

    We have jobs that perform inserts into a table with an alphanumeric primary key...

    it seems like the major issue is the alphanumeric key. Therefore neither...

  • RE: How can I fire a trigger for each row when a BULKUPDATE happen..?

    What is the business case you need to deal with?

    Basically I see two options:

    1) if possible at all modify the trigger to deal with all rows at once or

    2) import...

  • RE: Removing duplicates and keeping 1 record with no PK

    olie480 (4/2/2010)


    Jeff Moden (4/2/2010)


    Deleting data that is supposedly duplicated by FirstName and LastName is a very good way to have a sudden and very unwelcome career change. There must...

  • RE: Performance Tuning Big Table

    Grant Fritchey (4/2/2010)


    ...

    But seriously, I was thinking, and I'm assuming Lutz was thinking, adding a number or or substituting a number for the char field. Idle chatter really.

    Your assumption is...

  • RE: Improve Between performance

    cgreathouse (4/2/2010)


    Excellent! I'm now getting a duration of 1 ms and with only 3 reads!!

    Could you explain what's going on here to make it so much faster?

    Thanks!

    ....

    this one

    WHERE...

  • RE: Improve Between performance

    Thank you Jason for detecting my simple but most relevant mistake.

    Since my error rate increase dramatically at the moment (in another thread I just forgot that table variables where introduced...

  • RE: Improve Between performance

    CirquedeSQLeil (4/2/2010)


    ...

    My concern is due to the ands

    WHERE LOW >= 982827279

    AND LOW < 982827279 +1000

    AND HIGH <= 982827279

    Since the High and Low are the same value - it...

  • RE: Removing duplicates and keeping 1 record with no PK

    Btw: What do you mean by "query manager"?

    If you're using SQL Server 2000, the query shouldn't run at all since table variable as well as ROW_NUMBER function that I've used...

  • RE: Removing duplicates and keeping 1 record with no PK

    That's weird...

    Here's the result in the Results window when running the modified query as you posted:

    CustNumberFirstNameLastNameCity

    345321JohnDoeKellogg

    459978JohnDoeKellogg

    Message window output:

    (4 row(s) affected)

    (2 row(s) affected)

    The total number of columns doesn't really matter as...

  • RE: Improve Between performance

    CirquedeSQLeil (4/2/2010)


    lmu92 (4/2/2010)


    Is there any change to have a known maximum range between LOW and HIGH?

    If so, you could base your query on the LOW column to narrow down the...

  • RE: Improve Between performance

    Is there any change to have a known maximum range between LOW and HIGH?

    If so, you could base your query on the LOW column to narrow down the number of...

  • RE: Removing duplicates and keeping 1 record with no PK

    You could use Row_Number() to find the dupes...

    Something like this:

    DECLARE @tbl TABLE

    (

    CustNumber INT, FirstName VARCHAR(30), LastName VARCHAR(30), City VARCHAR(30)

    )

    INSERT INTO @tbl

    SELECT 345321 ,'John','Doe','Kellogg' UNION ALL

    SELECT 459978...

  • RE: Performance Tuning Big Table

    Grant Fritchey (4/2/2010)


    Using a number does make sense, but I wouldn't suggest you use NUMERIC. The NUMERIC(12,0) suggested is 9 bytes in size. An INT is only 4 bytes and...

Viewing 15 posts - 3,856 through 3,870 (of 5,504 total)