Forum Replies Created

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

  • RE: Master - Child sharing

    This is a very rough first attempt. Ran out of time to clean it up today (and as a result it's pretty messy with bad aliases and data types...

    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: Best way to alias column names

    JustMarie (6/17/2011)


    Phil Parkin (6/17/2011)


    If you write a lot of T-SQL, consider doing yourself a favour and omit the readability words (AS is one) - it soon becomes second nature 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: Need help in writting SQL

    Sorry, It doesn't need to uniquely identify rows in the table, just the items on the order.

    I'm assuming the real table is more complex, perhaps with an ItemNumber,...

    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 in writting SQL

    Here's one way. This is assuming that ItemName can uniquely identify the items.

    DECLARE @NewSNnvarchar(50),

    @OldSalesOrderIDint,

    @NewSalesOrderIDint

    SELECT@OldSalesOrderID = 1,-- Order to be Copied

    @NewSN = 'AFFI'-- SN for the new Order (May 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: Best way to alias column names

    I tend to use tabs to line things up in cases where I've got a lot of field names that are all aliased. If the vast majority of fields...

    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: Are the posted questions getting worse?

    Awesome! Congrats Lynn!

    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: Are the posted questions getting worse?

    WayneS (6/3/2011)


    Well, while being an MVP is a pretty big deal, it does not mean you have a higher knowledge. It's really more of an evangelistic award for promoting 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: Are the posted questions getting worse?

    Oh, and you forgot MCP! :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: Are the posted questions getting worse?

    Heh. I'm surprised at 2 things.

    1. They all fit on one line (On my screen anyways).

    2. I actually know what they all are!

    Very nice list though.

    Is it...

    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: Are the posted questions getting worse?

    I saw the big bowl of alphabet soup get added onto Gus' signature and figured this would be the place to figure out what led up to it. Only...

    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 do in insert into table after splitting using tally?

    peter.row (5/19/2011)


    You are right of course, I apologise for my harshness. :blush:

    I guess in my career dynamic SQL has been a last resort kind of thing in an attempt 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: how do in insert into table after splitting using tally?

    peter.row (5/19/2011)


    Using dynamic SQL like this is equal to the last S in KISS - Stupid!

    SQL Injection attack waiting to happen.

    Could be. That's why I said "depending 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: how do in insert into table after splitting using tally?

    No, to replace his empty strings with NULLS. Most of the time you wouldn't really want to insert empty strings into fields. As you said though, it depends.

    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: Conditional SQL Version check

    You can also use dynamic SQL to create the index. It is not parsed during sp compilation and would not throw the errors.

    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 do in insert into table after splitting using tally?

    Yeah, you'd probably want to throw a NULLIF('<data>' ,'') in the replace 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]

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