Forum Replies Created

Viewing 15 posts - 1 through 15 (of 30 total)

  • Reply To: How To Avoid MERGE in SQL Server

    Another advantage (hinted at in the introduction) is the potentially maintenance-free nature of the algorithm for when the column profile of the source/target tables changes, assuming they remain the same.

    A...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Rollup Incorrect - One Field

    @Eirikur - I think the ct comes from COUNT at the bottom of the query:

    COUNT(DISTINCT DATEPART(MONTH, Call_Start_Time)) AS Ct
        FROM   Agent_Details
        WHERE  DATEPART(YEAR, Call_Start_Time) =...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Update from a join

    Do you mean Forum Etiquette: How to post data/code on a forum to get the best help (this should be a clickable link)?  If so click the link (also given in my...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Update from a join

    @Pietlinden - I think your script's missing a line.

    Possibly something on the lines of this would be more complete:

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Update from a join

    Some sample data in an easily run format that covers the scenario and gives the result set you've shown would be helpful.  See Jeff Moden's guide:

    Forum Etiquette:...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Removing duplicate data

    @Saig1417 - no problem, live and learn.  Thom's use of a temporary table for test data is better practice than mine, and Jeff's How to Post Guide (linked by Thom...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Removing duplicate data

    Okay, here goes with some setup code. I've added in a couple of earlier records with just weekly data.

    CREATE TABLE [dbo].[HoursWorked](
        [EmpID] [INT] NOT NULL,
       ...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Insert Table based on a Result

    How about this?

    -- Using Common Table Expression (CTE) to get Ecode date ranges to process

    WITH EcodeDateRanges AS

    (

    SELECT dayBefore.Ecode, cl.Startdate, cl.Enddate FROM dbo.Absentdata dayBefore

    ...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: First Class Jobs

    PS: regarding the overview, when which job will run: you can get a simple table with next runtime etc. in the SQL Server Agent (job activity monitor)

    Sure, but what I'd...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: First Class Jobs

    Like the idea. If implemented, I would also like to see some sort of management system that gives a DBA simple way of getting an overall view of all...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Round averages

    Thanks George. That triggered a further bit of research.

    The puzzle for me was where the extra decimal places came from in the AVG result. I've found...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Round averages

    Why do we get an answer like "9.000000" instead of "9" when the length is 0 (i.e. rounded to no decimal points)? The answer here has two parts. I...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Email or Username

    Aaron N. Cutshall (6/29/2016)


    Personally, I prefer using an account name as email addresses are much more subject to change.

    I can understand that view, but the issue I've had is where...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

  • RE: Email or Username

    Unlucky. At the moment I’ve little problem with the use of email addresses for authentication despite the issues with that, though I'm aware there may be some ancient bulletin...

    Forum Etiquette: How to post data/code on a forum to get the best helpMake sure that you include code in the appropriate IFCode tags, e.g. <your code here>. You can find the IFCode tags under the INSERT options when you are writing a post.

Viewing 15 posts - 1 through 15 (of 30 total)