Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 10,144 total)

  • RE: Query Performance Issue with multiple unions and a view

    chandan_jha18 (3/21/2016)


    Thanks Lowell. The NULL and the Or clause are business rules so won't be able to find my way around that.

    I will try breaking the master proc and test...

  • RE: I'm missing something obvious but I'm not sure what.

    craig.bobchin (3/21/2016)


    I tried that and still got the error . This time it said the error was at the alias not the ).

    matak (3/20/2016)


    You need to give your

    select *

    from...

  • RE: Joining Tables with Right Function

    ChrisM@Work (1/18/2016)


    Jeff Moden (1/18/2016)


    ChrisM@Work (1/18/2016)


    Jeff Moden (1/18/2016)


    ChrisM@Work (1/18/2016)


    Jeff Moden (1/18/2016)[hrCan we agree on "SARGable in one direction only" as it's often sufficient to permit tweaking a decent plan?

    With the battles...

  • RE: Determining gaps in dates

    Couple of minor tweaks:

    WITH SequencedRows AS (

    SELECT

    p.ClientId,

    h.StartDate,

    h.EndDate,

    cp.CoveragePlanName,

    rn = ROW_NUMBER() OVER (PARTITION BY d.clientid, d.coverageplanname ORDER BY d.StartDate)

    FROM ClientCoverageHistory h

    INNER JOIN ClientCoveragePlans p

    ON p.ClientCoveragePlanId = h.ClientCoveragePlanId

    INNER JOIN CoveragePlans...

  • RE: IN clause type

    No; but there are two common ways around this. Either resolve out the string to a table of values and join to it, or write the statement as dynamic sql.

    Incidentally,...

  • RE: Dropping primary key improves performance

    smithhead (3/17/2016)


    Thanks everyone. I can post more details later, but here are some quick comments/questions:

    Good to know about compute scalars, I was wondering what that meant.

    What do...

  • RE: DATEADD shortcut

    Jeff Moden (3/16/2016)


    Luis Cazares (3/16/2016)


    The new data types don't allow these operations to allow better functionality.

    That's a serious matter of opinion. I think they flubbed it in two ways...

    1....

  • RE: Dropping primary key improves performance

    There's no warning on the result operator to back this up (if the warning string is too long to display in the "hover over" property sheet, it can still be...

  • RE: Getting the error "Maximum stored procedure, function, trigger, or view nesting level exceeded"

    I'd strongly urge you to spec out the functionality of

    EXEC [dbo].eusp_e5_eSM_SE_GetHistoryForItem

    and focus on this. It's the meat on the bones of this report.

  • RE: Dealing with large tables (Financial transactions)

    Emil B (3/16/2016)


    The main problem is that on our fast drive we are slowly running out of space, we have another, slower, drive that we could use. We are planning...

  • RE: Are the posted questions getting worse?

    Phil Parkin (3/15/2016)


    yb751 (3/15/2016)


    GilaMonster (3/15/2016)


    A sig that claims an MCSA and can't use SUM?

    You caught that too...makes you wonder if people are using other people's accounts. But why?

    Indeed. Why...

  • RE: Are the posted questions getting worse?

    Sean Lange (3/15/2016)


    ChrisM@Work (3/15/2016)


    Have I been reasonable with this guy? He crops up fairly regularly and is quite obviously well out of his depth - but I don't see a...

  • RE: Are the posted questions getting worse?

    Have I been reasonable with this guy? He crops up fairly regularly and is quite obviously well out of his depth - but I don't see a huge amount of...

  • RE: Getting the error "Maximum stored procedure, function, trigger, or view nesting level exceeded"

    Junglee_George (3/15/2016)


    I have added the statement SELECT @@NESTLEVEL in my query at different points in the stored proc eusp_e5_eSM_SE_GetHistoryForItem.

    But everywhere it is returning a value 0, even at the previous...

  • RE: Move to new row

    girl_bj (3/14/2016)


    Thanks.

    Is it possible to include in between new data?

    Newrecord

    chicago

    20pax

    Newrecord

    Spain

    10pax

    Newrecord

    austria

    90pax

    Sure:

    ;WITH sample_data (resultA, resultB, resultC, resultD) AS (

    SELECT 'chicago', 'ID123', '20pax', 'ID123' UNION ALL

    SELECT 'austria', 'ID999', '90pax', 'ID999' UNION ALL

    SELECT 'Spain',...

Viewing 15 posts - 1,681 through 1,695 (of 10,144 total)