WEB SERVCIE TO INSERT ROW ina Table in DATABASE
Hi ALL
I want to create a web service to insert row in a table in database.
As I am new to Web Service.
Please help me to do it.
Thanks in advance !
Hi Just_For_You !
I have some code snippet, you can refer them ( i use mySql ).
@WebMethod
public void InsertData( int INTVAR2, String STRVAR1)
Connection conn = null;
Statement stmt = null;
try {
String dbURL = "jdbc:mysql://localhost:3306/wsasset"; // url of the mysql database
String username = "root"; // username of wsasset database
String password = ""; // password of wsasset database
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection(dbURL, username, password);
String sqlInsert = "insert into TABLENAME (INTVAR2, STRVAR1)
values (?, ?)";
stmt = conn.createStatement();
stmt.executeQuery(sqlInsert);
Catch(SQLException e)
System.err.println(e);
}
Similar Messages
-
Hi
I want to display a message after inserting rows in table like *'you have inserted a new row successfully*'.
i am using the createinsert ADF Button to insert the rows in table.after that i am comitting it.
after commiting i want to display message for the user.for this what i need to do.
Please help me.
Sailaja.user10860137
Can you please explain me the each line in the code briefly.
+public String saveButton_action(){+
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
+// note "!" operator has been removed from the default code.+
+if(operationBinding.getErrors().isEmpty()){+
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage saveMsg = new FacesMessage("Record Saved Successfully");
ctx.addMessage(null,saveMsg);
+}+
return null;
+}+
And i have requirement to show the message on favcet "status bar".not in a popup window.(from the above code the message is showing in popup window. )the Layout i am using is PanelCollection.
can you tell me what i need to do.
Thanks
Sailaja.
Edited by: sj0609 on Mar 19, 2009 8:03 AM -
Inserting rows in table in web template
How do I insert rows in an already existing table in a web template?
Thanks,
SanjeevHi Gillian,
By table I meant the layout table, within which you can have multiple queries, the result of each displayed in the manner in which the Web Items are arranged within this table. I think you thought I meant a table Web Item.
I have a 3x3 table (which I obtained by clicking Insert -> Table -> Insert Table in the menu bar) within which I have 7 Web Items of 'Chart' type. I want to add a few more Web Items to this table, so I want to add rows to it.
Thanks,
Sanjeev -
How do you access a web service to insert data into table?
Ok I have a simple html/jsp survey form to host on our web site. Because of firewall issues I cannot do a direct connect to the database and insert the data from the form. So I need to take the data from the survey form, and pass it to an existing web service, or create a web service that will insert this information for me into the database table?
Thanks again.
orozcoThanks for the reply shanu. Well, because of firewall issues, as a work around we use a web service to insert data into the database table. Since the Web Service already exist, we just thought it would be easy enough just to pass the parameters to it, and have it do the insert. So really all I need is just to communicate with the already existing web service. I will be honest though I have not really worked with web services before.
orozcom -
How to insert row in table control and save the data in tables
Hi,
I have one table control i am displaying data into table control ,
my problem is : i want to display data into read mode in table control.
but when i click on insert button on the same screen i want one blank line should inserted into table control , then i want to insert some data into table control on that row , when i click the save button . the new data inserted into the table control is insert that data into ztable ,
please give me solution
main problen is how can know inserted line in table control and pass that data into ztable.Hi,
Follow the below logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
MODULE POPULATE_TABLE_CONTROL. --> Get the data from table store in
ITAB
LOOP AT GT_CTRL_LP_D516 INTO GS_WA_CTRL_LP_D516
WITH CONTROL CTRL_LP_D516
CURSOR CTRL_LP_D516-CURRENT_LINE.
The following module moves data to control
MODULE MOVE_TO_CONTROL.--> Move data from ITAB to table control
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT GT_CTRL_LP_D516.
ENDLOOP.
MODULE EXIT AT EXIT-COMMAND.
MODULE USER_COMMAND_0001. --> Here you have to take out the values from table control and update database table
Reward points if helpful.
Thanks and regards,
Mallareddy Rayapureddy,
Munich, Germany. -
Inserting rows in table while logging errors...Urgent
Hi all,
i want to insert rows from temp table to main table.
if temp table contains 100 rows.then all rows must be inserted
in main table.if their is any exception while insertion,
insertion must nt stop and erroring rows along with error no must be inserted in
error log table.
How to do this ?
i used forall save exceptions to achieve this .
but ws able to save only error no. but not errroing rows in error log table.
is there any efficient way to achieve this?
can forall be modified in way that it inserts erroring rows also?????Hi,
1.) does dbms_errorlog works fine in this case?If all of your 807 tables having same columns then i think it will work (NOT TESTED).
By the way are you also trying to insert rows for all tese 807 tables in a single PL/SQL block?
Please post how you are trying to insert then we can think about it,
Oracle ERROR_LOG table allows us to have any number of columns.
From the Oracle Docs:
The number of columns in this part of the error logging table can be zero, one, or more, up to the number of columns in the DML table. If a column exists in the error logging table that has the same name as a column in the DML table, the corresponding data from the offending row being inserted is written to this error logging table column. If a DML table column does not have a corresponding column in the error logging table, the column is not logged. If the error logging table contains a column with a name that does not match a DML table column, the column is ignored.
Regards -
Inserting rows in table control(Module pool)!!
Hi,
Pls provide me with some code sample for inserting rows in a table control (module pool)...
Regards
GunjanHI
Y dont u create a TABLE CONTROL using wizard and copy the coding-
TRY THIS-
WHEN 'INSR'. "insert row
PERFORM FCODE_INSERT_ROW USING P_TC_NAME
P_TABLE_NAME.
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO <LINES>.
*&SPWIZARD: get current line *
GET CURSOR LINE L_SELLINE.
IF SY-SUBRC <> 0. " append line to table
L_SELLINE = <TC>-LINES + 1.
*&SPWIZARD: set top line *
IF L_SELLINE > <LINES>.
<TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
ELSE.
<TC>-TOP_LINE = 1.
ENDIF.
ELSE. " insert line into table
L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
<TC>-LINES = <TC>-LINES + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE L_LINE.
ENDFORM. " FCODE_INSERT_ROW
HOpe this helps u
Regds,
Seema. -
Understanding logminer results -- inserting row into table with CLOB field
In using log miner I have noticed that inserts into rows that contain a CLOB (I assume this applies to other LOB type fields as well, have only tested with CLOB so far) field are actually recorded as two DML entries.
--the first entry is the insert operation that inserts all values with an EMPTY_CLOB() for the CLOB field
--the second entry is the update that sets the actual CLOB value (+this is true even if the value of the CLOB field is not being set explicitly+)
This separation makes sense as there may be separate locations that the values are being stored etc.
However, what I am tripping over is the fact the first entry, the Insert, has a RowId value of 'AAAAAAAAAAAAAAAAAA' which is invalid if I attempt to use it in a flashback query such as:
SELECT * FROM PERSON AS OF SCN #####' where RowId = 'AAAAAAAAAAAAAAAAAA'The second operation, the Update of the CLOB field, has the valid RowId.
Now, again, this makes sense if the insert of the new row is not really considered "+done+" until the two steps are done. However, is there some way to group these operations together when analyzing the log contents to know that these two operations are a "+matched set+"?
Not a total deal breaker, but would be nice to know what is happening under the hood here so I don't act on any false assumptions.
Thanks for any input.
To replicate:
Create a table with CLOB field:
CREATE TABLE DEVUSER.TESTTABLE
ID NUMBER
, FULLNAME VARCHAR2(50)
, AGE NUMBER
, DESCRIPTION CLOB
);Capture the before SCN:
SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;Insert a new row in the test table:
INSERT INTO TESTTABLE(ID,FULLNAME,AGE) VALUES(1,'Robert BUILDER',35);
COMMIT;Capture the after SCN:
SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;Start logminer session with the bracketing scn values and options etc:
EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTSCN=>2619174, ENDSCN=>2619191, -
OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE + -
DBMS_LOGMNR.COMMITTED_DATA_ONLY + DBMS_LOGMNR.NO_ROWID_IN_STMT + DBMS_LOGMNR.NO_SQL_DELIMITER)Query the logs for the changes in that range:
SELECT
commit_scn, xid,operation,table_name,row_id
,sql_redo,sql_undo, rs_id,ssn
FROM V$LOGMNR_CONTENTS
ORDER BY xid asc,sequence# ascResults:
2619178 0C00070028000000 START AAAAAAAAAAAAAAAAAA set transaction read write
2619178 0C00070028000000 INSERT TESTTABLE AAAAAAAAAAAAAAAAAA insert into "DEVUSER"."TESTTABLE" ...
2619178 0C00070028000000 UPDATE TESTTABLE AAAFEXAABAAALEJAAB update "DEVUSER"."TESTTABLE" set "DESCRIPTION" = NULL ...
2619178 0C00070028000000 COMMIT AAAAAAAAAAAAAAAAAA commitEdited by: 958701 on Sep 12, 2012 9:05 AM
Edited by: 958701 on Sep 12, 2012 9:07 AMScott,
Thanks for the reply.
I am inserting into the table over a database link.
I am using the new version of HTML Db (2.0)
HTML Db is connected to an Oracle 10 database I think, however the table I am trying to insert data into (via the database link) is in an Oracle 8 database - this is why we created a link to it as we couldn't have the HTML Db interacting with the Oracle 8 database directly due to compatibility problems (or so I've been told)
Simon -
Inserting rows into table Based on Column Values.
Hi,
I am trying to inserting rows into a table based on Column.
Id Name
Data
N 105.1.1
http://www.example.com/New/105.1.1
U 105.1.2 http://www.example.com/Used/105.1.2
S 105.1.3 http://www.example.com/Sold/105.1.3
I want a table like this.
I want to insert Data column value based on Id and Name Columns
If Id = N and Name = 105.1.1 then Data value should be insert as http://www.example.com/New/105.1.1
If Id = U and Name = 105.1.2 then Data value should be insert as http://www.example.com/Used/105.1.2
If Id = S and Name = 105.1.3 then Data value should be insert as http://www.example.com/Sold/105.1.3
Can you please help us to write query to insert above Data Column values based on Id and Name Columns.INSERT INTO tbl (col) SELECT
CASE WHEN id='N' and Name='105.1.1 ' THEN 'http://www.example.com/New/105.1.1'
WHEN id='U' and Name='105.1.2 ' THEN 'http://www.example.com/New/105.1.2'
END col
FROM anothertbl
Sorry , cannot test it right now.
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Insert rows in table - ORA-01008
Hi everybody,
I have designed a page (Page 11, Page Name: Evaluar ALUMNOS) to insert rows in a table. I didn´t want to use a tabular form, so I used this:
Page items
LISTA_CURSOS Select List
Region: Añadir
ID_ALUMNO Select List with Submit
DESCRIPCION Text Field
NOTA Select List
OBSERVACIONES Text Field
FECHA Date Picker (DD-MON-RR)
Buttons
ANIADIR Button
...Database Action -> SQL INSERT action
Processes
PROCESS Aniadir PL/SQL anonymous block Conditional
...Process Point -> On submit - After Computations and Validations
...Source:
declare
begin
execute immediate 'insert into EVALUACIONES
(ID_ALUMNO, ID_CURSO, DESCRIPCION, NOTA, OBSERVACIONES, FECHA)
values
(:page11.ID_ALUMNO, :page11.LISTA_CURSOS, :page11.DESCRIPCION, :page11.NOTA, :page11.OBSERVACIONES, :page11.FECHA)';
commit;
end;
...When Button Pressed (Process After Submit When this Button is Pressed) -> ANIADIR
When I run the application, I insert the values and click "ANIADIR" button, but then I get the following error:
ORA-01008: not all variables bound
I´ve tried to find a solution, but I don´t know what is causing this...
It would be great if you could help me!
Thanks,
LuisHello again.
After some tries I cannot solve this error (ORA-01400: cannot insert NULL into...)
Table EVALUACIONES description is:
Column Name Data Type Nullable Default Primary Key
ID_ALUMNO NUMBER No - -
ID_CURSO NUMBER No - -
DESCRIPCION VARCHAR2(400) No - -
NOTA BINARY_FLOAT No - -
OBSERVACIONES VARCHAR2(500) Yes - -
FECHA DATE No - -
When the error was:
ORA-01400: cannot insert NULL into ("LUIS2"."EVALUACIONES"."ID_CURSO")
I tried to use v_ID_ALUMNO number :=nvl(v('page11.ID_ALUMNO'),0) in order to avoid entering a null value, but then it complained about null value in ID_CURSO (wich is not nullable)
Then I added v_LISTA_CURSOS number :=nvl (v('page11.LISTA_CURSOS'),0); (the value of v_LISTA_CURSOS is the one I want to insert into ID_CURSO) and it complained about null value in the next colunm, DESCRIPCION (wich is not nullable also)...
... so I guess that the code wich is getting the value from the items is not working, because when the INSERT is executed, it tries to insert null values in all columns.
The last code I have tried is this:
declare
v_ID_ALUMNO number :=v(':page11.ID_ALUMNO');
v_LISTA_CURSOS number :=v('page11.LISTA_CURSOS');
v_DESCRIPCION varchar2(400) :=v('page11.DESCRIPCION');
v_NOTA binary_float :=v('page11.NOTA');
v_OBSERVACIONES varchar2(500) :=v('page11.OBSERVACIONES');
v_FECHA date :=v('page11.FECHA');
begin
execute immediate 'insert into EVALUACIONES '||
'(ID_ALUMNO, ID_CURSO, DESCRIPCION, NOTA, OBSERVACIONES, FECHA) '||
'values '||
'('''||v_ID_ALUMNO||''', '''||v_LISTA_CURSOS||''', '''||v_DESCRIPCION||''', '''||v_NOTA||''', '''||v_OBSERVACIONES||''', '''||v_FECHA||''')';
-- using v_ID_ALUMNO, v_LISTA_CURSOS, v_DESCRIPCION, v_NOTA, v_OBSERVACIONES, v_FECHA ;
-- commit;
end;
Could you please help me with this?
Thanks,
Luis -
Read a file and insert rows into table
Hi,
i would like to know how read a file (expl.txt) with the utl_file package and after insert each row into the table (dataID).
ie :
file /tmp/expl.txt is containing :
id1 id2 describe
2 3 test1
6 5 test2
4 7 test3
and
table dataID (
id1 number,
id2 number,
describe varchar2(100));
Thanks you very much.Hello,
You can use the TEXT_IO package.
Perform an over-all search (right upper corner) on TEXT_IO, and in the results you will find a manual on how to use the package.
Hope this will help you.
Regards,
Cindy -
Unable to insert row into table.
hi all,
here i am using oracle apex 3.2.0.0.0.27 version.
i am unable to insert a row in the database table.when i press a save button i get an error is
0.07:
0.08: S H O W: application="132" page="4" workspace="" request="" session="3286250612369434"
0.14: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
0.15: alter session set nls_language="AMERICAN"
0.16: alter session set nls_territory="AMERICA"
0.16: NLS: CSV charset=WE8MSWIN1252
0.16: ...NLS: Set Decimal separator="."
0.16: ...NLS: Set NLS Group separator=","
0.16: ...NLS: Set date format="DD-MON-RR"
0.17: ...Setting session time_zone to +05:30
0.17: Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY HH:MIPM
0.18: ...NLS: Set date format="DD-MON-YYYY HH:MIPM"
0.19: NLS: Language=en-us
0.21: Application 132, Authentication: CUSTOM2, Page Template: 102166708405540699
0.27: ...Session ID 3286250612369434 can be used
0.27: ...Application session: 3286250612369434, user=COMP
0.28: ...Determine if user "COMP" workspace "16032411264866286" can develop application "132" in workspace "16032411264866286"
0.29: ...Check for session expiration:
0.31: Session: Fetch session header information
0.33: ...Metadata: Fetch page attributes for application 132, page 4
0.34: Fetch session state from database
0.38: Branch point: BEFORE_HEADER
0.39: Fetch application meta data
0.49: Setting NLS_DATE_FORMAT to application date format: DD-MON-YYYY HH:MIPM
0.49: ...NLS: Set date format="DD-MON-YYYY HH:MIPM"
0.49: Computation point: BEFORE_HEADER
0.49: Processing point: BEFORE_HEADER
0.49: ...Process "Row_fetch": DML_FETCH_ROW (BEFORE_HEADER) F|#OWNER#:PC_MASTER:P4_PC_ID:PC_ID
0.73: Show ERROR page...
0.73: Performing rollback...
0.79: Processing point: AFTER_ERROR_HEADER
ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
Error UNABLE TO FETCH
OK
please anyone can help me to come out this problem.
thanks
regards,
tipanHi Tipan,
This error isn't due to you pressing save, it occurs when the page reloads because you are trying to fetch a record from a database table and the Primary Key APEX Page Item field doesn't have a value in it. You need to add a condition to your fetch so it only runs when the primary key page item has a value in it.
Hope this helps
Paul -
Object Browser - Insert row into table
Hi,
I'm attempting to simply INSERT a row into a table using the "Create Row" in the Object Browser. I enter in all the data for the row, and click the Create button. There is no process success message, just another entry form for the Create Row is displayed. When I query the table, the data I just entered for the row is not there. What is going on?
Thank you,
LauraWhat version are you using? 2.2.0.00.32
What are the column datatypes? I have several VARCHAR2, NUMBER, DATE, and CHAR columns.
Are you using (do you see) the Create or "Create and Create Another" button?
Yes, I tried both the "Create" and "Create and Create Another" button.
Does it work correctly on apex.oracle.com?
Hmm...looks like I will have to request a new Workspace. I haven't logged into there for quite some time (forgot my Workspace name, etc.)...and the email address you have on file for me is no longer a valid email address. -
How to use simple values services for multiple rows ina table
Hi Frnds...
As per my requirment i need to use SVS for multile rows in a table.
The coding goes like this for getting single attribute which is directly under root context.
objSimpleValueSetCurr = wdContext.getNodeInfo().getAttribute("ctx_attribute");
(this is only for context attribute directly placed under root context in the view controller.)
We need to use value node and a value attribute inside this node. And retrieve the same. so need help regarding the code changes.
Regards,
SudeepHi ,
I had tried out your suggestion. Its not working.
The code goes like this, but the data is not getting populated.
"controller_curr" is the value attribute under the node "InitTable" in the controller which is further mapped to view controller with the same structure.
The data is geting printed through the message manager just before the line
divSMT.put(currency,currency); in this code, at the end.
But "divSMT.put" is not able to populate the data.
_________START________
public void currency( )
//@@begin currency()
IWDMessageManager msg = wdComponentAPI.getMessageManager();
ISimpleTypeModifiable objSimpleTypeCurr = null;
IModifiableSimpleValueSet objSimpleValueSetCurr = null;
String currency=null;
String bandg = null;
Z_Bapi_Get_Curr_Rate_Input authCurrDet = null; //for FCURR
Try
authCurrDet = new Z_Bapi_Get_Curr_Rate_Input();
wdContext.nodeZ_Bapi_Get_Curr_Rate_Input().bind(authCurrDet);
wdContext.nodeZ_Bapi_Get_Curr_Rate_Input().currentZ_Bapi_Get_Curr_Rate_InputElement().modelObject().execute();
IWDAttributeInfo objSimpleValueSetCurr1 = wdContext.nodeInitTable().getNodeInfo().getAttribute("controller_curr");
ISimpleTypeModifiable countryType = objSimpleValueSetCurr1.getModifiableSimpleType();
IModifiableSimpleValueSet divSMT = countryType.getSVServices().getModifiableSimpleValueSet();
int sizeofCurrencyFCURR = wdContext.nodeOPCURROutput().nodeIt_Curr_Rate().size();
msg.reportSuccess("SizeofCurrency FCURR : "+sizeofCurrencyFCURR);
for(int i=0;i<sizeofCurrencyFCURR;i++)
currency = wdContext.nodeOPCURROutput().nodeIt_Curr_Rate().getIt_Curr_RateElementAt(i).getFcurr();
msg.reportSuccess("Currency : "+currency);
divSMT.put(currency,currency);
catch(Exception e)
//@@end
_________END________
Please look into the issue.
Regards. -
Problem inserting rows to table using BPEL workflow
Hi,
I’m going to invoke below procedure which is inside a package.
PROCEDURE as_ebs_status_msg(getData in varchar) AS
BEGIN
insert into AS_AP_INV_STATUS_IPM values('BP1234','BP1234','BP1234');
END as_ebs_status_msg;
Once I invoke this procedure from sql developer (Using execute command) it inserts those values to the table.
But when I invoke this from a BPEL work flow (adding partner link) it completes without any error. But values are not getting populated to the table.
And I tried to use Insert functionality of DB adapter, that is also not inserting values to any table but I can run select queries.
Is anyone came across this issue?
Thank You,
any response greatly appreciated.......
Edited by: Nir on Aug 31, 2011 10:47 PMHallo,
but you haven't a loop ! :-)
Try this,
(not tested)
set serveroutput on
declare
lastcall date;
srcip varchar2(50);
username varchar2(50):='9204';
duration number;
callto varchar2(50);
accountid varchar2(50);
calltime date;
subscriberid varchar2(50);
country varchar2(50);
cost varchar2(50);
CURSOR process_cdr
IS
SELECT
srcip,
username,
callto,
calltime,
duration
FROM rawcdr
WHERE calltime>lastcall;
begin
select max(calltime_gmt) into lastcall from
processed_cdr;
open process_cdr;
LOOP
fetch process_cdr into srcip,username,callto,calltime,duration;
EXIT WHEN process_cdr%NOTFOUND;
dbms_output.put_line(callto);
if (instr(callto,'00')=5) then
callto:=SUBSTR(REPLACE(callto,SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') + 3, 50);
dbms_output.put_line(callto);
elsif (instr(callto,'011')=5) then
callto:=SUBSTR(REPLACE(callto, SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') + 4, 50);
dbms_output.put_line(callto);
else
callto:=SUBSTR(REPLACE(callto, SUBSTR(callto, INSTR(callto, '@'), 50), ''), INSTR(callto, ':') +1 , 50);
end if;
process_call(srcip,username,duration,callto,accountid,subscriberid,country,cost);
dbms_output.put_line(cost);
dbms_output.put_line('trying to insert');
insert into processed_cdr values(accountid,subscriberid,srcip,username,callto,country,calltime,duration,cost) ;
dbms_output.put_line('inserted successfully');
/* Second fetch is not needed
--FETCH process_cdr INTO srcip, username, callto, calltime, duration; */
END LOOP;
close process_cdr;
COMMIT; -- eventually
end;You didn't answered - do you do COMMIT elsewhere ?
I placed COMMIT also, if you don't need it, you can comment it
Regards
Dmytro
Maybe you are looking for
-
Premiere Pro CC 2014 crashing on export using Windows 8.1
Hello I am using Windows 8.1 and ever since I did the most recent update of creative cloud for my apps PR CC 2014 crashes every time I export to media encoder, I have found a little work around by opening media encoder and choosing the file I want ma
-
PDF opens in Reader but Reader is not my default viewer
I have doPDF as one of my printers so I can create a PDF file. In Control Panel Folder Options, my default PDF viewer is set to Foxit. That is what I want. I have Acrobate Reader on my PC for the rare instances I NEED Acrobate Reader. When I select d
-
ITunes U displaying in another language (German)
We have a couple of users in which the content that comes from Apple in iTunesU is being displayed in German, not English. It is only happening on specific computers. It is computer specific, not user specific. The content they create (specific to ou
-
Hello, i use Netweaver2004s with Portal Content. I tried to install a complete portal application from a partner company. We want to use a R/3 System to get the data and show it in the portal. I already imported the ".sca" and ".sar" files. I also im
-
Error when reading Excel as a source OLE or COM processing error:
I received the following error when reading an Excel sheet directly into a target template table. Nothing fancy, but the error pops up immediately. I have found the problem and am posting the error and resolution to hopefully help others, -rs- 69