Forum Replies Created

Viewing 15 posts - 3,136 through 3,150 (of 7,619 total)

  • RE: Algorithm to combine 2 integer into one value and then disintegrate back into two

    frederico_fonseca - Friday, October 5, 2018 11:12 AM

    ScottPletcher - Friday, October 5, 2018 11:01 AM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Algorithm to combine 2 integer into one value and then disintegrate back into two

    frederico_fonseca - Friday, October 5, 2018 10:11 AM

    ScottPletcher - Friday, October 5, 2018 9:50 AM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Algorithm to combine 2 integer into one value and then disintegrate back into two

    frederico_fonseca - Thursday, October 4, 2018 5:35 PM

    as a alternative method 

    constraints
    - PERIODYTD date is always greater or equal to PERIOD
    - difference between the...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Algorithm to combine 2 integer into one value and then disintegrate back into two

    Yes, you can combine them into one integer and get them back.  The int value will most likely be negative, I don't know if that matters for you.

    The...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Foreign Keys and deadlock

    If you (almost) always look up on tableB by the MName, then cluster the table on that.  That would prevent a full scan of the table from happening every time...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: finding duplicates users

    osxman - Wednesday, October 3, 2018 4:53 PM

    ScottPletcher - Wednesday, October 3, 2018 3:15 PM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: error message with try part of try catch when cursor updating tables

    Isn't this the third iteration of the same essential q?  Why do you keep re-posting the same q??

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Msg 5173

    Jeffrey Williams 3188 - Wednesday, October 3, 2018 3:31 PM

    ScottPletcher - Wednesday, October 3, 2018 3:11 PM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: I need help with SQL queries

    I suggest just this.  If that still performs poorly, we'll have to look at the view itself and tune it.


    DECLARE @StartDate date = '01-01-2018'
    ,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: finding duplicates users


    SELECT
        EmployeeId, Forename, Surname, DateOfBirth, leaver, EmployeeStartDate, LeftDate
    FROM (
        SELECT *, ROW_NUMBER() OVER(PARTITION BY EmployeeId
            ORDER...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Msg 5173

    I'm assuming, and hoping, that you copied the files to the new locations rather than moved them (never do that, always copy and retain the originals until the ONLINE works...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Query Performance Improvement

    The only thing I see that could help would be a separate index on just:
    (col1, col2)
    If possible, use compression on the index, at least row but page if...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Automatically avoid error inserting into identity field

    I think you could use an INSTEAD OF INSERT trigger to do that, adding a view if necessary to avoid SQL "compile"/pre-scan issues.  Of course the trigger would apply to...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Table Design - identify one record as base and all others as being multipliers or divisors of base

    I don't follow.
    So there can be multiple rows for Product ABC123.  Why?  To allow changes over time?  Or for diff locations?

    It might be helpful to do this logically,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Insert records in to table that has primary key identity seed

    If you want to add an IDENTITY column in table1 that is not in table2, you can do this:

    select IDENTITY(int, 1, 1) AS id, *
    into table1...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 3,136 through 3,150 (of 7,619 total)