Forum Replies Created

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

  • RE: Transactions & Cursors

    It will, a cursor doesn't change anything.

    Example:

    CREATE TABLE #a(id int IDENTITY(1,1), a char(1))

    INSERT INTO #a(a)

    SELECT 'a' UNION ALL

    SELECT 'a' UNION ALL

    SELECT 'a' UNION ALL

    SELECT 'a'

    GO

    DECLARE @id int

    BEGIN TRAN

    DECLARE Test CURSOR...

    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: String Parsing Hell

    How about adding a

    CASE WHEN PATINDEX('%[0-9]%',VERISIONVAL) = 0 THEN 1 ELSE 0 END,

    In fron

    t of the other ORDER BY criteria (Order by anything that has a number first,...

    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: Function - Working out Business Minutes, there must be an easier way??

    Also, the table gives you a couple other benefits:

    If you don't have any rhyme or reason for a time that is not work time (The building catches on fire and...

    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: Function - Working out Business Minutes, there must be an easier way??

    Here's how I would approach it. Note that I didn't do the math on the numbers CTE, I could have overblown the number I needed, but it's a 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: Working with Extremely Large Execution Plans in SQL2000

    Excellent tip John, thank you. That has already led to me finding one of the many many things that need to be adjusted with this 'process'.

    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: Working with Extremely Large Execution Plans in SQL2000

    So far, the best I've come up with is to run a profile on the SPID and include the SHOWPLANSTAT events with the binary data, save the trace to a...

    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: Stored Proc that joins based on parameters??

    Did you read through the blog posts that Gail linked? They explain why cached plans are not always a benefit for things like this.

    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: Stored Proc that joins based on parameters??

    Dynamic SQL would stop you fro having to update the SP. If you're unaware of the dangers of SQL injection, make sure you do some research on it before...

    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: Auto Generating Scripts in SQL Server 2005

    roelofsleroux (10/30/2009)


    THANKS diamondgm

    Your solution works the best.

    Problem is guys we are getting source safe next year so for now i need an easy and uncomplicated solution.

    A couple things. Were...

    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: Discussion: Removing the option to ' SELECT * FROM OBJECT'

    I find the argument to remove options and functionality in an effort to cater to ignorant/lazy people to be remarkably silly. (No offense intended) Extend that argument to...

    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: Auto Generating Scripts in SQL Server 2005

    I would personally look into the new DDL triggers available in 2005. You should be able to create triggers on create/alter/update for relevant objects to script out whenever they're...

    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: What do you use to store useful t-sql code?

    I just re-installed notepad++ this morning with the intention of using it instead of notepad for all of my quick ad hoc notes to myself and possibly more. Does...

    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: Too many query windows open at once!

    Several things about SSMS bugged me when I finally made the transition from QA. One thing that has saved it from being an unused icon again is that with...

    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: Date and Time Selection Query

    Dave Ballantyne (10/30/2009)


    Personally, i would calculate the number of seconds from 01jan1970 you are interested in and

    select * from tblTest where time between X and Y

    OP,

    If taking this...

    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: Weird Performance Issue with INSERT INTO calling remote procedure

    There's really not enough information here for us to do anything with. Take a look at this article that Gail wrote:

    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

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