Getting error in this code
Hi,
please dont consider about the performence in this case.
i have a delete statement DELETE FROM GSM_ITEM_INFO WHERE EXPIRE_TIME<SYSDATE-1;
this delete statement may delete millions of records,i should not delete all the records at a time.
i have to run a loop so that each time it deletes 10000 records for each commit. if the count of records less than 10000 records then i have to come out of the loop without deleting it. i have written code like this. getting errors.
CREATE OR REPLACE PROCEDURE TEST_ITEM_CLEAN (limit_in IN NUMBER DEFAULT 10000)
IS
type ITEM_CUR IS REF CURSOR;
L_ITEM_CUR ITEM_CUR;
TYPE ITEM_TYPE IS TABLE OF NUMBER
INDEX BY PLS_INTEGER;
L_ITEM ITEM_TYPE;
BEGIN
for i in 1..10
loop
OPEN L_ITEM_CUR FOR SELECT ITEM_ID FROM GSM_ITEM_INFO;
FETCH L_ITEM_CUR
BULK COLLECT INTO L_ITEM LIMIT limit_in;
FORALL indx IN L_ITEM.FIRST .. L_ITEM.LAST
DELETE FROM GSM_ITEM_INFO WHERE ITEM_ID=L_ITEM(indx).ITEM_ID;
CLOSE L_ITEM_CUR;
end loop;
END TEST_ITEM_CLEAN;
errors:
LINE/COL ERROR
24/11 PL/SQL: SQL Statement ignored
24/61 PL/SQL: ORA-22806: not an object or REF
24/61 PLS-00487: Invalid reference to variable 'NUMBER'
Your procedure might contain just NOT TESTED !
begin
loop
delete from gsm_item_info
where expire_time < sysdate - 1
and rownum <= p_limit; /* never used rownum in update like this */
delete from gsm_item_info
where some_key in (select some_key
from gsm_item_info
where expire_time < sysdate - 1
and rownum <= p_limit
if sql%rowcount = p_limit then
commit;
else
rollback;
exit;
end if;
end loop;
end;
Regards
Etbin
Similar Messages
-
I am trying to activate new itunes card. I am getting error message: The code you have entered has not been properly activated. Does this mean the store did something wrong or me?
Yes, the store didn't properly activate the card. If the store is nearly then you could try going back and asking them to do so, if it isn't (or if they can't/won't help) then try contacting iTunes Support (you will probably need to give them images of the front and back of the card, and possibly its receipt) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then iTunes Cards And Codes
-
I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?
I am sorry Erickkasner but there is no longer direct support provided for Creative Suite 5.5 installation issues.
You are welcome to post any specific errors you are able to discover within your installation log to this discussion. Since you are using Windows then Exit Code 15 could mean one of the following:
Installer database is corrupted
Update pending to your operating system
Improper permissions set for the Media.db
The installation log file should provide additional insight into the exact error you are experiencing. Please make sure to use the find command to look for the words 'ERROR' and 'FATAL' to locate the relevant error messages. -
HELLO EVERY ONE ...
I AM GETTING run time error in this code.....can u send me the corrected code....
START-OF-SELECTION.
SELECT T1~MATNR
T1~MEINS
T1~ERSDA
T1~ERNAM
T1~SPART
T2~MAKTX
T3~LVORM
T3~EKGRP
T3~WERKS
T4~LABST
T4~SPEME
T4~LGORT
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM MARA AS T1
INNER JOIN MAKT AS T2
ON T1MATNR = T2MATNR
INNER JOIN MARC AS T3
ON T2MATNR = T3NFMAT
INNER JOIN MARD AS T4
ON T3MATNR = T4MATNR
WHERE T1~MATNR IN SMATNR.
Thanx & Regards,
PHANINDERok i am sending u the full code.....
REPORT Z_SB_RP_MATERIAL.
TABLES: MARA,
MARD,
MAKT,
MARC,
EINA,
EINE.
DATA: BEGIN OF ITAB OCCURS 15,
MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
ERSDA LIKE MARA-ERSDA,
ERNAM LIKE MARA-ERNAM,
SPART LIKE MARA-SPART,
MAKTX LIKE MAKT-MAKTX,
LVORM LIKE MARC-LVORM,
EKGRP LIKE MARC-EKGRP,
WERKS LIKE MARC-WERKS,
LABST LIKE MARD-LABST,
SPEME LIKE MARD-SPEME,
LGORT LIKE MARD-SPEME,
END OF ITAB.
SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-T01.
SELECT-OPTIONS: SMATNR FOR MARA-MATNR,
SERSDA FOR MARA-ERSDA,
SWERKS FOR MARC-WERKS,
SLGORT FOR MARD-LGORT.
SELECTION-SCREEN END OF BLOCK BLK.
TOP-OF-PAGE.
WRITE:/ SY-VLINE,
02 'S.NO',
06 SY-VLINE,
08 'MATNR',
20 SY-VLINE,
22 'MEINS',
32 SY-VLINE,
34 'ERSDA',
44 SY-VLINE,
46 'ERNAM',
56 SY-VLINE,
58 'SPART',
68 SY-VLINE,
70 'MAKTX',
80 SY-VLINE,
82 'LVORM',
92 SY-VLINE,
94 'EKGRP',
104 SY-VLINE,
106 'WERKS',
116 SY-VLINE,
118 'LABST',
128 SY-VLINE,
130 'SPEME',
140 SY-VLINE,
142 'LGORT',
152 SY-VLINE.
START-OF-SELECTION.
SELECT T1~MATNR
T1~MEINS
T1~ERSDA
T1~ERNAM
T1~SPART
T2~MAKTX
T3~LVORM
T3~EKGRP
T3~WERKS
T4~LABST
T4~SPEME
T4~LGORT
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM MARA AS T1
INNER JOIN MAKT AS T2
ON T1MATNR = T2MATNR
INNER JOIN MARC AS T3
ON T2MATNR = T3NFMAT
INNER JOIN MARD AS T4
ON T3MATNR = T4MATNR
WHERE T1~MATNR IN SMATNR.
END-OF-SELECTION.
DATA: COUNT(4) TYPE N.
LOOP AT ITAB.
COUNT = COUNT + 1.
WRITE:/ SY-VLINE,
02 COUNT,
06 SY-VLINE,
08 ITAB-MATNR,
20 SY-VLINE,
22 ITAB-MEINS,
32 SY-VLINE,
34 ITAB-ERSDA,
44 SY-VLINE,
46 ITAB-ERNAM,
56 SY-VLINE,
58 ITAB-SPART,
68 SY-VLINE,
70 ITAB-MAKTX,
80 SY-VLINE,
82 ITAB-LVORM,
92 SY-VLINE,
94 ITAB-EKGRP,
104 SY-VLINE,
106 ITAB-WERKS,
116 SY-VLINE,
118 ITAB-LABST,
128 SY-VLINE,
130 ITAB-SPEME,
140 SY-VLINE,
142 ITAB-LGORT,
152 SY-VLINE.
ENDLOOP.
THANX & REGARDS,
PHANINDER -
am tTying to install itunes and I get error message "This file does not have a program associated with it for performing this action. Please install a program, or if one is already installed, create an association in the Default Programs control panel. Can anyone help me?
Hi,
Here is a similar thread for your reference:
There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default programs control panel
http://social.technet.microsoft.com/Forums/en/w7itproappcompat/thread/036e3cf6-bff7-4ef2-bd0a-555cd2399ad4
Hope this helps
Vincent Wang
TechNet Community Support -
While Installing adobe reader and acrobat im getting error 1406 this error. I had already tried every possible step including special permission in registry file. Please help..
What is your operating system? Is there anything else beside the number 1406?
-
Can not sync my 3GS. Get error message: this iphone can not be synced. The required file is missing, What file?
If you're on a mac, close iPhoto if it is open. In Finder open Pictures and right-click on iPhoto Library. Select Show Package Contents. Right-click the iPod Photo Cache folder, select Move to Trash. Now sync and the "this iphone can not be synced. The required file is missing" error should be fixed.
-
Is there a error with this code
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class ClickMe extends Applet implements MouseListener {
private Spot spot = null;
private static final int RADIUS = 7;
public void init() {
addMouseListener(this);
public void paint(Graphics g) {
//draw a black border and a white background
g.setColor(Color.white);
g.fillRect(0, 0, getSize().width - 1, getSize().height - 1);
g.setColor(Color.black);
g.drawRect(0, 0, getSize().width - 1, getSize().height - 1);
//draw the spot
g.setColor(Color.red);
if (spot != null) {
g.fillOval(spot.x - RADIUS, spot.y - RADIUS, RADIUS * 2, RADIUS * 2);
public void mousePressed(MouseEvent event) {
if (spot == null) {
spot = new Spot(RADIUS);
spot.x = event.getX();
spot.y = event.getY();
repaint();
public void mouseClicked(MouseEvent event) {}
public void mouseReleased(MouseEvent event) {}
public void mouseEntered(MouseEvent event) {}
public void mouseExited(MouseEvent event) {}
When I compile the the code I get a "cannot resolve symbol"
private Spot spot = null;
spot = new Spot(RADIUS);
I don't know if these are errors in the code'cannot resolve symbol' errors usually mean a problem with the declarations and initialisations at the start of your class. This is specifically to do with your line private Spot spot = null;
i haven`t much time to look at your code, but i would suggest getting rid of the null initialisation here, and do you ever actually change this value? after a quick look it seems that you only query it to see if the variable spot is null. if you never affect this value, then it will always be null and only one if statement will ever be executed.
but as i said i haven`t any time, so could be off here
boutye - boss is coming bak argh! -
ABAP Syntax error in this code - Could anyone help?
Hi,
I have this code which runs fine in our non-unicode SAP system.
REPORT ECC5_OFFSETS.
DATA: W_KONV TYPE KONV.
DATA: TKOMK LIKE STANDARD TABLE OF KOMK
WITH KEY KEY_UC
INITIAL SIZE 2
WITH HEADER LINE.
DATA: TKOMK2 type STANDARD TABLE OF KOMK
WITH KEY KEY_UC
INITIAL SIZE 2.
* Get some test data
SELECT SINGLE * INTO W_KONV FROM KONV
WHERE KNUMV = '0000000061'.
MOVE-CORRESPONDING W_KONV TO TKOMK.
APPEND TKOMK.
tkomk2[] = TKOMK[].
* Original non-Unicode compliant code
DATA: LENGTH_KEY_TKOMK(3) TYPE P.
FIELD-SYMBOLS: <TKOMK_KEY> like TKOMK2.
DESCRIBE DISTANCE BETWEEN TKOMK-MANDT AND TKOMK-SUPOS
INTO LENGTH_KEY_TKOMK
* ( Original Unicode syntax fix! )
IN BYTE MODE.
* Copy all the fields between these two into TKOMK_KEY field-symbol.
* ( In Unicode this assignment fails, causing short dump at read )
ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO <TKOMK_KEY>.
* Read the current record.
READ TABLE TKOMK2 WITH KEY <TKOMK_KEY>.
But I get the following error message in our UNICODE complaint SAP system:
<b>"<TKOMK_KEY>" cannot be a table, a reference, a string, or contain any of these objects.</b>
Does anyone know how I could get around this/suggest a solution?
Thanks in advance!Hi,
Sorry if I'm being unclear.
My requirements are twofold:
1)the line of code:
ASSIGN TKOMK2(LENGTH_KEY_TKOMK) TO <TKOMK_KEY>
does not assign anything to the fields symbol <TKOMK_KEY>
2)The read statement does not like the fields symbol <TKOMK_KEY> being used as a key.
Both these bits of code worked in our 4.6b system but now in the ECC5 environemtn I get syntax errors.
Let me know if you need anything else! -
Could you tell me what i'm doing wrong with this code? I posted earlier for inputting char into a variable, but the post just got too long.
I've tried below with code, but I can't get it right. Can you help me..?
import java.io.*;
public class Goals {
public static void main (String args[]) {
System.out.println("Enter time and tide:");
InputStreamReader reader = new InputStreamReader (System.in);
char ch = reader.read(char); // trying to read character from keyboard
System.out.println("the character" +ch);
This is my error here:
Goals.java:13: '.class' expec
char ch = reader.read(char);
^
Goals.java:13: ')' expected
char ch = reader.read(char);
^
thank you...
yashThe read method that you want to use does not accept any argument, so the syntax you want is char ch = reader.read();
The first error is caused because the compiler is not expecting to see the reserved word "char" at that point. It knows that the only way the code would be valid is that char was followed by .class, so it suggests it. The second error seems to be a ripple effect of the first one and gets fixed when you fix the first one.
Once you fix that error you get another, warning you about loss of precision. This is because the read() method returns an int and you are trying to assign an int in a char, while it's well known that there are plenty of integer values that don't fit in a char. Why does Reader.read() return an int instead of char? Because it needs a way to signal the end of the stream. In a normal case the read method returns the character that was read, but -1 if the end of the stream has been reached.
One way to fix this would be casting the int value to char, which erroneously interpretes the end of the stream as a char too:
char ch = (char) reader.read(); -
Hi,
I modify a jsp in which we have to remove the lov of a field according to the responsibility. but its giving some error. that i am not able to see. so can you please tell me whats the problem in this code.
<td nowrap align="right" class="prompt" width="25%">
<%
if(!qotRdOnly)
%>
<label for="qotPmtTerms">
<%
%>
<%=qotRegionMgrObj.getPrompt("QOT_PAYMENT_TERMS")%>
<%
if(!qotRdOnly)
%>
</label>
<%
%>
</td>
<td><img alt="" height=8 src="/OA_MEDIA/jtfutrpx.gif" width=12></td>
<%
if(qotRdOnly)
%>
<td class="datareadonly" >
<%=RequestCtx.htmlSecurityProcess(qotPmtTerms)%>
<%
else
%>
<td>
<%
if(!QotUtil.isNull(qotPmtTerms))
QotLookup qpmt = QotLookup.load(QotLookup.PAYMENT_TERM,QotUtil.stringToBigDecimal(qotPmtTerms));
qotPmtTerms = qpmt!=null?qpmt.getName():"";
%>
<%@ page import="java.math.BigDecimal"%>
<%@ page import="java.sql.Statement"%>
<%@ page import="java.sql.ResultSet"%>
<%@ page import= "java.lang.*"%>
<%@ page import ="java.sql.*" %>
<%
BigDecimal respId = RequestCtx.getResponsibilityId();
BigDecimal appId = RequestCtx.getApplicationId();
out.println("value for respId"+respId);
out.println("value for appId"+appId);
//int dbRespId = 0;
//ArrayList arraylist = new ArrayList();
int tempVal = 0;
OracleConnection con = null;
Statement st = null;
ResultSet rs = null;
try
con = (OracleConnection) TransactionScope.getConnection();
out.println("value for connection object :--"+con);
String sql = "Select INSTR(UPPER(responsibility_name),UPPER('Finance Override' )) A "
+ "from fnd_responsibility_tl "
+ "where application_id= " + appId
+ " and responsibility_id= " + respId;
out.println("Value of query in page :--"+sql);
st = con.createStatement();
rs = st.executeQuery(sql);
out.println("Value of rs "+rs);
out.println("Value of Temp is "+tempVal);
while (rs.next())
tempVal = rs.getInt(1);
out.println("Value of Temp is "+tempVal);
catch(Exception e)
e.printStackTrace();
out.println("Exception :--"+e);
finally
if (conn != null)
TransactionScope.releaseConnection(conn);
out.println("connection is null");
if(tempVal > 0)
%>
<td width="25%">
<select id="qotPmtTerms" name="qotPmtTerms">
<option value=""> </option>
<%
RequestCtx.log("qotSCocPmtDet.jsp","here in Payment Terms");
QotLookup[] qlpmt = QotLookup.list(QotLookup.PAYMENT_TERM);
int qlpmt_length = qlpmt!=null?qlpmt.length:0;
for(int i=0; i<qlpmt_length; i++)
payment_term_name = qlpmt.getName();
payment_term_code = qlpmt[i].getKey().toString();
%>
<option
<%
if (payment_term_code.equals(qotPmtTerms))
%> selected <%
%>
VALUE="<%=payment_term_code%>">
<%= RequestCtx.htmlEncode(payment_term_name)%>
</option>
<%
} //end of length > 0
%>
</select>
<%
else
%>
<input class=formObjReadOnly type="text" id="qotPmtTerms" name="qotPmtTerms" size = "25" maxlength = "50" onFocus=this.blur(); readOnly = readOnly value="<%=RequestCtx.htmlEncode(qotPmtTerms)%>">
<%
%>
</td>
Thanks,Hi
Could you add the error information, is a bit difficult to help with out it.
Regards
Alex -
I attached multiples .pdf files to an email. Tried to attach the next file before the previous 1 finished attaching. Got error message "this "**" file cannot be attached until the files already attached are finished uploading". Was never able to attach that 1 file to the email that I received the error message for; was able to attach subsequent files to that same email & send it. Now, I often get the same error message, even if I only attach 1 file & esp. when attaching .ai or .jpeg files. What can I do to fix this problem?
It looks like nobody has an answer for this despite of the 80 something views!
And here i thought Adobe admin would be monitoring the forum, but surprisingly, they don't even have the answer for this!!! -
Sorry for the question but I'm a newbie
I have this code:
http://weblogs.java.net/blog/brunogh/archive/2007/09/my_first_fx_blu_1.html
Button {
text: "Inquiry"
enabled : bind model.inquiryBtnEnabled
action: operation() {
DeviceDiscoverer.getInstance().startInquiry(DiscoveryAgent.GIAC, model.inquiryListener);
model.foundDevices = null;
model.inquiryBtnEnabled = false;
model.cancelBtnEnabled = true;
}what is the error?
Thanks.
And sorry for my english, too.Hi Gigi_One,
this code was posted in 2007.. If you're using the Preview version, you must switch "operation" to "function"...
Are there an error message?
Bruno Grossi -
hi friends,
when I run this code it is giving error as
Cause: FDPSTP failed due to ORA-01427: single-row subquery returns more than one row
ORA-06512: at "APPS.UPD_VAC", line 18
ORA-06512: at line 1
can some one suggest a solution pls
the table vac_table has a single column... and it has only 1 record right now
CREATE OR REPLACE package body APPS.upd_vac is
procedure upd_prc(p_err_buf out VARCHAR2
,p_ret_code out NUMBER)
is
l_attr varchar2(100);
l_attr1 varchar2(100);
l_attr2 varchar2(100);
l_attr3 varchar2(100);
l_attr4 varchar2(100);
begin
SELECT MAX(ATTRIBUTE18) INTO L_ATTR FROM PER_VACANCIES;
select (regexp_substr (l_attr, '.*C')) into l_attr1 from dual;
select regexp_replace(l_attr,'^.*C(.+)$','\1') into l_attr2 from dual;
select to_number(l_attr2)+1 into l_attr3 from dual;
select l_attr1||l_attr3 into l_attr4 from dual;
insert into vac_table
(select l_attr4 from dual);
UPDATE PER_VACANCIES SET ATTRIBUTE18 =(select attribute from kdd_vacancy)
where vacancy_id =(select max(vacancy_id) from per_vacancies);
commit;
end;
end;CREATE OR replace PACKAGE BODY apps.upd_vac
IS
PROCEDURE Upd_prc(p_err_buf OUT VARCHAR2,
p_ret_code OUT NUMBER)
IS
l_attr VARCHAR2(100);
l_attr1 VARCHAR2(100);
l_attr2 VARCHAR2(100);
l_attr3 VARCHAR2(100);
l_attr4 VARCHAR2(100);
BEGIN
SELECT MAX(attribute18)
INTO l_attr
FROM per_vacancies;
SELECT ( Regexp_substr (l_attr, '.*C') )
INTO l_attr1
FROM dual;
SELECT Regexp_replace(l_attr, '^.*C(.+)$', '\1')
INTO l_attr2
FROM dual;
SELECT To_number(l_attr2) + 1
INTO l_attr3
FROM dual;
SELECT l_attr1
||l_attr3
INTO l_attr4
FROM dual;
INSERT INTO vac_table
(SELECT l_attr4
FROM dual);
UPDATE per_vacancies
SET attribute18 = (SELECT attribute FROM kdd_vacancy)
WHERE vacancy_id = (SELECT MAX(vacancy_id)
FROM per_vacancies);
COMMIT;
END;
END;
(SELECT attribute FROM kdd_vacancy)must return only a single row
ATTRIBUTE18 is a scalar & can only accept one value; which is correct value FROM KDD_VACANCY? -
See my error against this code jasperPrint = JasperFillManager.fillReport(s
sir i use this code for without database report
jasperPrint = JasperFillManager.fillReport(stream, new HashMap(), new JREmptyDataSource());
and comple then output window give me this error
C:Documents and SettingsAdministratorMy DocumentsCreatorProjectswithoutdatasourceireportsrcwithoutdatasourceireportPage1.java:390: unreported exception net.sf.jasperreports.engine.JRException; must be caught or declared to be thrown
jasperPrint = JasperFillManager.fillReport(stream, new HashMap(), new JREmptyDataSource());
1 error
C:Documents and SettingsAdministratorMy DocumentsCreatorProjectswithoutdatasourceireportnbprojectbuild-impl.xml:233: The following error occurred while executing this line:
C:Documents and SettingsAdministratorMy DocumentsCreatorProjectswithoutdatasourceireportnbprojectbuild-impl.xml:122: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 13 seconds)
see all error and
plese give me idea
thank's
aamirSee your other thread on the same topic
Re: jsp give me this error javax.servlet.ServletException: oracle.jdbc.driv
Maybe you are looking for
-
I can only listen to old voicemails in Visual Voicemail since before the iOS upgrade. I am curious whose issue this is to resolve, T-Mobile made it sound like it is Apple's problem and Apple seems to think that it is T-Mobiles. Does anyone know who
-
5800 Xpress problem..
Hi everyone, I got a 5800 last week and have found that while I'm using the phone, if I accidentally cover the prox sensor, the screen goes blank. Applications keep running and I can still touch buttons but with no display. Any ideas what's going on?
-
Hello, how I can do to buy from Argentina, an Apple product in the U.S.?
-
Purchase requisition valuation price
Hi Gurus System prompts me to enter the valuation price in purchasing screen in the sales order when I select the item category TAS/TAB. I maintained the valuation price using MR21 but still does not pick it. Info record too exists. Is something thin
-
I can´t install iTunes 10.7 on XP
I´m triying to instal iTunes 10.7 on XP Servicepack 3, I already have the last version of Quicktime 7.72 The fail is "There´s a problem with Windows Installer. A program running as a part of the instalation ended unexpected. Contact your provider". I