Forum Replies Created

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

  • RE: sql code to divide header value based on number of detail records

    When we say "script", we aren't referring to the script to solve your problem, although if you would like to show what you've attempted thus far, we can help you...

    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: Adding running number on groups of records in a table

    [Edited]

    Looks like you've got it. How long does it take to run against your 15M rows?

    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: Adding running number on groups of records in a table

    Chris Morris (1/8/2009)


    Garadin (1/8/2009)


    Think I just found a fitting avatar for myself for that matter.

    Isn't that Muffin?

    My turn to Google! Never heard of Muffin the Mule before... but no,...

    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: Adding running number on groups of records in a table

    Chris Morris (1/8/2009)


    Had to Google it Seth, movies take a while to cross the pond...but "a butler who takes an odd interest in feet" - GF might find that very...

    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: Adding running number on groups of records in a table

    Think I just found a fitting avatar for myself for that matter.

    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: Adding running number on groups of records in a table

    Hah! Awesome. By the way, have you considered using that butler from Mr. Deeds as your avatar? Very sneaky :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: How to make a Query betweenSQL Servers

    If they are set up as linked servers, you can just add the name of the server to the reference.

    Servername.DatabaseName.Schema.Table .

    If you don't want to use linked servers(not sure why...

    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: Adding running number on groups of records in a table

    john g (1/8/2009)


    LOL, it has been quite a day so far - 2 bad responses on my part...it has definitely taught me to read the OP carefully - and 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: Adding running number on groups of records in a table

    See the link in my signature for the standard running totals method. It will solve this no problem, and is the fastest method I've seen to handle these situations....

    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 link view and table together

    I can't think of any benefit of not storing the time information other than making it slightly easier to write queries against the table and not have to worry about...

    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: Parse string based on value in another table

    Here's an example of what I was talking about with the space padding.

    [font="Courier New"]CREATE TABLE A(

    Orig   VARCHAR(100))

    CREATE TABLE B(

    Bad    VARCHAR(25))

    INSERT INTO A(Orig)

    SELECT 'This is a string with A E I O...

    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: Parse string based on value in another table

    Here's a method. Ordinarily I wouldn't suggest this, but it sounds to me like it may be a one time thing for cleanup, and this is a fairly easy...

    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 with Update query

    Was there a question in there somewhere?

    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: Common Mistakes in T-SQL

    Sure, why not.

    Here's three:

    Expecting a list to be directly assignable to a variable.

    DECLARE @A varchar(50)

    SET @A = '1,2,3,4,5'

    SELECT *

    FROM SomeTable

    WHERE SomeField IN @A

    Trying to select where something = NULL

    SELECT...

    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: Return Average build cost based on last 5 Orders

    Average in Excel is Number1, Number2, ... You were giving it a range and then an extra 5, which was bringing down your average.

    (7+7+6.5+6.5+364.69+5) / 6 = 66.12

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