-
Free PL/SQL Online Formatter
Hi, I added PL/SQL formatting rules in version 2 of my free online SQL Formatter on . I appreciate any feedback.
Regards
GuidoMarcel
Last edited by marist89; 09-08-2005 at 12:34 PM.
-
Nice
Just tested some of unformatted code. Seems nice tool. Keep it up.
Tarry Singh
I'm a JOLE(JavaOracleLinuxEnthusiast)
--- Everything was meant to be---
-
I think you program needs some correction.
Code:
Original SQL Statement:
SELECT
-- a.osuser "OS User",
c.spid "PID",
a.username "ORA User",
to_char(a.sid)||','||to_char(a.serial#) "ORA Sid",
a.status "Status",
-- substr(a.program,1,25) "Program",
b.sql_text "SQL Text"
FROM v$session a, v$sqltext_with_newlines b, v$process c
WHERE a.sql_address = b.address
AND a.sql_hash_value = b.hash_value
AND a.type != 'BACKGROUND'
AND a.paddr = c.addr
ORDER BY a.status, a.osuser, a.username, a.sid, b.piece ;
Formatted SQL from your web site:
SELECT
-- a.osuser "OS User",
c.spid "PID"
, a.username "ORA User"
, to_char(a.sid)||','||to_char(a.serial#) "ORA Sid"
, a.status "Status"
,
-- substr(a.program,1,
25)
*********************************************
* Last bracket has no matching OPEN bracket *
********************************************* "Program"
, b.sql_text "SQL Text"
FROM v$s ession a
, v$sqltext_with_newlines b
, v$process c
WHERE a.sql_ad dress = b.address
AND a.sql_hash_value = b.hash_value
AND a.ty pe != 'BACKGROUND'
AND a.paddr = c.addr
ORDER BY a.status
, a.os user
, a.username
, a.sid
, b.piece
Take care of the --.
Overall, your progam is good.
Good Luck.
Tamil
Last edited by tamilselvan; 09-08-2005 at 10:45 AM.
-
HI tamilselvan,
thank you for your feedback.
I played around with your SQL but I could not reproduce the problem.
I get the formatting like this:
Code:
SELECT
-- a.osuser "OS User",
c.spid "PID",
a.username "ORA User",
to_char(a.sid)||','||to_char(a.serial#) "ORA Sid",
a.status "Status",
-- substr(a.program,1,25) "Program",
b.sql_text "SQL Text"
FROM
v$session a,
v$sqltext_with_newlines b,
v$process c
WHERE
a.sql_address = b.address
AND a.sql_hash_value = b.hash_value
AND a.type ! = 'BACKGROUND'
AND a.paddr = c.addr
ORDER BY
a.status,
a.osuser,
a.username,
a.sid,
b.piece ;
I would really like to eliminate this error. Could you please describe in more details what you did. thanks for your effort in advance
GuidoMarcel
-
The SQL was captured from query output and was opened in vi editor.
That may be the reason I am getting the wrong format.
Tamil
-
Hi Tamil,
thanks for your feedback
Regards
Guido
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|