Forum Replies Created

Viewing 15 posts - 1 through 15 (of 29 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...

  • 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) =...

  • 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...

  • 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:

  • 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:...

  • 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...

  • 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,
       ...

  • RE: Removing duplicate data

    You'll be more likely to get help if you can post your query in a form that makes it easier for prospective helpers to use.  Read article:

  • 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

    ...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

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