When posting questions in the forums with TSQL code, it may be a good idea to format your code so that it looks better in the forums. When the code is formatted and keywords are colored, it will make the code easier to understand.
You can add formatting to the code by placing your code between a <pre> block. Here is an example of a piece of code that uses formatting tags.
<pre class="brush:sql"> -- Check current time SELECT GETDATE() </pre>
The above code will be formatted and printed as follows in the forums
-- Check current time SELECT GETDATE()
Jacob Sebastian, SQL Server MVP
See this post that explains how to format TSQL code listing when posting in this forum.
Thanks, But sometimes evethough I do it, by default it adds this tag
<divre...>...</divre>
Any reason?
Madhivananhttp://beyondrelational.com/blogs/madhivanan
Yes. Usually I do this only
I tried several times to set my text correctly using HTML editor, but it didn't work :( I'm using IE 8 and I tried to do everything in the HTML editor - it still didn't work after I pressed 'Update' button.
I was doing it directly in the editor you have on this site, then pressing Html button, then inserting pre tags there, then pressing update. It didn't work and when I went back to HTML view I saw divpre tag instead of pre tag I put.
Test of the code here.
select @@VERSION