Forum Replies Created

Viewing 15 posts - 1,186 through 1,200 (of 1,473 total)

  • RE: Help with confusing IF or CASE statement

    Please refer to the link in my signature for an example of how to post table definition and sample data. There will probably be additional questions on this one,...

    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: Query in 2000 returns in 1 second, in 2005 it runs for more than six minutes

    I know it's the order by that's causing it, but I don't understand why it's causing the issue.

    So if you remove the Order By, it functions the same on...

    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: Need help on performance and integrity

    smunson (11/3/2008)


    Unfortunately, your example from several pages back conflicts with a statement by the OP that no range contains a duplicate, and your example starts out with one, unless he...

    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: Please need help on looping through the dataset!!!

    Thanks for the feedback moin6, glad we could help. Feel free to post your other questions as well.

    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: Need help on performance and integrity

    Did you see my breakdown of the logic involved? I think it's pretty unambiguous, and covers all scenarios. The logic behind it is actually not as complicated 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: Need help on performance and integrity

    Dan, any updates for us on the performance and integrity of any of the proposed solutions? I believe there are at least 3 right now (Mine, anzio's and bhovious'......

    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: Calling stored proc to insert record in one table

    Yes, I pointed it out in my last post, however, why would commented out code be relevant?

    I either overlooked that or it wasn't there when I initially read the reply......

    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: Calling stored proc to insert record in one table

    The commented out criteria in your original cursor declaration was

    -- ScheduleId IS NULL AND StartDtTm > '10/20/2008'

    This would give you a set where all ScheduleID's were null. Then, at...

    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: Calling stored proc to insert record in one table

    Can the cursor be written against a CTE and then the update happen on the regular table?

    The issue isn't the cursor itself, it's the fact that you've got NULL =...

    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: Calling stored proc to insert record in one table

    I don't use cursors much, but it seems like you're missing a FETCH NEXT within your loop. You fetch the first set initially, and then begin your loop, but...

    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: How to return 1 result from many records in a view?

    I think I'm understanding you correctly. I had to compromise a bit with the LIKE, as you only wanted 1 row when you selected everything (which means you can't...

    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: UPDATE STATEMENT (SET BASED?) HOW DOES IT PROCESS, I GUESS

    Yerp. I actually gave an example earlier where I used a table variable, but it doesn't support the WITH INDEX clause, and this actually served as a reminder that...

    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: UPDATE STATEMENT (SET BASED?) HOW DOES IT PROCESS, I GUESS

    Think you're looking for something like this. One of the biggest issues is you forgot something vital... something that rhymes with "Flustered Windex".

    PRIMARY KEY CLUSTERED(RowID, SegmentID, STEP2)

    [font="Courier New"]        DECLARE...

    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: Please need help on looping through the dataset!!!

    You don't need a loop, or a cursor. All you need to do is:

    1. Create a clustered index on your row# column. (It is most likely already...

    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: Group Records on a single row

    This is a duplicate thread. Please direct future replies to:

    http://www.sqlservercentral.com/Forums/Topic595159-338-1.aspx

    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 - 1,186 through 1,200 (of 1,473 total)