Forum Replies Created

Viewing 15 posts - 3,601 through 3,615 (of 7,613 total)

  • RE: With Schemabinding

    Have you considered instead of binding them just running a:
    sp_refreshview 
    across all the views when a base table changes? (or across all views that could possibly be affected, 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: Question Regarding Date logic

    ChrisM@Work - Tuesday, January 23, 2018 1:23 AM

    below86 - Monday, January 22, 2018 10:58 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: Update Table A when table B columns are updated and vice versa

    Not necessarily.  You can use CONTEXT_INFO() to pass a "flag" to the trigger to "tell" it not to update.  You might also look into replication.

    Below is a sample...

    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: Question Regarding Date logic

    drew.allen - Monday, January 22, 2018 2:27 PM

    ScottPletcher - Monday, January 22, 2018 1:50 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: Question Regarding Date logic

    drew.allen - Monday, January 22, 2018 2:10 PM

    ScottPletcher - Monday, January 22, 2018 1:50 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: Question Regarding Date logic

    drew.allen - Monday, January 22, 2018 1:29 PM

    ScottPletcher - Monday, January 22, 2018 12:14 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: Question Regarding Date logic

    below86 - Monday, January 22, 2018 12:49 PM

    I would say using 0 to represent 01-01-1900 or -1 to mean 12-31-1899 is far...

    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: Question Regarding Date logic

    drew.allen - Monday, January 22, 2018 11:35 AM

    ScottPletcher - Monday, January 22, 2018 11:05 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: Question Regarding Date logic

    below86 - Monday, January 22, 2018 10:58 AM

    In a follow up post KGJ-dev wanted to be able to pass any number of...

    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: Question Regarding Date logic

    All you have to set / pass in is the "@number_of_months", although you could pass in a different ending month if you wanted to.


    DECLARE @number_of_months...

    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: OPEN QUERY Syntax issues.

    OPENQUERY accepts only a literal string query (review the syntax for OPENQUERY() to confirm this).

    You have to use dynamic SQL if you want to build a dynamic OPENQUERY...

    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: Update or After Update Trigger for Adding to Update without Altering Existing update

    Yes, the trigger will fire again.

    The easiest way around that is to use CONTEXT_INFO to set a "flag byte" to "tell" the trigger not to update on 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: Backup Failing But CheckDB OK

    This looks like it might just be some type of bug.  Do you have the latest svc pack for that SQL applied?

    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 sets of IDs and Years into a table

    What you need/want is a CROSS JOIN.  That will match every ID with every year:


    SELECT n.ID, y.year
    FROM dbo.Name n
    CROSS JOIN (
        SELECT...

    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: Master database

    The hard task, that's not trivial, is changing to use a sophisticated, automated scripting mechanism to push the same script out to hundreds of databases, or a selected sub-set of...

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