Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> 9.2.0.5 SQL-s converted to UPPER case & comments are truncated.
I would like to share my observation.
May be only I was unaware ;)
Is it known feature?
Take a look:
BANNER
SYS:IKS01> select executions, hash_value, sql_text from v$sql SYS:IKS01> where upper(sql_text) like upper('%dual where 0=4%') SYS:IKS01> and upper(sql_text) not like upper('%declare%') SYS:IKS01> and upper(sql_text) not like upper('%from v$sql%') SYS:IKS01> /
no rows selected
SYS:IKS01> save bu rep
Wrote file bu.sql
SYS:IKS01> declare v_n number; SYS:IKS01> begin SYS:IKS01> select /* Please don't take this comment away ;) */ count(*)into v_n from Dual where 0=4;
SYS:IKS01> @bu
EXECUTIONS HASH_VALUE SQL_TEXT
---------- ----------
1 2534927737 SELECT COUNT(*) FROM DUAL WHERE 0=4 1 row selected.
SYS:IKS01> declare v_n number; SYS:IKS01> begin SYS:IKS01> SeLeCt /* YOU CAN WRITE SQL IN ANY CASE YOU'LL GET THE SAME ;)*/ count(*) into v_n from Dual where 0=4; SYS:IKS01> end;
SYS:IKS01> @bu
EXECUTIONS HASH_VALUE SQL_TEXT
---------- ----------
2 2534927737 SELECT COUNT(*) FROM DUAL WHERE 0=4 1 row selected.
SYS:IKS01> declare v_n number; SYS:IKS01> begin SYS:IKS01> select /*+ Please don't take this comment away ;) */ count(*)into v_n from Dual where 0=4;
SYS:IKS01> @bu
EXECUTIONS HASH_VALUE SQL_TEXT
---------- ----------
1 1805064747 SELECT /*+ Please don't take this comment away ;) */
COUNT(*) FROM DUAL WHERE 0=4
2 2534927737 SELECT COUNT(*) FROM DUAL WHERE 0=4
2 rows selected.
SYS:IKS01> sElEcT /* For NON-REC SQL case is still IMPORTANT */ count(*) FROM DUAL WHERE 0=4; COUNT(*)
0
SYS:IKS01> @bu
EXECUTIONS HASH_VALUE SQL_TEXT
---------- ----------
1 1805064747 SELECT /*+ Please don't take this comment away ;) */ COUNT(*) FROM DUAL WHERE 0=4
2 2534927737 SELECT COUNT(*) FROM DUAL WHERE 0=4 1 1182738150 sElEcT /* For NON-REC SQL case is still IMPORTANT */count(*) FROM DUAL WHERE 0=4
3 rows selected.
Jurijs
9268222
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlReceived on Thu Jul 08 2004 - 11:22:00 CDT
-----------------------------------------------------------------