none
Displaying code in my posts. RRS feed

  • Question

  • In other forums I can use the option of putting my source code inside [code] [/code] tags. Is there some comparable feature of this forum that will make my posts more readable? 
    Friday, April 8, 2011 10:15 PM

Answers

  • Yes, take a look at the toolbar above the message when you write it and the very last button (close to HTML button). Pressing this button allows you to insert a code block and select a language. Internally it resolves to pre tags (with the code attribute).

    -- THIS IS SQL code SAMPLE
    
    select * from cashmgmt where closeout = 6
    select * from servbank 
    --update top (20) cashmgmt 
    --set closeout = 6, entrytype = 2
    
    --declare @t table (FirstName char(10))
    --insert into @t 
    --select 'Test'
    --union all select null
    --union all select SPACE(10)
    
    --select CASE when LEN(FirstName) > 0 then FirstName else 'First Name Not Found' end as FirstName from @t 
    
    


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    • Marked as answer by S.e.p.y Friday, April 8, 2011 10:39 PM
    Friday, April 8, 2011 10:29 PM
    Moderator

All replies

  • Yes, take a look at the toolbar above the message when you write it and the very last button (close to HTML button). Pressing this button allows you to insert a code block and select a language. Internally it resolves to pre tags (with the code attribute).

    -- THIS IS SQL code SAMPLE
    
    select * from cashmgmt where closeout = 6
    select * from servbank 
    --update top (20) cashmgmt 
    --set closeout = 6, entrytype = 2
    
    --declare @t table (FirstName char(10))
    --insert into @t 
    --select 'Test'
    --union all select null
    --union all select SPACE(10)
    
    --select CASE when LEN(FirstName) > 0 then FirstName else 'First Name Not Found' end as FirstName from @t 
    
    


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    • Marked as answer by S.e.p.y Friday, April 8, 2011 10:39 PM
    Friday, April 8, 2011 10:29 PM
    Moderator
  • Can't believe I missed something so obvious. Thanks!
    Friday, April 8, 2011 10:39 PM