New Code formatting engine rolled out

  • SELECT @XML = '<outer>

    <inner>

    value

    </inner>

    </outer>'

    SELECT @XML = '<outer><inner>value</inner></outer>'

    Edit: It's the presence/absence of line breaks. If there's a linebreak anywhere in the code block, the < and > come out correct. If not, they get converted to < and >

    DBCC CHECKDB (<Database Name>)

    WITH NO_INFOMSGS, ALL_ERRORMSGS

    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
  • GilaMonster (10/8/2009)


    SELECT @XML = '<outer>

    <inner>

    value

    </inner>

    </outer>'

    SELECT @XML = '<outer><inner>value</inner></outer>'

    Edit: It's the presence/absence of line breaks. If there's a linebreak anywhere in the code block, the < and > come out correct. If not, they get converted to < and >

    DBCC CHECKDB (<Database Name>)

    WITH NO_INFOMSGS, ALL_ERRORMSGS

    Wow - very interesting, so this should work... Edit: yes, it did 😉

    SELECT <column list>

    FROM <your table>

    WHERE <your criteria>

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Something tells me this is not the documented behaviour. I call bug.

    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
  • GilaMonster (10/8/2009)


    Testing....

    Using an inequality character

    SELECT session_id FROM sys.dm_exec_requests WHERE session_id > 50

    Using escape codes for inequality

    SELECT session_id FROM sys.dm_exec_requests WHERE session_id > 50

    Using angle brackets to designate a placeholder

    USE <Database Name>

    Using escape codes to designate a placeholder

    USE <Database Name>

    Edit: Ok, can someone tell me the secret to posting angle brackets please?

    [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]

  • RBarryYoung (10/8/2009)


    GilaMonster (10/8/2009)


    Testing....

    Using an inequality character

    SELECT session_id FROM sys.dm_exec_requests WHERE session_id > 50

    Using escape codes for inequality

    SELECT session_id FROM sys.dm_exec_requests WHERE session_id > 50

    Using angle brackets to designate a placeholder

    USE <Database Name>

    Using escape codes to designate a placeholder

    USE <Database Name>

    Edit: Ok, can someone tell me the secret to posting angle brackets please?

    Hmm, I have to agree with the others: this worked in my preview, but obviously not for real. We need for the preview and the posts to be consistent, and we need to know what the rules are to get angle prackets to work correctly.

    [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]

  • GilaMonster (10/8/2009)


    SELECT @XML = '<outer>

    <inner>

    value

    </inner>

    </outer>'

    SELECT @XML = '<outer><inner>value</inner></outer>'

    Edit: It's the presence/absence of line breaks. If there's a linebreak anywhere in the code block, the < and > come out correct. If not, they get converted to < and >

    DBCC CHECKDB (<Database Name>)

    WITH NO_INFOMSGS, ALL_ERRORMSGS

    Well-spotted.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • This was removed by the editor as SPAM

Viewing 7 posts - 31 through 36 (of 36 total)

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