Forum Replies Created

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

  • RE: Left join would not work with a "where" clause

    I'm confused, how is it you are expecting the name to be equal to something and nothing at the same time? You're comparing the same field to 2 completely...

    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 using SQL to generate random string?

    To further clarify / agree with Bit, I'm reminded by my more math inclined buddies that even at 95% coverage, on average you're still only going to be doing 20...

    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 using SQL to generate random string?

    bitbucket-25253 (11/23/2009)


    O.K. forced to disagree with you on several points. Tested a few different methods inserting into this table structure, which diffuses your comment

    Always happy to be disagreed with! :hehe:

    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 the SQL statement that triggered a trigger

    This is a known deficiency unfortunately. DBCC INPUTBUFFER is still around for this reason. I whipped up some test code to demonstrate some of this... and was rather...

    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: Rounding - Is there a better way

    OP, correct me if I'm wrong here, but let me attempt to explain this better. He's not just trying to round up every time. Here's a couple examples:

    7.0449

    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: How using SQL to generate random string?

    And even though these random string generators may be very good for what they do, none of them get you out of having to do a loop to create 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: Rounding - Is there a better way

    Aside from the question of 'what makes that correct rounding', considering you are essentially rounding 44.9 up to 50(upwardly skewing your data), there are a few methods you could use...

    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 using SQL to generate random string?

    Sharul Nizam (11/21/2009)


    Garadin (11/21/2009)


    Before we give you crazy solutions to accomplish this, could you share the reason for it and what you hope to accomplish?

    1. Me just want 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: How using SQL to generate random string?

    Before we give you crazy solutions to accomplish this, could you share the reason for it and what you hope to accomplish?

    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: Results Different from inside a proc

    I'm sorry, but how is that the same code? You've introduced half a dozen new variables, any one of which could be causing the problems. I'd debug the...

    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: SQL Query Issue

    ISNULL(YourTable.DateField,GETDATE() ) DateField, ISNULL(CountField, 0) CountField

    Note that that code displays the exact date with the time portion, you could also trim off the time portion to show just the date....

    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 code to group data into comma delimited column

    Edit: Silly late night forum lag.

    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 code to group data into comma delimited column

    i'm pretty sure it still works, i changed my 2005 database to compatibility level 80, and it worked just fine, but you'll need to test it:

    Alas, 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: Inserting rows while incrementing a field

    Oops, mine didn't handle NULLS or the fact that COL7 is actually a varchar. One sec...

    Modified:

    ;WITH SEL AS(

    SELECT T2.COLA COL1,...

    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: Inserting rows while incrementing a field

    The problem is the way SQL handles these. That will be an all at once operation, meaning that every line you insert will use the same MAX value +...

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