Avoid the arrayindexoutofbound exceptio
hi,
java.lang.ArrayIndexOutOfBoundsException: 7
i am getting this error while clicking the submit button.actually i am using display tag in .jsp. In that displaytag i have one text box.displaytag size is 5.i am getting data from DB.here we have pagination(previous and next).first time it show 5 details if i click next.it showing another five.i have check box if i click next and i select 7 check box and give the values in that text box .and clicking the submit button.that time i am getting that error.
i am using the bellow code
int chkBoxLength = unConfirmChkBox.length;
for (int i = 0; i < chkBoxLength; i++) {
int index = Integer.parseInt(unConfirmChkBox) - 1;
safeKeepAcctDisplayVO = (CADisplayPropertyVO) caDetailsForm.getUnConfAccDisplayList().get(index);
if(caDetailsForm.getUnConfAccDisplayList() != null){
for(int i=0;i<caDetailsForm.getUnconfirmCheckBoxList().length;i++){
safeKeepAcctDisplayVO = (CADisplayPropertyVO)caDetailsForm.getUnConfAccDisplayList().get(i);
safeKeepAcctDisplayVO.setElectedShare(Double.parseDouble(newShareQty[i]));
here newShareQty is the text box....
for (int i = 0; i < chkBoxLength; i++) {
int index = Integer.parseInt(unConfirmChkBox) - 1;
safeKeepAcctDisplayVO = (CADisplayPropertyVO) caDetailsForm.getUnConfAccDisplayList().get(index);
if i is equal to 0 index is equal to -1
line 7 call for something at index -1 so ArrayIndexOutOfBounds Exception throws
hint your problem is coded illogically in line 6...........
another freaking logic problem
found it yet???
overcomplcation of your code
you will want index to equal i and not some Integer.parseInt crap
Similar Messages
-
Query to populate an alert message to avoid the duplication of Reference no
Hi Experts,
SUB:Query to populate an alert message to avoid the duplication of BP reference no.
In A/R invoice, BP reference (numAtcard) is used to enter sales Order no as the reference number. As human error, double A/R invoice is created to that particular Sales Order no.
So,I want a formatted search query in that BP reference field, so that when i type the sales order number and give tab, it should populate the alert message if it already exists.
Moreover i do not want to block it through store procedure method, only warning is required to my scenario.
Kindly, help me on this ground.
Regards,
DwarakHi there, i think this could work, maybe you'll only need to configure the Formated search to work with the document total, each time it changes
declare @numatcard varchar(15)
declare @count int
set @numatcard=(select $[oinv.numatcard])
set @count= (select count(numatcard) from oinv where numatcard=@numatcard)
if @count>1
select 'There is a duplicated reference'
select @numatcard
hope it works -
i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
SQL> desc sms1;
Name Null? Type
MOBILE NUMBER
RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
SNO NUMBER
INDATE DATE
From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
SQL> desc smssplit;
Name Null? Type
R VARCHAR2(2 CHAR)
C VARCHAR2(2 CHAR)
S VARCHAR2(1 CHAR)
TC VARCHAR2(3 CHAR)
NA VARCHAR2(3 CHAR)
TC2 VARCHAR2(3 CHAR)
NA2 VARCHAR2(3 CHAR)
TC3 VARCHAR2(3 CHAR)
NA3 VARCHAR2(3 CHAR)
TC4 VARCHAR2(3 CHAR)
NA4 VARCHAR2(3 CHAR)
WTHER VARCHAR2(10 CHAR)
SNO NUMBER
INSERTDATA VARCHAR2(25 CHAR)
Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
CREATE OR REPLACE PROCEDURE SPLITSMS
AS
BEGIN
INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
END;
Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
DECLARE
X NUMBER;
JobNumber NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
job => X
,what => 'scott.SPLITSMS;'
,next_date => SYSDATE+1/1440
,interval => 'SYSDATE+1/1440 '
,no_parse => FALSE
:JobNumber := to_char(X);
END;
Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:49:16
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:50:17
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:51:19
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:52:20
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
INSERTDATA
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:53:22
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
06-SEP-2012 03:54:45
Now I do not want the duplicate values to be updated ...and want them to ignore them.....
please I need a help on this query........How to avoid the duplicate values............Look at the posts closely:might not be needed if formatted ;)
create or replace procedure splitsms as
begin
insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
select substr(rcstcnatcnatcnatcnawther,1,2) r,
substr(rcstcnatcnatcnatcnawther,3,2) c,
substr(rcstcnatcnatcnatcnawther,5,1) s,
substr(rcstcnatcnatcnatcnawther,6,3) tc,
substr(rcstcnatcnatcnatcnawther,9,3) na,
substr(rcstcnatcnatcnatcnawther,12,3) tc2,
substr(rcstcnatcnatcnatcnawther,15,3) na2,
substr(rcstcnatcnatcnatcnawther,18,3) tc3,
substr(rcstcnatcnatcnatcnawther,21,3) na3,
substr(rcstcnatcnatcnatcnawther,24,3) tc4,
substr(rcstcnatcnatcnatcnawther,27,3) na4,
substr(rcstcnatcnatcnatcnawther,30,10) wther,
sno
from scott.sms1 a
where sno = (select max(sno)
from sms1
where sno != a.sno
); ---------------> added where clause with table alias.
end;Regards
Etbin -
How to avoid the null values from xml publisher.
I am creating a report which have the claim numbers with the values CLA001,CLA111,null, null . when i preview my report it is showing some spaces for null values also. How can i avoid the spaces from the report.
I am giving for loop for the claim numbers in the template.
<?for-each:ROW?> <?sort:CLAIMNUMBER;'ascending';data-type='text'?>
<?CLAIMNUMBER?>
<?end for-each?>
Please help me out to solve this problem.
Thanks,
vasanth.Hi Sheshu,
According to your description, you are experiencing the null values and infinity values when browser the calculated measure, right?
Based on my research, the issue is caused by that dividing a non-zero or non-null value by zero or null. In this cases, we need to check for division by zero to avoid this situation. Here is the sample query for you reference.
IIF(
Measures.[Measure B]=0,null,
Measures.[Measure A] / Measures.[Measure B]
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
TechNet Community Support -
How can avoid the problem of Parameter Prompting when I submitting ?
I am developing web application in visual studio 2008 in csharp.How can avoid the issue or problem of Parameter Prompting when I send parameters programaticaly or dyanmicaly? I am sending the values from .net web form to crystal report but it is still asking for parameters. so when i submit second time that is when the reports is being genereated. How can i solve this problem. Please help. The code Iam using is below.
1. using System;
2. using System.Collections;
3. using System.Configuration;
4. using System.Data;
5. using System.Linq;
6. using System.Web;
7. using System.Web.Security;
8. using System.Web.UI;
9. using System.Web.UI.HtmlControls;
10. using System.Web.UI.WebControls;
11. using System.Web.UI.WebControls.WebParts;
12. using System.Xml.Linq;
13. using System.Data.OleDb;
14. using System.Data.OracleClient;
15. using CrystalDecisions.Shared;
16. using CrystalDecisions.CrystalReports.Engine;
17. using CrystalDecisions.Web;
18.
19.
20. public partial class OracleReport : System.Web.UI.Page
21. {
22. CrystalReportViewer crViewer = new CrystalReportViewer();
23. //CrystalReportSource crsource = new CrystalReportSource();
24. int nItemId;
25.
26. protected void Page_Load(object sender, EventArgs e)
27. {
28. //Database Connection
29. ConnectionInfo ConnInfo = new ConnectionInfo();
30. {
31. ConnInfo.ServerName = "127.0.0.1";
32. ConnInfo.DatabaseName = "Xcodf";
33. ConnInfo.UserID = "HR777";
34. ConnInfo.Password = "zghshshs";
35. }
36. // For Each Logon parameters
37. foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo)
38. {
39. cnInfo.ConnectionInfo = ConnInfo;
40.
41. }
42.
43.
44.
45.
46.
47.
48. //Declaring varibles
49. nItemId = int.Parse(Request.QueryString.Get("ItemId"));
50. //string strStartDate = Request.QueryString.Get("StartDate");
51. //int nItemId = 20;
52. string strStartDate = "23-JUL-2010";
53.
54. // object declration
55. CrystalDecisions.CrystalReports.Engine.Database crDatabase;
56. CrystalDecisions.CrystalReports.Engine.Table crTable;
57.
58.
59. TableLogOnInfo dbConn = new TableLogOnInfo();
60.
61. // new report document object
62. ReportDocument oRpt = new ReportDocument();
63.
64. // loading the ItemReport in report document
65. oRpt.Load("C:
Inetpub
wwwroot
cryreport
CrystalReport1.rpt");
66.
67. // getting the database, the table and the LogOnInfo object which holds login onformation
68. crDatabase = oRpt.Database;
69.
70. // getting the table in an object array of one item
71. object[] arrTables = new object[1];
72. crDatabase.Tables.CopyTo(arrTables, 0);
73.
74. // assigning the first item of array to crTable by downcasting the object to Table
75. crTable = (CrystalDecisions.CrystalReports.Engine.Table)arrTables[0];
76.
77. dbConn = crTable.LogOnInfo;
78.
79. // setting values
80. dbConn.ConnectionInfo.DatabaseName = "Xcodf";
81. dbConn.ConnectionInfo.ServerName = "127.0.0.1";
82. dbConn.ConnectionInfo.UserID = "HR777";
83. dbConn.ConnectionInfo.Password = "zghshshs";
84.
85. // applying login info to the table object
86. crTable.ApplyLogOnInfo(dbConn);
87.
88.
89.
90.
91.
92.
93. crViewer.RefreshReport();
94.
95. // defining report source
96. crViewer.ReportSource = oRpt;
97. //CrystalReportSource1.Report = oRpt;
98.
99. // so uptill now we have created everything
100. // what remains is to pass parameters to our report, so it
101. // shows only selected records. so calling a method to set
102. // those parameters.
103. setReportParameters();
104. }
105.
106. private void setReportParameters()
107. {
108.
109. // all the parameter fields will be added to this collection
110. ParameterFields paramFields = new ParameterFields();
111. //ParameterFieldDefinitions ParaLocationContainer = new ParameterFieldDefinitions();
112. //ParameterFieldDefinition ParaLocation = new ParameterFieldDefinition();
113.
114. // the parameter fields to be sent to the report
115. ParameterField pfItemId = new ParameterField();
116. //ParameterField pfStartDate = new ParameterField();
117. //ParameterField pfEndDate = new ParameterField();
118.
119. // setting the name of parameter fields with wich they will be recieved in report
120.
121. pfItemId.ParameterFieldName = "RegionID";
122.
123. //pfStartDate.ParameterFieldName = "StartDate";
124. //pfEndDate.ParameterFieldName = "EndDate";
125.
126. // the above declared parameter fields accept values as discrete objects
127. // so declaring discrete objects
128. ParameterDiscreteValue dcItemId = new ParameterDiscreteValue();
129. //ParameterDiscreteValue dcStartDate = new ParameterDiscreteValue();
130. //ParameterDiscreteValue dcEndDate = new ParameterDiscreteValue();
131.
132. // setting the values of discrete objects
133.
134.
135. dcItemId.Value = nItemId;
136.
137. //dcStartDate.Value = DateTime.Parse(strStartDate);
138. //dcEndDate.Value = DateTime.Parse(strEndDate);
139.
140. // now adding these discrete values to parameters
141. //paramField.HasCurrentValue = true;
142.
143.
144.
145. //pfItemId.CurrentValues.Clear();
146. int valueIDD = int.Parse(Request.QueryString.Get("ItemId").ToString());
147. pfItemId.Name = valueIDD.ToString();
148.
149. pfItemId.CurrentValues.Add(dcItemId);
150. //ParaLocation.ApplyCurrentValues;
151. pfItemId.HasCurrentValue = true;
152.
153. //pfStartDate.CurrentValues.Add(dcStartDate);
154. //pfEndDate.CurrentValues.Add(dcEndDate);
155.
156. // now adding all these parameter fields to the parameter collection
157. paramFields.Add(pfItemId);
158.
159. //paramFields.Add(pfStartDate);
160. //paramFields.Add(pfEndDate);
161. /////////////////////
162. //Formula from Crystal
163. //crViewer.SelectionFormula = "{COUNTRIES.REGION_ID} = " + int.Parse(Request.QueryString.Get("ItemId")) + "";
164. crViewer.RefreshReport();
165. // finally add the parameter collection to the crystal report viewer
166. crViewer.ParameterFieldInfo = paramFields;
167.
168.
169.
170. }
171. }Keep your post to under 1200 characters, else you loose the formatting. (you can do two posts if need be).
Re. parameters. First, make sure yo have SP 1 for CR 10.5:
https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
Next, see the following:
[Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
CR Dev help file:
http://msdn2.microsoft.com/en-us/library/bb126227.aspx
Samples:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup -
i am looking to buy an ipad 2 or the new ipad (preferably 32gb) but dont want to buy the 3G version as i have unlimited data usage in my mobile phone plan, i know the wifi only ipad is generally cheaper, but i was wondering if there was a way to buy the ipad with 3G capabilities but not use the 3G and avoid the cost of paying the extra unnecessary data plan? (I know this is a really weird question but i have the opportunity to buy a 3G ipad and was curious of the possibility? any help would be greatly appreciated. cheers
Yes to your questions.
You can download a complete iPad User Guide here: http://manuals.info.apple.com/en/ipad_user_guide.pdf
If you want an iPad 2 32GB it will have to be a refurb model. The only new iPas 2 is 16GB.
What are all the differences between the iPad 3rd Gen and the iPad 2? Is the iPad 2 worth the cost savings?
http://everymac.com/systems/apple/ipad/ipad-faq/differences-between-ipad-3rd-gen -2012-ipad-2-2011.html
What are all the differences between the iPad 3rd Gen models? Which should I buy?
http://everymac.com/systems/apple/ipad/ipad-faq/differences-between-ipad-3rd-gen -early-2012-models.html
Should I Buy a New iPad? Or an iPad 2?
http://www.maclife.com/article/blogs/should_i_buy_new_ipad_or_ipad_2
iPad 3 vs iPad 2 vs iPad 1- Feature comparisons with iOS 5
http://ipadhelp.com/ipad-help/ipad-3-vs-ipad-2/
iPad Q&A
http://www.everymac.com/systems/apple/ipad/ipad-faq/differences-between-ipad-3rd -gen-early-2012-models.html
A Few Questions (and Answers) About the New iPad
http://pogue.blogs.nytimes.com/2012/03/15/a-few-questions-and-answers-about-the- new-ipad/?ref=personaltechemail&nl=technology&emc=edit_ct_20120315
New iPad: A Polishing of the Old
http://www.nytimes.com/2012/03/15/technology/personaltech/the-new-ipad-is-much-t he-same-only-better.html?nl=technology&emc=edit_ct_20120315
iPad 1, 2 and New Specifications
http://www.everymac.com/systems/apple/ipad/index-ipad-specs.html
16GB vs 32GB vs 64GB: Which new iPad storage capacity should you get?
http://www.imore.com/2012/03/08/16gb-32gb-64gb-ipad-capacity/
How much content will fit on my iPod or iPhone?
http://support.apple.com/kb/HT1867
If you think you may get an iPad 2:
Refurbished iPad Prices
http://store.apple.com/us/browse/home/specialdeals/ipad
New 16GB iPad 2 Prices
http://store.apple.com/us/browse/home/shop_ipad/family/ipad/select_ipad2
When iOS 6 comes out in the fall, the iPad 3 will get Siri, but the iPad 2 won't.
Cheers, Tom -
I have made a book of my iPhoto pictures. In certain layouts there is a text frame. How can I avoid the frame becoming visible in the print if I don't want to write anything? Should I just leave it untouched or should I delete the instructing text "Write your text here"?
Most pages have layouts for pictures only or pictures with text boxes. Either select the same layout for that page but the one without the text box or put a space in the text box.
Putting a space in the text box will avoid getting the warning when ordering that there's an unfilled text box in the book. The box will not be visible in the final product. You can and should check the book before ordering by previewing it as described in this Apple document: iPhoto '11: Preview a book, card, or calendar before you order or print it
Happy Holidays -
Is there a way to reinstall an older version to avoid the loss of my valuable extensions an a feature (where there are no add-on upgrades) without first uninstalling the current version.
A great feature now missing from the 34 or 35 version forward, is where I could previously grab a tab, and drop it into my bookmarks and if necessary (which is always), simultaneously scroll up or down with the mouse and drop it in. NOW, i either have to scroll the bookmarks first and then grab and drop, or I have to drag the tab over to the top or bottom of the bookmarks screen for the system to recognize that it's there before it scrolls for me, then drop it to the correct location. Was this feature too difficult to keep from crashes occurring? This feature compensated for a bookmarks save window feature lost in version 3+ for which there is no add-on currently.
i wish you guys would leave the awesome features alone. Really. You guys help and hurt us with every new version.Direct Download Links for Adobe Software
Mylenium -
Is there a way to avoid the function call ?
Given the following test case
CREATE USER TESTER
IDENTIFIED BY "tester"
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
GRANT CONNECT, RESOURCE TO TESTER
GRANT CREATE TYPE TO TESTER
GRANT CREATE SESSION TO TESTER
GRANT CREATE PROCEDURE TO TESTER
GRANT CREATE TABLE TO TESTER
GRANT UNLIMITED TABLESPACE TO TESTER
ALTER USER TESTER QUOTA UNLIMITED ON USERS
COMMIT
CONNECT TESTER/tester
CREATE OR REPLACE TYPE TESTER.PATTERN_LIST AS TABLE OF VARCHAR2(1023 CHAR)
SHOW ERRORS
CREATE TABLE TESTER.PARENT_TABLE
FIELD_ID NUMBER(10) NOT NULL,
FIELD_NAME VARCHAR2( 255 CHAR) NOT NULL,
FIELD_PATH VARCHAR2(1023 CHAR) NOT NULL,
FIELD_VALUE VARCHAR2( 255 CHAR)
CREATE TABLE TESTER.CHILD_TABLE
FIELD_PATH VARCHAR2(1023 CHAR) NOT NULL,
MIN_STR_LEN NUMBER(10),
MAX_STR_LEN NUMBER(10),
PATTERNS TESTER.PATTERN_LIST
NESTED TABLE PATTERNS STORE AS PATTERN_TABLE RETURN AS VALUE
ALTER TABLE TESTER.PARENT_TABLE ADD (
CONSTRAINT PARENT_TABLE_PK
PRIMARY KEY
(FIELD_ID))
INSERT ALL
INTO TESTER.PARENT_TABLE
VALUES (1, 'FIELD_A', '/A', NULL)
INTO TESTER.PARENT_TABLE
VALUES (2, 'FIELD_AB', '/A/B', '20090731')
INTO TESTER.PARENT_TABLE
VALUES (3, 'FIELD_AC', '/A/C', '2167')
INTO TESTER.PARENT_TABLE
VALUES (4, 'FIELD_AC', '/A/C', '1144')
INTO TESTER.PARENT_TABLE
VALUES (5, 'FIELD_AD', '/A/D', 'XS10')
INTO TESTER.PARENT_TABLE
VALUES (6, 'FIELD_AB', '/A/B', '20090229')
INTO TESTER.PARENT_TABLE
VALUES (7, 'FIELD_AD', '/A/D', 'ART')
INTO TESTER.PARENT_TABLE
VALUES (8, 'FIELD_AD', '/A/D', 'TESTED')
INTO TESTER.CHILD_TABLE
VALUES ('/A', NULL, NULL, PATTERN_LIST())
INTO TESTER.CHILD_TABLE
VALUES ('/A/B', NULL, NULL, PATTERN_LIST( '[12][0-9]{3}[0][13578]([0][1-9]|[12][0-9]|[3][01])'
, '[12][0-9]{3}[0][469]([0][1-9]|[12][0-9]|[3][0])'
, '[12][0-9]{3}[1][02][3][1]'
, '[12][0-9]{3}[1][1][3][0]'
, '[12][0-9]{3}[0][2][2][8]'
, '([2][048]|[1][26])([02468][048]|[13579][26])[0][2][2][9]'))
INTO TESTER.CHILD_TABLE
VALUES ('/A/C', NULL, NULL, PATTERN_LIST( '[0-1][0-9][0-5][0-9]'
, '[2][0-3][0-5][0-9]'))
INTO TESTER.CHILD_TABLE
VALUES ('/A/D', 3, 4, PATTERN_LIST('[^0-9]*'))
SELECT * FROM DUAL
CREATE OR REPLACE FUNCTION TESTER.MATCH_PATTERN(p_value IN VARCHAR2, p_patterns IN TESTER.PATTERN_LIST) RETURN NUMBER
AS
v_count NUMBER := 0;
BEGIN
SELECT COUNT(*)
INTO v_count
FROM TABLE(p_patterns)
WHERE REGEXP_SUBSTR(p_value, COLUMN_VALUE) = p_value;
RETURN v_count;
END MATCH_PATTERN;
SHOW ERRORS
COMMIT
/the query
SELECT FIELD_ID
, FIELD_PATH
, ERRINDEX
, FIELD_VALUE
FROM (
SELECT a.FIELD_ID
, a.FIELD_PATH
, b.PATTERNS
, CASE
WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
END AS ERRINDEX_1
, CASE
WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
END AS ERRINDEX_2
, CASE
WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
END AS ERRINDEX_4
, a.FIELD_VALUE
FROM TESTER.PARENT_TABLE a
INNER JOIN TESTER.CHILD_TABLE b ON a.FIELD_PATH = b.FIELD_PATH
UNPIVOT
ERRINDEX
FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
)gives me ORA-03113: end-of-file on communication channel
If on the other hand, I replace the nested single-row SELECT with the function call like this
SELECT FIELD_ID
, FIELD_PATH
, ERRINDEX
, FIELD_VALUE
FROM (
SELECT a.FIELD_ID
, a.FIELD_PATH
, b.PATTERNS
, CASE
WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
END AS ERRINDEX_1
, CASE
WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
END AS ERRINDEX_2
, CASE
WHEN ((b.PATTERNS IS NOT EMPTY) AND (TESTER.MATCH_PATTERN(a.FIELD_VALUE, b.PATTERNS) = 0)) THEN 4
END AS ERRINDEX_4
, a.FIELD_VALUE
FROM TESTER.PARENT_TABLE a
INNER JOIN TESTER.CHILD_TABLE b ON a.FIELD_PATH = b.FIELD_PATH
UNPIVOT
ERRINDEX
FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
)the query gives the correct results which should be
FIELD_ID FIELD_PATH ERRINDEX FIELD_VALUE
6 /A/B 4 20090229
3 /A/C 4 2167
5 /A/D 4 XS10
8 /A/D 2 TESTEDIs there a way to do this without the PL/SQL function call and at the same time avoid the ORA-03113 ? Or, have I hit a bug on 11.1.0.7 ?
Many thanks in advance
Best Regards
PhilipI found the Oracle Bug on my own in the end, in the most unlikely of places !
The following code
SELECT FIELD_ID
, FIELD_PATH
, ERRINDEX
, FIELD_VALUE
FROM (
SELECT a.FIELD_ID
, a.FIELD_PATH
, CASE
WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
END AS ERRINDEX_1
, CASE
WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
END AS ERRINDEX_2
, CASE
WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
END AS ERRINDEX_4
, a.FIELD_VALUE
FROM TESTER.PARENT_TABLE a, TESTER.CHILD_TABLE b
WHERE a.FIELD_PATH = b.FIELD_PATH
UNPIVOT
ERRINDEX
FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
)works as intended i.e. like a charm !
The only difference between the one that gives the ORA-03113 and the above is the way the join is written. The ANSI way (INNER JOIN) fails, the old way (WHERE clause) succeeds.
I will open a SR with Oracle so that it may be recorded and fixed.
Best Regards
Philip -
Revision: 10459
Author: [email protected]
Date: 2009-09-21 08:42:44 -0700 (Mon, 21 Sep 2009)
Log Message:
Change to ensure ScriptNodes are no longer part of the node tree after interface compilation stage in order to avoid the extra code that was necessary to avoid tripping over them during type checking, etc.
Improving revision 10199 a bit, to allow for single line comments.
QE notes: None
Doc notes: None
Bugs: SDK-22027
Reviewer: Paul
Tests run: Checking, Compiler cyclones
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-22027
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.javaIn general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
Hunt -
On my itouch 4th gen, I use imessage and message many people, but sometimes when i send a message the send bar on top will go almost all the way and stop. This will happen for some time and then work later. is there anything to avoid the freezing problem while it sends
See:
iOS: Troubleshooting Messages
However, I suspect it is just a tempery network problem beyond your control -
I changed my password to use migration to transfer files from a G4 to a new macbook pro but now I have to sign in every time. How do I avoid the sign in?
I clicked on keychain access but getting a warning that it quit unexpectedly and it won't reopen.
-
When iOS 6.0 updating my iPhone and connecting my iPhone to iTunes the only option I have, is to restore my iPhone. But ufortunately, I did not back up my iPhone before the updating. Is there any way I can avoid the restoring process?
Once the Device is asking to be Restored with iTunes... it is too late to save anything...
To minimise loss... Connect to iTunes on the computer you Usually Sync with and Restore from the most recent Backup...
http://support.apple.com/kb/HT1414
Restore from Backup
http://support.apple.com/kb/ht1766 -
How to avoid the windows "dialog box" when we use flexprintjob class
in the print segment
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf65381-7ffc.html
it says
printJob.start();
This causes the operating system to display a Print dialog box.
this windows "dialog box" which is used to set the page size, page index, or some other page settings.
but in my case , i can't let user see this dialog box.
how can i avoid this "dialog box" when i call printJob.start();
it is my big issue ,please help to give a suggestionhi how can i set the "ie" "internet explorer" to avoid the "dialog box." if i have to do it .
thank you very much ! -
How to avoid the event has been repeated many times in the background
Application, the main screen is divided into two containers:left and right container,
The right side of the container is divided into two containers:top and bottom container,
There is a button in the left container.
Click the button, the container at lower right will using ModuleManager load Module, The following container load of the right of the screen has been monitoring the container above the action.
Problem:
When you click the button repeatedly to load the container in the lower right, it will create multiple instances, and can not be freed immediately. When the above container do an action or event, there are multiple instances of monitoring exist.
The background will be repeat the action or event many times.
How to avoid the event has been repeated many times in the background?
ThanksFlex harUI
multiple instances of a mxml, maybe ?
Maybe you are looking for
-
Hi ... where can I buy new key caps for my macbook pleeeeease ?
Hi .... any ideas where I can buy keycaps for a macbook please ?
-
our entire org has t430s machines running win 8. recently we have started having issues with sound. out of 500 odd machines only 8 or 9 has shown this problem. i have updated the sound driver on those machines to ver 6.0.17... but the problem still p
-
How to remove extra line breaks in my html code?
On my website: 2neatmagazines.com, I have old html, written years ago. The html all functions fine, no problems in the broswers. When I Iook at the code, there are lots of line breaks in the text portions. I can do "apply source formatting", and that
-
I am very new to dreamweaver and would like to make a website with layout featuring a drop down bar (similar to the bar on http://www.layersmagazine.com) but I am pretty confused about what I should do. I have some code set up already but I would qui
-
Debug ZXM06U02 include file called from RSNAST - outbound PO IDOC
Hi, I have been asked to amend an idoc to include additional fields from the Purchase Order. I have successfully extended the right idoc segments and discovered that the values I need to be added are done at include ZXM06U02. In fact I have hardcoded