Forum Replies Created

Viewing 15 posts - 5,161 through 5,175 (of 10,144 total)

  • RE: Execute Stored Procedure Multiple Times

    It might be worth converting (a version of) the sproc into a multi-statement table-valued function. The performance won't change but it would give you the flexibility of "running" the code...

  • RE: Case Statement

    Continued here.

  • RE: change a result into one record

    , x.FAC_ACTIVITY [FAC_ACTIVITY]

    , x.NUMMAINTEMP [NUMMAINTEMP]

    , LH.dtLeaseFrom [LHdtLeaseFrom]

    , LH.dtLeaseTo [LHdtleaseto]

    , crp.destimated [crpdestimated]

    --, pps.HValue [ppsNSFFEE]

    ,pps.NSFFee

    ,pps.MTMFee

    ,pps.SecDepIntRate

    , m.stext [memoStext]

    FROM vw_DK_RMMISCDATA x

    LEFT JOIN Property p

    ON x.RM_ID...

  • RE: change a result into one record

    Jeff Moden (2/26/2013)


    dwain.c (2/26/2013)


    I did have to make an assumption (the 0 in the second row of the set up data) as the OP only provided 4 data columns in...

  • RE: Case Statement

    Ah, I think you're looking at a pivot - does this help?

    SELECT

    p.HPROP,

    p.STYPE,

    p.SVALUE,

    NSFFee = CASE WHEN p.STYPE = 'nsffee' THEN p.hvalue END,

    MTMFee = CASE WHEN p.STYPE = 'MTMFee'...

  • RE: Case Statement

    Is this - [SecDepIntRate] a column name or a value?

  • RE: Case Statement

    -- APPLY can simplify calculations like this;

    SELECT

    p.HPROP,

    p.STYPE,

    p.SVALUE,

    x.Newcolumn

    FROM PROPOPTIONS P

    CROSS APPLY (

    SELECT Newcolumn = CASE

    WHEN p.STYPE = 'nsffee' THEN 'NSFFee'

    WHEN p.STYPE = 'MTMFee' THEN 'MTMFee'

    WHEN p.STYPE...

  • RE: procedure performance

    It's an estimated plan - the actual plan for one of the queries would be much more informative. However, the following points spring to mind.

    Statistics appear to be out of...

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    mister.magoo (2/26/2013)


    ChrisM@Work (2/26/2013)


    dwain.c (2/26/2013)


    ChrisM@Work (2/26/2013)


    peter-757102 (2/26/2013)


    Using a binary comparisons is a good speedup for specific cases and good to be aware of and certainly worth mentioning in bold with...

  • RE: Developer edition availability

    T. C. (8/4/2012)


    I finally did manage to get hold of a copy - from Grey Matter[/url].

    Bought mine from GM too, about fifty quid IIRC. What you actually get is four...

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    dwain.c (2/26/2013)


    ChrisM@Work (2/26/2013)


    peter-757102 (2/26/2013)


    Using a binary comparisons is a good speedup for specific cases and good to be aware of and certainly worth mentioning in bold with its benefits....

  • RE: SQL server 2008 query help

    BriPan (2/26/2013)


    Add alias name to query like C(or any else ) then try ...

    That's what I...never mind.

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    peter-757102 (2/26/2013)


    Using a binary comparisons is a good speedup for specific cases and good to be aware of and certainly worth mentioning in bold with its benefits. What it...

  • RE: Exclude duplicates, keep the value with the latest date

    BriPan (2/26/2013)


    but If performance is in concern then go for

    select CandidateID, max(YourDateColumn)

    from YourTable

    group by CandidateID

    Sean's solution is almost certainly quicker than Kingston's ROW_NUMBER method; however, Kingston's solution is a...

  • RE: Avoid DEADLOCK for concurrent DELETE

    VASUforSQL (2/25/2013)


    Hi ALL,

    I have a table called Products which has many columns.

    It is a temporary table used for reporting purpose. The data will be processed to this table concurrently by...

Viewing 15 posts - 5,161 through 5,175 (of 10,144 total)