Forum Replies Created

Viewing 15 posts - 1,261 through 1,275 (of 5,504 total)

  • RE: SQL query alternative for performance improval

    Please post table def and sample data in a ready to use format as described in the first link in my signature.

    Also, please include your expected result based on the...

  • RE: Inserting millions of rows into a partitioned view

    What table would a value for DateColumn ='20100101' get inserted? 😉

  • RE: Converting money to varchar still gives me the values in my result set. HELP~~!

    Did you try

    WHERE A.CashPurse1 < > 0

  • RE: Inserting millions of rows into a partitioned view

    Just as a side note: instead of

    WHERE DATEPART(YEAR,DateColumn)=2009

    I'd rather recommend use

    WHERE DateColumn>='20090101' AND DateColumny'20100101'

    The original version won't benefit from a (hopefully) existing index on DateColumn.

  • RE: Count with inner joins

    It's hard to troubleshoot without having the table defs referenced by the sproc.

    You might need to run the code with defiined parameter instead of calling the sproc with input variables....

  • RE: Count with inner joins

    I think there's a little more to change...

    Change the block before the comment -- Execute SQL statement

    SET @sqlStatement = @sqlStatement + @whereSql + '

    )

    SELECT * FROM PaymentViewPaged

    WHERE RowIndex between @PageIndex...

  • RE: Count with inner joins

    Ninja's_RGR'us (7/14/2011)


    Not needed anymore.

    Lutz finally understood the quoting system.

    NO. :-P:-D

    :hehe:

  • RE: Count with inner joins

    @ninja: I edited the quote range in my reply. You might need to adjust yours to reflect that, too 😀

  • RE: Help Needed for to Improve SQL Query Performance

    I just removed the GROUP BY as well as the CONVERT() function. The result is still identical:

    SELECTDISTINCT OM.ID,Sequence

    FROM #DataHistory OM

    OUTER APPLY

    (

    SELECT

    STUFF((

    SELECT ',' + LTRIM(RTRIM(O.Letter ))

    FROM #DataHistory...

  • RE: Count with inner joins

    Matt Miller (#4) (7/14/2011)


    According to that - since you're dynmiacally building the query, so definitely don't need the function in the JOIN. Instead - use the parameter differently:

    SELECT *...

  • RE: Subquery Running Slow

    Start with comparing the actual execution plans if both are exactly the same.

  • RE: Count with inner joins

    krypto69 (7/14/2011)


    So I'm guessing that this is a dynamic parameter and not static value

    yep I talked to the dev again and he said it was a dynamic parameter..so they...

  • RE: Subquery Running Slow

    Almost impossible to answer based on the information provided so far.

    Parameter sniffing? Out of date statistics? Missing/dropped indexes? Changed data volume? Heavy server load? Disc issues? ...

    Please remember: neither do...

  • RE: Week Grand Total not equal to sum across 7 days

    I am perplexed, can summing up of DISTINCT COUNT aggregated measure from day level to week be a reason for this?

    It depends.

    What do you expect to be a valid result...

  • RE: problem query

    run the inner query separately:

    SELECT wrhid

    FROM (

    (SELECT wrkID, MAX(wrhid) as wrhid

    FROM tblWerknemerHistorie

    WHERE wrkID in (SELECT wrh.wrkid

    FROM dbTR_20110708.dbo.vwWerknemers WRK

    INNER JOIN dbTR_20110708.dbo.tblWerknemerHistorie WRH on...

Viewing 15 posts - 1,261 through 1,275 (of 5,504 total)