Forum Etiquette: How to post data/code on a forum to get the best help

  • Hi Mark,

    It's just the way this forum handles things when they repost an article... no updates were actually made.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff,

    Like the article. One suggestion though (not sure if this has already been raised in the comments - too many to look through), lots of people have problems posting XML, some information on how to mod it so it appears and isn't interpreted as HTML would be useful.

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • Hi Mark,

    Thanks for the feedback.

    On the posting of XML you mentioned... The best thing to do would be to simply attach the XML as a file...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • "...Create Some Table Code

    Yeah, this first part is all manual... but, it's worth it and it doesn't take any real time, at all. It does, however, do several very important things..."

    There is a way to get rid of the manual part:

    If the table exists in the database, then, from the console manager -> "all tasks"

    -> "Generate SQL script", you obtain the complete script

    Sorry for the cross-posting. This is where this comment should have been directed in

    the first place. (I made the mistake of using the "Join Discussion" link).

  • Jusst the slider:

    This is what you get when you post NO code. An illustration of the point made by Jeff.

    Regards

  • Heh... that's funny. Not what I intended but sure is true.

    What's in the box with just a slider is a single line of code about 480 characters wide... totally unformatted gar-ba-ge`!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • And I also liked the bit on the CSV generator.

  • Thanks Jeff for this reminder.

    What we also need to eliminate are:

    1. The postings where the poster didn't even bother to look at the online documentation (Books Online aka BOL) first. Example: How do a create a table?

    2. The postings that are similar to "what is the meaning of life"? Example: Can you tell me everything about .


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]

  • JohnG (2/22/2008)


    2. The postings that are similar to "what is the meaning of life"? Example: Can you tell me everything about .

    The answer to that is 42 of course....:D

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • In case anyone else wants to use Jeff's example and is lazy like me:

    copy/save as a template (.tql) under C:\Program Files\Microsoft SQL Server\80\Tools\Templates\SQL Query Analyzer--------------------------------------------------------------------

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • J (2/1/2008)


    And I also liked the bit on the CSV generator.

    Just gotta have more than 1 tip per article... thanks for the feedback, J.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • JohnG (2/22/2008)


    Thanks Jeff for this reminder.

    What we also need to eliminate are:

    1. The postings where the poster didn't even bother to look at the online documentation (Books Online aka BOL) first. Example: How do a create a table?

    2. The postings that are similar to "what is the meaning of life"? Example: Can you tell me everything about .

    You bet, John... thanks for the feedback...

    Ummmmm.... can you tell me everything about how to create 42 tables? 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • jcrawf02 (5/20/2008)


    In case anyone else wants to use Jeff's example and is lazy like me:

    copy/save as a template (.tql) under C:\Program Files\Microsoft SQL Server\80\Tools\Templates\SQL Query Analyzer--------------------------------------------------------------------

    Sigh... if only everyone were that "lazy". Thanks for the code and the feedback! 🙂

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • By the way... the code in the "too small" code window looks like this...

    [font="Courier New"]select v.* from #mytable v, ( select min(id) as firstidofstagnation from #mytable v, ( select min(id) as lastidbeforestagnation from ( select top 2 value, max(id) as id from #mytable group by value order by max(id) desc )x )ls where v.id > ls.lastidbeforestagnation )fs where v.id = fs.firstidofstagnation[/font]

    I pretty much ignore posts like that... I just don't have the time to help someone who has no time to help themselves by formatting the code. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • My Pet Peeve:

    Posters who say "...this returns an error." or "...this doesn't work."

    People; PLEASE do not leave it at this, give us ALL of the relevant information! If it doesn't work, tell us what it does (and what it should do)! And if it returns an error, for heaven's sake, tell us what the error is!

    Maybe you could add something about that...?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 15 posts - 76 through 90 (of 211 total)

You must be logged in to reply to this topic. Login to reply