Forum Replies Created

Viewing 15 posts - 3,076 through 3,090 (of 7,613 total)

  • RE: T SQL Question sd.name ?

    FROM sys.databases sd LEFTJOIN sys.database_mirroring dbm

    As noted, a name, "sd", that follows immediately after a table name, "sys.databases", becomes an alias for that table.  In fact, it becomes the only name for that...

    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: Changing 1 or + in a telephone number to the correct format

    I suggest generating a pattern to identity what the phone string contains.  Then all you need to do is decide which patterns are acceptable and which aren't.

    For example,...

    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

    julian.fletcher - Thursday, October 25, 2018 2:18 AM

    Jeff Moden - Monday, October 22, 2018 11:52 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: TRIGGER for INSERT/ UPDATE from table source for table destination

    antoniop.silv - Friday, October 26, 2018 11:49 AM

    Guru Thank you for feedback,
    Thank you for your feedback. I liked. But an observation...

    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: CASE to table conversion

    Brandie Tarvin - Friday, October 26, 2018 5:16 AM

    I'll look into decision tables. Thank you for the suggestion, Joe.

    Scott, I appreciate your...

    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: Blocking problem

    For only 1 to 5 rows, then it should'n take long at all. 

    I don't see why SERIALIZABLE would be needed at all for this UPDATE.  SQL will...

    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: Split comma delimited field?

    Jeff Moden - Thursday, October 25, 2018 3:06 PM

    ScottPletcher - Thursday, October 25, 2018 9:49 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: Blocking problem

    Yes, SERIALIZABLE is the most restrictive level there is, so it could lead to blocking.

    Is the main table indexed in some way on col3?

    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: TRIGGER for INSERT/ UPDATE from table source for table destination


    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TRIGGER [dbo].[TriggerUpdateInsert]
    ON [dbo].[TABLE_SOURCE]
    AFTER INSERT, UPDATE
    AS
    SET NOCOUNT ON;

    UPDATE TD
    SET FIELD_1...

    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: CASE to table conversion

    I think a well-written function might still be the best choice.  The logic could get very complex to implement trying to use a table structure.  If necessary for performance, make...

    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: Split comma delimited field?

    Jeff Moden - Wednesday, October 24, 2018 6:07 PM

    Jonathan AC Roberts - Wednesday, October 24, 2018 3:51...

    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: increment months for two dates combination as a new label column

    Lynn Pettis - Wednesday, October 24, 2018 3:27 PM

    jcelko212 32090 - Wednesday, October 24, 2018 2:07 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: Split comma delimited field?

    I'd use a cross tab within the CROSS APPLY to reduce overhead (I would think).


    IF OBJECT_ID('tempdb.dbo.#your_table') IS NOT NULL
        DROP TABLE #your_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: Split comma delimited field?

    Look for function (ITVF) dbo.DelimitedSplit8K,

    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 - Tuesday, October 23, 2018 10:25 AM

    ScottPletcher - Tuesday, October 23, 2018 10:13 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".

Viewing 15 posts - 3,076 through 3,090 (of 7,613 total)