|
|
|
Re: Where did the code tags sticky go in pl/sql? [message #509185 is a reply to message #509184] |
Thu, 26 May 2011 07:22 |
|
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
oops...
Don`t know whether it is possible or not for little foot to replace it back as earlier ...The following will help us if she does n`t have any backup of it ...
Quote:How to format your post?
If you are providing code snippets such as SQL*Plus copy/paste, please be sure to use formatting tags:
It makes a huge difference to the forum readers. Unreadable code makes a question harder to understand and will delay answers. A lot of people don't spend that much time on the forum and unclear posts will be skipped more often because they take a lot more time to decipher.
The difference between the code blocks below is clear:
First a block without proper tags, you'll notice that it is not that readable:
DECLARE
CURSOR yourcursor
IS
SELECT yourcolumn
, another_column
FROM yourtable
WHERE some_column BETWEEN A AND B
AND some_other > SYSDATE;
BEGIN
FOR a_record IN yourcursor
LOOP
do_something_here;
IF a_record.another_column = 1
THEN
do_extra_stuff;
ELSE
do_other_stuff;
ELSE;
END LOOP;
END;
Now, the same PL/SQL block this time with use of the code tags. It clearly delineates the code from the other text and preserves text indenting.
DECLARE
CURSOR yourcursor
IS
SELECT yourcolumn
, another_column
FROM yourtable
WHERE some_column BETWEEN A AND B
AND some_other > SYSDATE;
BEGIN
FOR a_record IN yourcursor
LOOP
do_something_here;
IF a_record.another_column = 1
THEN
do_extra_stuff;
ELSE
do_other_stuff;
ELSE;
END LOOP;
END;
You can also paste the code in your message, select it and hit this button .
What if the code is not formatted itself? Code tags will do little about that. So you first have to format the code
by hand
via an external tool (like TOAD)
via the SQL Formatter page of OraFAQ.
Make sure that lines of code do not exceed 80 characters.
I have everything in my mails ...Except images..
When asking for assistance, sometimes you post your own code. In order to make it easier to read, you should use [code] tags. It isn't difficult - take a look!
Now see the difference - code you used to post is on the left, and the same code (the one you are about to post now and in the future) is on the right side:
For much more information, read OraFAQ Forum Guide.
Sriram
[Updated on: Thu, 26 May 2011 07:44] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Where did the code tags sticky go in pl/sql? [message #509259 is a reply to message #509254] |
Thu, 26 May 2011 12:50 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Littlefoot wrote on Thu, 26 May 2011 12:51Last time I checked I was male. Next check is scheduled for a year after Monday. Will let you know the results (if someone reminds me).
I assumed male. I assume everyone is male except those with obvious female non-alias names. I do not see people's avatars, as I have images blocked.
You should not have said "if someone reminds me" because I can bet you, some geek here (possibly me), will write it down somewhere to remind you in a year. I can almost guarantee someone will do it.
|
|
|
|
|
|
|
|
|
|
|