Forum Replies Created

Viewing 15 posts - 16 through 30 (of 428 total)

  • RE: Fetch the last run time

    The feature to look for is CDC (Change Data Capture). Introduced in SQL server 2012, it required an enterprise license, but in newer versions it is available in other (cheaper)...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: XML multiple nodes not working

    Eirikur's solution can be made even faster if you specify in your xquery that you will only ever accept one root report-node per xml document.

    DECLARE @XML_DATA XML = '

    <Report MerchantID="123456">

    ...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Help with concatenating row values

    select

    tsk.ID,

    (select top (1) t.Tasks from dbo.Task t where t.ID = tsk.ID and t.preference = min(tsk.Preference)) as [Preference Task],

    stuff((

    ...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Data Collection & Daylight Saving Time

    Happy to inform you that the same error still occurs... :hehe:



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Resolving merge replication conflicts type 5 & 6

    You're welcome. Looking at the number of views of the script, you are probably one of the very few that actually understand why and when you need this :-D.

    I...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Replication - sp_msuplineageversion stuck

    We've experienced blockage in merge replication too. You need to be carefull not to set the retention period to high. Depending on the amount of changes coming through, the size...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Using Change Data Capture (CDC) for Extracting Changed Data on Multiple Tables in a Single Query

    You should design your process in such a way that it processes the effects of only one tables' changes at a time. So if your DWH table is the result...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Preserving cdc history when making schema change

    I know, I'm a bit late to the table. But no: you're not the owner of the data in the _CT tables, the CDC mechanism is, so you should not...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Merge statement with conditions

    Sergiy (6/23/2016)


    Why do you need MERGE?

    Don't know, maybe because it is easier to read (once you've gotten used to the merge syntax), does the same thing in a single statement...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Stored Procedure throws Violation of PRIMARY KEY constraint when called concurrently whit same parameters

    I've often applied a slight variation that I think has a minor optimization (based on the assumption that many times a row will exist, so that we can test if...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: FOR XML PATH

    Same thing happens when you encounter a < or > in your text. You could nest your statement in even more replace statements, but your code isn't going to look...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Geting the Date from the record with max value

    Sean Lange (6/1/2016)


    R.P.Rozema (6/1/2016)


    It may look easy, but still the solution provided was wrong.

    Here's one that does give the requested answers:

    While your code works well for the entire set the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: SQL authenticated logins and passwords

    You can however retrieve and later or on another server recreate logins giving the hashed password; i.e. even though you can't read it, the user will still be able to...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Error while parsing a string with " & " as XML

    You should be very careful using xml for splitting or merging texts as there are many exceptions to deal with in xml. Some of the problems can be avoided using...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Geting the Date from the record with max value

    It may look easy, but still the solution provided was wrong.

    Here's one that does give the requested answers:

    declare @tbl table (

    TagIndex int not null,

    DateAndTime...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

Viewing 15 posts - 16 through 30 (of 428 total)