Forum Replies Created

Viewing 15 posts - 3,091 through 3,105 (of 7,613 total)

  • RE: index scan where seek expected

    jontris - Tuesday, October 23, 2018 2:49 AM

    Thanks again for the responses. I can't re-cluster the table as it's part of a...

    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 am struggling with selecting specific information out of a strings

    Jonathan AC Roberts - Tuesday, October 23, 2018 9:38 AM

    ScottPletcher - Tuesday, October 23, 2018 9:32 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: I am struggling with selecting specific information out of a strings

    Michael L John - Tuesday, October 23, 2018 9:24 AM

    nick.hinton - Tuesday, October 23, 2018 9:21 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: index scan where seek expected

    Jeff Moden - Monday, October 22, 2018 3:56 PM

    ScottPletcher - Monday, October 22, 2018 11:25 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: I need to parse and change the field identifier

    Try this:

    REPLACE(accountx, '-', '.')

    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: Deleting data from a table ... quickly

    Lynn Pettis - Monday, October 22, 2018 1:51 PM

    Well, with a permanent table already created they aren't using SELECT ... INTO #<table>. ...

    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: Deleting data from a table ... quickly

    Lynn Pettis - Monday, October 22, 2018 12:28 PM

    julian.fletcher - Monday, October 22, 2018 10:23 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: Deleting data from a table ... quickly

    Jeff Moden - Monday, October 22, 2018 11:52 AM

    ScottPletcher - Monday, October 22, 2018 11:21 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: index scan where seek expected

    jontris - Monday, October 22, 2018 10:21 AM

    Thanks Grant but I'm going to be bold and say that there is no rationale,...

    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: Deleting data from a table ... quickly

    Just delete the rows.  If it's not that many rows, it's more work than it's worth to try to TRUNCATE.

    I suspect (hope) the temp table is clustered first...

    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: Find tables with records in multible DB's

    For this particular need, you just need to touch up your original script to bit to avoid unnecessary errors:


    CREATE TABLE ##temp_fbl
    (
    DBName nvarchar(200),

    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: Find and replace third occurrence of the string

    Jeff Moden - Thursday, October 18, 2018 4:01 PM

    ScottPletcher - Thursday, October 18, 2018 2:25 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: Convert varchar date to dd/mm/yyyy format date

    CAST is more flexible than specifying a specific format.

    Thus, I'd suggest TRY_CAST ... AS date to perhaps allow more data to be automatically converted to a date.

    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: Find and replace third occurrence of the string

    I suggest starting with your actual solution, not listing things you would not do first.  You can offer to explain why you wouldn't use other possible solutions if they're interested in...

    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: Count people who have dual citizenship


    ;WITH cte_test_data AS (
        SELECT * FROM ( VALUES
            ('00000S123', 'US', 'ITALY'),
            ('00000BH01', 'UK', ''),
       ...

    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,091 through 3,105 (of 7,613 total)