when I set cursor_sharing=force, some of the functionality of the app break and I am runnning on 9i, below is the statement that would break on the app:
Code:
SELECT sum(PCT_INT) TOTRI FROM PARTY_INTERESTS WHERE GROUNP_NUM = @GROUP " + _
" AND PIP_TYPE_CODE IN ('RI', 'ROI') "
"SELECT GROUNP_NUM, SUM(PCT_INT) TOTRI FROM PARTY_INTERESTS" + _
"WHERE GROUNP_NUM IN (SELECT GROUNP_NUM FROM TEAM WHERE AGMT_NUM = @AGMT_NUM AND SUBS_NUM <> '000') " + _
"AND PIP_TYPE_CODE IN ('RI', 'ROI') " + _
"GROUP BY GROUNP_NUM"
the statement executed ok from SQLPLUS; however, it will brek from the app. why????
when I set cursor_sharing=force, some of the functionality of the app break and I am runnning on 9i, below is the statement that would break on the app:
Code:
SELECT sum(PCT_INT) TOTRI FROM PARTY_INTERESTS WHERE GROUNP_NUM = @GROUP " + _
" AND PIP_TYPE_CODE IN ('RI', 'ROI') "
"SELECT GROUNP_NUM, SUM(PCT_INT) TOTRI FROM PARTY_INTERESTS" + _
"WHERE GROUNP_NUM IN (SELECT GROUNP_NUM FROM TEAM WHERE AGMT_NUM = @AGMT_NUM AND SUBS_NUM <> '000') " + _
"AND PIP_TYPE_CODE IN ('RI', 'ROI') " + _
"GROUP BY GROUNP_NUM"
the statement executed ok from SQLPLUS; however, it will brek from the app. why????
will not work always as you expected because the lengths of columns returned to the application will vary. For example, the query expected varchar2(5) but oracle may return 30 characters. That's why your application failed.
You should not use "FORCE" in your prod env.
PHP Code:
SQL> alter session set cursor_sharing=force;
Session altered.
SQL> select substr(object_name,1,4) xxx from dba_objects where rownum < 3;
Bookmarks