Forum Replies Created

Viewing 15 posts - 751 through 765 (of 1,473 total)

  • RE: Totally confused by query behavior and plan

    This may not be what was happening here, but I had a somewhat similar issue on Friday using nested derived tables. It made me ask a question that I've...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Audit Trail - Handle image fields

    I don't know if changing the structure of this trigger is a consideration... but you really don't want to use loops and dynamic sql in triggers. It will likely...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Exponential Moving Average Challenge

    First, let me say, good post. Sample data, table definitions,expected results and a clear description of the problem.

    This should work for you. Please note that the clustered index...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Row Count Spool/Lazy spool

    r.hensbergen (1/29/2009)


    souLTower (1/29/2009)


    Aren't left joins and NOT EXIST statements more efficient than NOT IN statements? I don't know if I made that up or read it somewhere. I...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Determining whether a Stored Procedure returns a resultset

    Oops, sorry for the double post, my internet freaked out last night. To be honest, I'm not sure how you'd use FMTONLY to do it, but I do...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Problem related to deletion of data from table using like key word

    Thanks for the feedback sar_kan25. Glad we could help.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: issues with datetime to integer value

    I actually read a thread the other day where Jeff was comparing the -.5 as int method with the other 3 main methods, and he seemed to be in favor...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Poor Performing Query When running a Report

    Yeah, I'd say those functions are the vast majority of your problem.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Poor Performing Query When running a Report

    From a quick first glance, yes.

    Function calls in your where clause are usually a performance killer (do they do data access? Post them if possible.)

    Convert'ing datetimes to varchars will...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Trouble Creating View based on Max Values and Group By

    The following is probably wrong, because I don't know what your data or table structure actually looks like, and I really don't think you gave us enough information to accurately...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: lock

    Not sure if I'm splitting hairs here, but you don't have a space after the DROP TABLE.

    If object_id(@lv_tablename) IS NOT NULL

    Begin

    Execute ('Drop table' + @lv_tablename)

    END

    That satement will render as...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Problem related to deletion of data from table using like key word

    Get rid of your extra quotes.

    delete FROM tableName where path like '%'+@path +'%'

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Determining whether a Stored Procedure returns a resultset

    SET FMTONLY ON

    http://technet.microsoft.com/en-us/library/ms173839.aspx

    Ran across this one as one of our client side apps was running it on its own and it drove me NUTS until I managed to catch it...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Trying to rewrite RBAR Function

    I actually heard about persisted computed the other day and haven't had a chance to look into exactly how one sets them up yet. I'd be interested to see...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Get 2nd Occurence

    Here's another way to do it. (Not saying it's any better) If you're doing this on a whole column, you're likely going to want to look...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 15 posts - 751 through 765 (of 1,473 total)