CTE Syntax

  • GilaMonster (4/5/2015)


    Grant Fritchey (3/31/2015)


    Steve Jones - SSC Editor (3/31/2015)


    Grant Fritchey (3/31/2015)


    I use semicolons on terminators for all my statements. Everyone should.

    You do or Prompt does it for you?

    Well, Prompt does it for me now. I used to do it on my own, but now, yeah, all automated.

    Personally, I add them as I'm coding. When I'm cleaning up or rewriting someone else's code (or my old code), I'll start with a format, insert ;, remove [], but from there on I'll write it 'correctly'

    Remove []?

    I don't think you will like me. :w00t:

  • xsevensinzx (4/5/2015)


    GilaMonster (4/5/2015)


    Grant Fritchey (3/31/2015)


    Steve Jones - SSC Editor (3/31/2015)


    Grant Fritchey (3/31/2015)


    I use semicolons on terminators for all my statements. Everyone should.

    You do or Prompt does it for you?

    Well, Prompt does it for me now. I used to do it on my own, but now, yeah, all automated.

    Personally, I add them as I'm coding. When I'm cleaning up or rewriting someone else's code (or my old code), I'll start with a format, insert ;, remove [], but from there on I'll write it 'correctly'

    Remove []?

    I don't think you will like me. :w00t:

    Try out this keyboard sequence:

    😎

    1. CTRL + H

    2. [

    3. TAB

    4. ALT + A

    5. ENTER

    6. ]

    7. ALT + A

    8. ENTER

    9. ESC

  • Eirikur Eiriksson (4/5/2015)


    Try out this keyboard sequence:

    😎

    1. CTRL + H

    2. [

    3. TAB

    4. ALT + A

    5. ENTER

    6. ]

    7. ALT + A

    8. ENTER

    9. ESC

    And then manually fix all columns and table names that are not following the standard identifier rules. :angry:

    I love that keyboard sequence and use it all the time on the result of SSMS scripting stuff, but only if I know I can trust whoever came up with the table and column names.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Hugo Kornelis (4/8/2015)


    Eirikur Eiriksson (4/5/2015)


    Try out this keyboard sequence:

    😎

    1. CTRL + H

    2. [

    3. TAB

    4. ALT + A

    5. ENTER

    6. ]

    7. ALT + A

    8. ENTER

    9. ESC

    And then manually fix all columns and table names that are not following the standard identifier rules. :angry:

    I love that keyboard sequence and use it all the time on the result of SSMS scripting stuff, but only if I know I can trust whoever came up with the table and column names.

    The nice thing about SQLPrompt's square bracket removal is that it won't remove them from around object/column names which need them, eg the transaction table

    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
  • PET PEEVE!

    Semicolons (;) are not BEGININATORS they are TERMINATORS and belong at the end of SQL statements.

Viewing 5 posts - 61 through 64 (of 64 total)

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