Forum Replies Created

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

  • RE: A maths puzzle for anyone up for a challenge!

    Another take on it. Simple... but I think Eugene's might be faster. It's a lot closer with a physical tally table, but I think his still wins.

    CREATE...

    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: Temp Table Name confusion with Nested Procedures?

    I'm just glad I decided to test it before I answered... or I'd have been wrong. :hehe:

    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: Temp Table Name confusion with Nested Procedures?

    Temp tables created in the outer SP are available to the Inner SP, so you should definitely avoid this, as creating one with the same name will be confusing... 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: For And ForEach Loops

    filipeesch (7/1/2011)


    I'm not doing simple updates. Its a logic that a simples SQL command dos not resolve.

    Are you sure about that? Can you post the code?

    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: T SQL Joins

    Nope, it does not.

    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: Indexes:Few querries

    There will likely be much better answers to follow, but I'll attempt this one.

    1. There is very little difference between a clustered index scan and a table scan. ...

    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: Finding which supplier provided services to more than one team.

    My pleasure.

    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: Mask a column for SSMS

    I think he 'cheats' by having a big repository of all these code snippets right at hand!

    Yes I'm jealous =).

    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: Mask a column for SSMS

    Sean Lange (6/24/2011)


    Excellent. Thanks Lowell. Of course now I have no excuse not to work this afternoon. 😛

    Heh, well, I was watching my other monitor coming up with my own...

    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: Mask a column for SSMS

    Right, the triggers aren't for the selects, they're for the insert/update/deletes, so that they update back the original table when people take actions on your view that would normally be...

    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: Mask a column for SSMS

    So even a view with instead of triggers won't work in this case to completely replace the original table in the eyes of the app? (I'm aware you probably...

    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: Finding which supplier provided services to more than one team.

    SELECT Sup.NAME, T.NAME, SUM(S.Spend) Spent

    FROM Suppliers Sup

    INNER JOIN Spend S ON Sup.SupplierID = S.SupplierID

    INNER JOIN Team T ON T.TeamID = S.TeamID

    WHERE S.SupplierID IN (SELECT SupplierID FROM Spend GROUP BY SupplierID...

    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: Splitting complex queries into two parts?

    The answer to this might change if joins are in the equation though. I don't know that the optimizer will always choose to apply the criteria before it attempts...

    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: Select multiple rows into one row

    It's hard to tell based on your description whether you want these values concatenated (All values in one column) or pivoted (each value in its own column, but all 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: counting records and summing money amount

    Note that it's being removed in Denali:

    (From the 2008 R2 BOL)

    This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new...

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