ERROR in inserting values in table PL/SQL code
Hello Friends,
I am facing a peculiar logical error in my PL/SQL code. PFB the code for your reference -
for k in (select account_no from mirror_lookup_accnt_hierarchy where mdate = sys_date) LOOP
dbms_output.put_line(' SYSDATE :!! '||sys_date||' '||k.account_no);
insert into sfdc_account select * from mirror_sfdc_account where sap_account_id__c=k.account_no;
commit;
end loop;
Just to elaborate on the code functionality......
The outer FOR loop on the table has the records in the order i want to populate in the final sfdc_account table.
Now, i compare the account_no of the table mirror_sfdc_account table with the account_no of the FOR LOOP and INSERT that record in the final sfdc_account table. So, it is entered according to the order i want to have.
The problem is, this code runs fine for the first time, but then on it does not popuate the values in the right order according to the FOR LOOP values.
I have tried deleting data and running again, but the error persists. It enters the records but NOT IN ORDER according to the condition i have given!!
Kindly Help.....what can be the problem!!
Thanks and Regards,
Hi friend,
The thing is that we need to populate the final
table based on a hierarchy,the relation between
parent and child fieldNo. The thing is.... that Oracle is a relational database. That means that the data is stored in a relational manner, not in an ordered manner, such as you get with COBOL and it's flat file format.
You CANNOT rely on the database to store data in an ordered manner.
If you require the data in some sort of order when you retrieve it then you MUST store information against the data which can be used to determine that order and you MUST specify an ORDER BY clause on your query that retrieves the data.
Internally Oracle will not maintain the order of the data for you automatically.
This is a simple truth.
Similar Messages
-
SQL*Loader-929: Error parsing insert statement for table
Hi,
I get the following error with SQL*Loader:
Table MYTABLE loaded from every logical record.
Insert option in effect for this table: INSERT
Column Name Position Len Term Encl Datatype
IDE FIRST * ; CHARACTER
SQL string for column : "mysequence.NEXTVAL"
CSI_NBR 1:10 10 ; CHARACTER
POLICY_NBR 11:22 12 ; CHARACTER
CURRENCY_COD 23:25 3 ; CHARACTER
POLICY_STAT 26:27 2 ; CHARACTER
PRODUCT_COD 28:35 8 ; CHARACTER
END_DAT 44:53 10 ; CHARACTER
FISCAL_COD 83:83 1 ; CHARACTER
TOT_VAL 92:112 21 ; CHARACTER
SQL*Loader-929: Error parsing insert statement for table MYTABLE.
ORA-01031: insufficient privileges
I am positive that I can SELECT the sequence and INSERT into the table with the user invoking sql*loader.
Where does that "ORA-01031" come from?
Regards
...Options:
1) you are wrong about privileges OR
2) you have the privilege only when you connect via SQL*Plus (or whichever other tool you used to test the insert).
Is it possible that during your test you enabled the role which granted you the INSERT privilege - and that SQL*Loader doesn't do this?
Can you see the table in this list?
select *
from user_tab_privs_recd
where table_name='MY_TABLE'
and owner='table owner whoever';
select *
from user_role_privs;Any roles where DEFAULT_ROLE is not YES?
HTH
Regards Nigel -
" Error when inserting in PSA table RSTSODSPART" when loading into PSA
Hello,
Did anyone encounter something similar, and found a solution ?
BI 7.0 - EnhP 1 - SP5
When loading data from R/3 into PSA, we encounter following error message:
" Error when inserting in PSA table RSTSODSPART"
===============================================================
- the first datapackage is written successfully to PSA,
but from the second datapackage onwards the error message pops-up
" Error when inserting in PSA table RSTSODSPART"
- The original dataselection in the infopackage is somewhere stored
If the selection in the InfoPackage is reduced (e.g. only one document i.o. a period)
it stil starts loading according the original selection (the month)
- If we create a new InfoPackage and select very few data (only one datapackage)
then we can load to PSA succesfully, but when we load to DSO we can't activate the DSO.
- We remarked that:
Two versions of the PSA exist for that datasource 0FI_GL_40:
a Table(/BIC/B0000555000) in version 1 exists,
a Table(/BIC/B0000555001) in version 2 exists
Thanks in advance,
Best regardsHello All,
We had a problem similar to what Ilse Depoortere describes. The problem happens in our BW QA system a few days/weeks after it has been copied from Production. Data loads start failing with these two error messages:
RSM2 851 - Error when writing in PSA (Caller 32)
RSAR 130 - Error 7 when adding to PSA (Caller 70)
We have just implemented the fix described in note 1340371 (replaced the LIB_DBSL with patch level 247), and the problem is gone. Failed data load process chains can be restarted and finish successfully.
This has been a really useful discussion, thanks all! And thanks to my coworker Bob who found it.
Vince Vajda -
I have an application made in devlopment which is working fine and i jsut migrated it to production but when i am running one of the page in the app in production it si throwing this error "ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small"... this report is ment for generating report.
Now what i have done, i compared both dev and prod environment but i have not found and changes except this one. In the page of both the application in dev and prod under shared component under under template the region of breadcrum and report region is showing in different position. i dont think it a problem because of that i am facing problem.
If anybody have idea how could i recitfy the prbs i will be highly thankful to you
Regards
Adifriends i have seen where the error is coming but i am unable to trace out how to increase the size of lov which i have made.
when i am taking display as select list(named lov) it is throwing me the error "ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small" but if i am taking display as "popup lov(named lov)" under tablular form element under one of the column in the report, it is working properly. but not shwoing the report the way we want it to show. For that reason i want to increase the size of the love which i have made. -
How to change the profile value in the pl/sql code without making change in the database
How to change the profile value in the pl/sql code without making change in the database.
I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
if these Profiles are set for the user running this program automatic printing should not be done. -
Inserting values from a PL SQL table to a database table
Hi,
Here is my dilemma.
I have values inserted to a pl sql table which I have gathered from a web page. Now I need to add these same values to a database table. I see the values as 1-'AA', 2='BB' etc.
I use the following code to insert to a outside table in the database and it seems to be crashing.
for i in app_table.first .. app_table.last loop
r_convention(i).priority_country_code:=app_table(i);
insert into test_countries
values (test_seq,tion(i).r_convention(i).priority_country_code);
commit;
end loop;
WHen I run this code I see the values. But it goes to the first value and then crashes and does not go through the
rest of the values. What am I missing here?
Thanks!Hi,
Why can't you directly insert into the table from the object type....
for i in app_table.first .. app_table.last loop
r_convention(i).priority_country_code:=app_table(i);
insert into test_countries
values (test_seq,app_table(i));
commit;
end loop;Can you give me your complete code, so that we can have a better picture..
Edited by: plsql dev on Sep 10, 2010 10:14 PM -
Error while inserting value Qualified field in the main table
Hello,
I am trying to populate Qualified field in the main table when a new record is inserted in the Products Repository.
The field is Reference Price and its a qualified lookup field. I am using the below code to create qualified lookup value and create qualified link values.
QualifiedLookupValue qlvRefPrice = new QualifiedLookupValue();
TableId qltabid = repSchema.getTableId("ReferencePrices");
FieldId qlfieldid = repSchema.getFieldId("ReferencePrices","RP_ReferncePrices");
RecordId rdRefPrice = getRecordId(connPool,session,"RP",qlfieldid,qltabid);
HashMap map = new HashMap();
map.put(repSchema.getFieldId("ReferencePrices","StartDate_ReferencePrice"),new DateTimeValue(cal));
map.put(repSchema.getFieldId("ReferencePrices","EndDate_ReferencePrice"),new DateTimeValue(cal));
map.put(repSchema.getFieldId("ReferencePrices","ListPrice"),new FloatValue(Float.parseFloat("123.3")));
map.put(repSchema.getFieldId("ReferencePrices","Currency"),new LookupValue(getLookupRecordId(connPool,session,"Currencies","Currency_Currencies","EUR")));
QualifiedLinkValue qlvLinkValue = MdmValueFactory.createQualifiedLinkValue(rdRefPrice,map);
qlvRefPrice.addValue(qlvLinkValue);
emptyRecord.setFieldValue(fieldIdRefPriceHistory,qlvRefPrice);
However when the createrecord command is executed I get the following error.
java.lang.RuntimeException: No matching validation Id 97. at com.sap.mdm.internal.validation.ValidationInfoHelper.retrieveValidations(ValidationInfoHelper.java:71) at com.sap.mdm.data.commands.CreateRecordCommand.execute(CreateRecordCommand.java:246) at com.alcatel_lucent.productdetail.ProductItemDetail_Comp.createProduct(ProductItemDetail_Comp.java:2927) at com.alcatel_lucent.productdetail.wdp.InternalProductItemDetail_Comp.createProduct(InternalProductItemDetail_Comp.java:656) at com.alcatel_lucent.productdetail.ProductItemAddView.onActionSave(ProductItemAddView.java:971) at com.alcatel_lucent.productdetail.wdp.InternalProductItemAddView.wdInvokeEventHandler(InternalProductItemAddView.java:662) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132) at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:332) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:761) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:696) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253) at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149) at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73) at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:869) at com.sap.tc.webdynpro.portal.pb.impl.localwd.LocalApplicationProxy.sendDataAndProcessAction(LocalApplicationProxy.java:77) at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1356) at com.sap.portal.pb.PageBuilder.SendDataAndProcessAction(PageBuilder.java:327) at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:869) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136) at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:332) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253) at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
I spoke to my MDM team and they say there is no validation which they have put for Reference Price field. I have tried inserting values in another field of type qualified lookup in the same main table and that works without any issue.
The code is as below:
QualifiedLookupValue qlvRating = new QualifiedLookupValue();
TableId qlvtable = repSchema.getTableId("ProductRatings");
FieldId qlvratinglink = repSchema.getFieldId("ProductRatings","RatingLink");
RecordId rdidPR = getRecordId(connPool,session,"CI",qlvratinglink,qlvtable);
wdComponentAPI.getMessageManager().reportSuccess("rdidPR "+rdidPR);
HashMap mapPR = new HashMap();
mapPR.put(repSchema.getFieldId("ProductRatings","AvailRating"),new LookupValue(getLookupRecordId(connPool,session,"AvailabilityRatings","AvailabilityRating_AvailabilityRatings","CI")));
mapPR.put(repSchema.getFieldId("ProductRatings","EffectiveDate"),new DateTimeValue(cal));
mapPR.put(repSchema.getFieldId("ProductRatings","FERAIndic"),new LookupValue(getLookupRecordId(connPool,session,"ReplacementIndicators","Code","FE")));
mapPR.put(repSchema.getFieldId("ProductRatings","FERAOrdItem"),new LookupValue(getLookupRecordId(connPool,session,"ReplProducts","ProdID","100008200")));
QualifiedLinkValue qlvLink = MdmValueFactory.createQualifiedLinkValue(rdidPR,mapPR);
qlvRating.addValue(qlvLink);
emptyRecord.setFieldValue(fieldIdRatingHistory,qlvRating);
I would really appreciate if someone can help in solving the issue.
Thanks in advance,
AamodHi Aamod,
Sees that some validation/assignments are getting triggered as soon as you make changes to the record in MDM. Please check once after removing validations/workflow that you may have. This way you may debug the issue.
Hope this helps!!
Cheers,
Arafat -
Hi all,
Apologies if any of the following sounds at all silly but I am fairly new to this so here goes...
I have 3 tables that require data insertion at the same time. The first table is the customers table, I then want to take the automatically generated custid from that table and inser it into 2 other tables along with some other data
Here's what I have so far which does not work:
CREATE PROCEDURE CustomerDetails.bnc_insNewRegistration @CustId int,
@CompanyName varchar(100),
@FirstName varchar(50),
@LastName varchar(50),
@Email nvarchar(254),
@HouseStreet varchar(100),
@Town smallint,
@County tinyint,
@Postcode char(8),
@Password nvarchar(20)
AS
BEGIN
begin tran
insert into CustomerDetails.Customers
(CompanyName, FirstName, LastName, EmailAddress)
Values (@CompanyName, @FirstName, @LastName, @Email)
set @CustId = (select CustId from inserted)
insert into CustomerDetails.Address
(CustomerId, HouseNoAndStreet, Town, County, PostCode)
values (@CustId, @HouseStreet, @Town, @County, @Postcode)
insert into CustomerDetails.MembershipDetails
(CustomerId, UserName, Password)
values (@CustId, @Email, @Password)
commit tran
END
GO
If anyone could help with this I would very much appreciate it as I am currently building an online store, if there's no registration there's no customers.
So to whom ever is able to help, I thank you whole heartedly :)I hope by now it is apparent that statements like "doesn't work" are not particularly helpful. The prior posts have already identified your first problem. But there are others. First, you have declared @CustID as an argument for your
procedure - but it is obvious that you do not expect a useful value to be supplied when the procedure is executed. Perhaps it should be declared as an output argument so that the caller of the procedure can know the PK value of the newly inserted customer
- otherwise, replace it with a local variable since it serves no purpose as an input argument.
Next, you are storing email twice. Duplication of data contradicts relational theory and will only cause future problems.
Next, I get the sense that your "customer" can be a person or a company. You may find that using the same table for both is not the best approach. I hope you have constraints to prevent a company from having a first and last name (and
vice versa).
Next, your error checking is inadequate. We can only hope that you have the appropriate constraints to prevent duplicates. You should expect failures to occur, from basic data errors (duplicates, null values, inconsistent values) to system issues
(out of space). I'll leave you with Erland's discussion for more detail:
erland - error handling.
Lastly, you should reconsider the datatypes you are using for the various bits of information. Presumably town and county are foreign keys to related tables, which is why they are numeric. Be careful you don't paint yourself into a corner with
such small datatypes. One can also debate the wisdom of using a separate tables for Town and County (and perhaps the decision to limit yourself to a particular geographic area with a particular civic hierarchy). Password seems a little short to me.
And if you are going to use nvarchar for some strings, you might as well use it for everything - especially names. Also, everyone should be security conscious by now - passwords should be encrypted at the very least.
And one last comment - you really should allow 2 address lines. Yes, two separate ones and not just one much larger one. -
JDBC Receiver adapter Error for insert into DB2 table
Hi all,
I want to insert data into a DB2 table on AS400 via a Receiver JDBC adapter.
The communication channel seems to be ok but when I try to send the message, I obtain the following message on the adapter monitoring :
Error: TransformException error in xml processor class, rollback:
Error processing request in sax parser: Error when executing statement for table/stored proc. 'GIK.GDT01' (structure 'Statement'): java.sql.SQLException: La table GDT01 de la bibliothèque GIK est incorrecte pour cette opération.
Could someone help me?
In the communication channel I have seen we can choose "native SQL String" as message protocol.
Do you think it could be a workaround for me? if yes, could someone send me an example about it?
thanks a lot,
PhilippeHi,
Try to remove GIK.GDT01 in table tag of your XML structure and put GDT01 alone and see.
The solution to your problem is found on this particular link.
http://www.websina.com/bugzero/faq/exception-as400.html
Tell me if it works
Best regards,
Felix -
Checkbox selects client and inserts value in table
Hi,
I have requirement where I need to create form which displays all Client Names with checkbox infront of them
so that user can select client for whom they want to process orders.
I have created checkboxes and trying to insert client in a table but it is not working. Here is my code.
Any help will be greatly appreciated.
IF :block.checkbox='Y' THEN
insert into client values(:block.client,600,user,sysdate);
Thanks
SandySorry but it didnt work. I am getting error 'Another Order is running please exit' and client could not get inserted in client_log table when client_count !=0 BUT when I give say Client_count>5 then it will insert client in table but then again one problem suppose i have checked 2,5,9,10 clients it will be inserted in table in 2,10,9,5 sequence. Can we make it in same sequence in which I have checked in form.
Here is my code in When_Button_Pressed trigger. I have two blocks Client and Detail.
Client data block has Checkbox, client name and detail data block has Process Button.
PACKAGE BODY CLIENT_PKG IS
Procedure process_call is
client_count number;
return_value number:= NULL;
begin
select count(*) into client_count from client_log
where log_group_source_id= 600;
if client_count !=0 then
message('Another Order is running please exit');
else
go_block('Client');
first_record;
loop
if :Client.Checkbox = 'Y' then
insert into client_log values(:client.client,600,user,sysdate);
end if;
exit when :system.last_record = 'TRUE';
next_record;
end loop;
first_record;
commit;
if form_success or sqlcode = 0 then
message('records successfully saved into database');
message(' ',no_acknowledge);
else
message('Error saving records: '||sqlerrm);
message(' ',no_acknowledge);
end if;
process_pkg.process_orders(600,return_value);
message('Process Called');
if return_value =0 then
message('Successful processing');
else
message('there is some problem with'||2);
end if;
end if;
end;
END;
Edited by: sandy162 on Mar 23, 2009 8:12 AM -
How can I insert values from table object into a regular table
I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
CREATE TABLE ITEM
ITEMID VARCHAR2(10) NOT NULL,
PRODUCTID VARCHAR2(10) NOT NULL,
LISTPRICE NUMBER(10,2),
UNITCOST NUMBER(10,2),
SUPPLIER INTEGER,
STATUS VARCHAR2(2),
ATTR1 VARCHAR2(80),
ATTR2 VARCHAR2(80),
ATTR3 VARCHAR2(80),
ATTR4 VARCHAR2(80),
ATTR5 VARCHAR2(80)
TYPE T_ITEM_OBJ AS OBJECT
ITEMID VARCHAR2(10),
PRODUCTID VARCHAR2(10),
LISTPRICE NUMBER(10,2),
UNITCOST NUMBER(10,2),
SUPPLIER INTEGER,
STATUS VARCHAR2(2),
ATTR1 VARCHAR2(80),
ATTR2 VARCHAR2(80),
ATTR3 VARCHAR2(80),
ATTR4 VARCHAR2(80),
ATTR5 VARCHAR2(80)
TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
INSERT INTO ITEM
ITEMID,
PRODUCTID,
LISTPRICE,
UNITCOST,
STATUS,
SUPPLIER,
ATTR1
) SELECT ITEMID, PRODUCTID, LISTPRICE,
UNITCOST, STATUS, SUPPLIER, ATTR1
FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
WHERE it.ITEMID != NULL;
COMMIT;
Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
Thanks.Sigh. I answered this in your other How can I convert table object into table record format?.
Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
Thank you for your future co-operation.
Cheers, APC -
Hi,
In Jdeveloper 12c I am trying to create a task flow where I have taken 3 pages to insert values in a table. On first page when I put data control of 2 columns as input with label, then on bindings tab I created an action as CreateInsert.
Now when I am trying to create invoke action in executables then this option is not available.
How can I create this task flow where values can be inserted in the table on the 3rd page fragment on commit button???
All 3 pages have data control input boxes to insert values in the table.Hi,
Right click on the task flow page activity, click create page def and add there. If your activity is a page, then you can select the page and generate the pagedef as well.
Then you can add the executables.
Thanks. -
Insert and update tables from SQL server to oracle database tables
Hi,
I am having problem while update data from sql server to oracle database tables.
I am doing one way insert +updates that is from SQL Server tables ==> Oracle database tables
I am using tools Sql server Integration service. I can insert data from sql server to oracle but update can't. Please help me how can I update + insert from sql server to oracle database tables easily.
Thanks in advance.Hi,
What about using Oracle SQL Developer for migration
http://www.oracle.com/technetwork/database/migration/sqlserver-095136.html
HTH -
How to insert values in table control & how to place listbox in table ctrl
Dear all,
I have created table control in Module pool program. My requirement is first
1)How to place list box in table control
2)Based on listbox selection i have to enter values in table control row..
With Regards,
BaskaranHi Baskaran,
For displaing list box, use FM: VRM_SET_VALUES.
Code like that:
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 15.
Instead of parameter for module pool , you declare data:
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = '3500000002'.
value-text = '3500000002'.
APPEND value TO list.
value-key = '3500000003'.
value-text = '3500000003'.
APPEND value TO list.
name = 'PS_PARM'.
value-key = '3500000004'.
value-text = '3500000004'.
APPEND value TO list.
name = 'PS_PARM'.
value-key = '3000000007'.
value-text = '3000000007'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
make the necesary change for module pool.
Hope this can solve your problems.
Regards,
Tutun -
ORA-01403: no data found error hile inserting into a table
Hi,
I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
Please someone help me. Below is the code.
CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
IS
BEGIN
IF t_array.count> 0 THEN
FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
FOR i IN t_array.FIRST..t_array.LAST
LOOP
INSERT INTO XXDL_TEST
VALUES(t_array(i).name )
END LOOP;
END IF;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
END;Thanks
AlakaIt looks like your Array is sparsely populated:
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(2) := 'B';
8 l_tab(3) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
B
C
PL/SQL procedure successfully completed.
SQL>
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(3) := 'B';
8 l_tab(4) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
DECLARE
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
You should also be using the FORALL syntax with INDICES OF. Check out The Docs
Maybe you are looking for
-
High cache usage of free memory
I dont know if this is normal but my fresh archlinux x86_64 install with Xfce uses round 300Mb of 4Gb ram space after boot but then after i start and close some programs i get to 3 Gb used of 3.87 Gb free memory when all applycation are closed. Now i
-
Need help with a java loop and word program
do you know any way to get a Scanner object to select a random string in a text file? ok pretty much I have a text file that isa list of 5 letter words. I need to select one at random. the only way I could think was to scan the file, get the entire n
-
Okay - I have been beating my head against the wall for a while now and with the newly release drivers from Epson I HAD renewed hope that things would start printing correctly. So, with above listed configuration I still am not getting correct prints
-
Add IPv6 to a running failover cluster
Hi I have a sql failover cluster running win2k8 R2 and SQL 2008 it was built around IPv4 the instance listens on IPv4 cluster IP address ( virtual IP) I rescently got a request that there will be servers running in pure IPv6 networks and the need to
-
Hi, I need to know How can I reference the current location of the write cursor in a jTextBox or jTextArea so that I can for example select the two chars that are before the cursor, or insert some words in the place the cursor is located... Any help?