Which is better

  • Jeff - you are kidding aren't you?

    Alright... how'd ya do it? How'd you get that right parenthesis to hang out in mid air like that without it turning into a smiley face?

    Now let me see that I have it correctly

    )

    it needs a line of text (this line) below the parenthesis and your forum settings set to:

    Home>Control Panel>Forum Setting scroll down to Show Emoticons,

    and uncheck the select box.

    Or at least is how it works for me

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Heh... what I'd like to do is to be able to show emoticons AND leave a hanging parenthesis in the same post. None of the emoticons use just a parenthesis as their "key", but the ) shows up as a smiley face if you leave it hanging... like this...

    ) --This came from a hanging parenthesis

    The emoticons are a bit important so folks don't think I'm slinging porkchops when I don't intend to... 😀

    --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 Moden (12/6/2008)


    Actually, I'll take door #3 😛 ... performance is the same as WHERE EXISTS and it's even easier to read especially for newbies that may be on the team...

    Jeff, I agree with you completely when you know that there are no nulls in the set/subquery for the in clause. It can get fairly confusing for newbies what the final results will be if there are nulls.

    To quote from BOL:

    Any null values returned by subquery or expression that are compared to test_expression using IN or NOT IN return UNKNOWN. Using null values in together with IN or NOT IN can produce unexpected results.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/

  • Thanks for the alternative Jeff 🙂

    but I must say sorry I don't know how the hanging ) stayed as it did.

    )

    )

    Lets see what happens he he he

    OK I got it.

    If you have a tabs instead of spaces before the ) then it stays as it should and no smiley 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • Heh... dammit... I hate tabs. 😛 Thanks, Christopher.

    --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)

  • Really why do you hate tabs 🙁

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • First thing I do, and used to require in dev teams, is to set tools to replace tabs with spaces. Creates all kinds of issues.

    Need a KillAllTabs task in SSIS 🙂

  • What's the issue with tabs? I kinda hate spaces and normally replace them with tabs (for code formatting anyways). Do tabs cause some problem that I've never come across?

    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]

  • I agree

    I normally always replace spaces with tabs.

    I currently work with a tab the length of 4 spaces.

    But work with people that insist on reformatting my code to 2 or 1 space indentation which to be honest I find very very hard to read.

    a tab or 4 spaces makes every thing very clear 🙂

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • Steve Jones - Editor (12/12/2008)


    First thing I do, and used to require in dev teams, is to set tools to replace tabs with spaces. Creates all kinds of issues.

    I used to insist on all tabs with my dev teams. Was easy to spot when the didn't. I use a tab stop of 2, rather than the usual 4.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Tab settings can be inconsistent, and so if you try to line things up, or open someone else's code, 2 tab stops could result in things being unreadable. Plus everyone will use spaces at times, so it really gets whacked.

    If you set the tool to replace tabs with spaces, you can still use the tab key, it just inserts spaces, so things are consistently formatted on all machines, not just yours.

  • Steve Jones - Editor (12/12/2008)


    Tab settings can be inconsistent, and so if you try to line things up, or open someone else's code, 2 tab stops could result in things being unreadable. Plus everyone will use spaces at times, so it really gets whacked.

    If you set the tool to replace tabs with spaces, you can still use the tab key, it just inserts spaces, so things are consistently formatted on all machines, not just yours.

    I have to agree. I have SSMS and UltraEdit set to replace tabs with spaces and I have tab stops set to 4 spaces. It keeps things readable, and it looks the same regardless who loads it. I have seen people that have used tab stops of 5,6, or 8. The code gets funky when loaded with different settings. We need to encourage consistancy between team members. Standards are great everyone has one and they are all different!

  • Lynn Pettis (12/12/2008)


    Steve Jones - Editor (12/12/2008)


    Tab settings can be inconsistent, and so if you try to line things up, or open someone else's code, 2 tab stops could result in things being unreadable. Plus everyone will use spaces at times, so it really gets whacked.

    If you set the tool to replace tabs with spaces, you can still use the tab key, it just inserts spaces, so things are consistently formatted on all machines, not just yours.

    I have to agree. I have SSMS and UltraEdit set to replace tabs with spaces and I have tab stops set to 4 spaces. It keeps things readable, and it looks the same regardless who loads it. I have seen people that have used tab stops of 5,6, or 8. The code gets funky when loaded with different settings. We need to encourage consistancy between team members. Standards are great everyone has one and they are all different!

    Roger that. Just made the change. Mine was set to 8. It always kinda bugged me that it was so big, but never really bugged me enough to change it. Now set to 4, with save tabs as spaces. Still not sure about this whole terminating semi-colon deal though.

    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]

  • I like tabs and I use 6 and I like to set it to 6 even if I change set it to use spaces. One of those personal things.

  • Jack Corbett (12/12/2008)


    I like tabs and I use 6 and I like to set it to 6 even if I change set it to use spaces. One of those personal things.

    I like four spaces, personal thing as well, as it helps keep the code from scrolling off the side of the screen. I don't mind scrolling up and down, but really hate it when I have to scroll up and down and left to right to see the code.

Viewing 15 posts - 16 through 30 (of 38 total)

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