Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Performance of the SQL MERGE vs. INSERT/UPDATE

    Had some deadlocks and massive performance hits with large datasets that involved varchar(MAX) fields..

    Added a plan guide with OPTION (MERGE JOIN) and the performance went back to good..

    Plan is to...

  • RE: Min & Max Date from DateTime Field based on Case

    Something like...

    Select

    CT_STOCKNO_P,

    CT_STOCKSUMMARY,

    CT_QUANTITY,

    TR_QUANTITY,

    TR_UNITCOST,

    TR_TYPECODE,

    MIN(CASE WHEN TR_TYPECODE = 'PREC' THEN TR_DATE END) AS MINPRECDATE,

    MAX(CASE WHEN TR_TYPECODE = 'PREC' THEN TR_DATE END) AS MAXPRECDATE,

    MIN(CASE WHEN TR_TYPECODE = 'ISSU' THEN TR_DATE END) AS MINISSUDATE,

    MAX(CASE WHEN...

Viewing 2 posts - 1 through 2 (of 2 total)