Prob in merge FI & MM data using infoset
hi
I need to integrate data from FI and MM. that for a particular PO , i want all the MM data as well as the FI doc created for it in a single record.
For this I am creating an Infoset in R/3 against the RBKP , BSIK and BSAK tables.
& joining conditions defined on the Invoice Number as a common field.
Then , i created an Datasource over this Infoset , still i am not able to get any data in RSA3.
can u guys suggest a better way to do this.
My requirement is that, i need to merge MM data fields with its corresponding FI data fields for the particular Doc no.
thanks
Ramesh
Edited by: Ramesh I on Sep 22, 2008 11:04 AM
even after prioritizing the fields that CO should come from FI & MG should come from MM & so on..
i am again going to get the same 2 records as of now because i need to execute 2 dtps to fetch data from those 2 DSOs. hence i dont think it will improve my condition.
now , my problem is i am actually 4 records to be specific.
FI doc PO CC CO PC MAT MG AMT INV tax
510000000 45000000 0030 4000 40001 # # 10000 0
510000000 45000000 # # # 100 200 10000 0
510000000 45000000 0030 4000 40001 100 200 10000 100000
510000000 45000000 # # # # # 0 0 4000
record 1 - FI
record 2 - MM
record 3- merged record . this is only record which i need
record 4 - tax line item. i dont know why it is coming as a separate record & that too with most of field info.
is there anyway , i can select only this record 3 & also show my tax amt in record 3 itself. & record 1,2 & 4 be deleted.
Guys , pour in some ideas.
Thanks
Ramesh
Similar Messages
-
Merge data Using Array records. Possible?
Hi,
I have a package with an array of emp%rowtype declared.
I now want to use merge. I.e if the elements of array is found in table, upate it else insert.
I am geeting compling errors table does not exist.
Can merge be used this way?
Please guide..
CREATE OR REPLACE PACKAGE UPD_emp_ALl AS
TYPE Varry_emp IS TABLE OF emp%ROWTYPE;
PROCEDURE UPD_emp(emp_rec in Varry_emp);
end UPD_emp_all;
CREATE OR REPLACE PACKAGE BODY UPD_emp_All AS
PROCEDURE UPD_emp(emp_rec in Varry_emp) is
BEGIN
MERGE INTO emp T
Using emp_rec V
ON (T.emp_id= V.emp_id and
T.emp_dept=V.emp_dept)
WHEN MATCHED THEN
UPDATE set
T.col1 = v.col1,
T.col2= v.col2,
so on...
WHEN NOT MATCHED THEN
Insert (T.col1,T.col2,T.col3,...)
vALUES (V.col1,V.col2,V.col3,...);
END UPD_emp;
END UPD_emp_All;
/Thanks Avinash.
Even if i declare a variable of same type as emp_rec,
inseide my procedure, how do i assign my new_array with values of the ones that has been passed through a parameter?
Plz help..
I get an ARRAY as a parameter in the procedure.
Need to use it to merge with a Table.
CREATE OR REPLACE PACKAGE UPD_Pemp_all AS
TYPE Varry_emp IS TABLE OF emp%ROWTYPE;
PROCEDURE UPD_emp(emp_rec in Varry_emp);
end UPD_PATCH;
CREATE OR REPLACE PACKAGE BODY UPD_emp_ALL AS
PROCEDURE UPD_emp(emp_rec in Varry_emp) is
BEGIN
FORALL I IN emp_rec.first..emp_rec.last
MERGE INTO emp T
Using dual V (also tried using select * from Table(emp_rec))
ON (T.emp_id= emp_rec(i).emp_id and
one more cond)
WHEN MATCHED THEN
UPDATE set
t.cols=emp_rec(i).cols
WHEN NOT MATCHED THEN
Insert (stuff here)
END UPD_PASTATUS;
END UPD_PATCH;
The FOR ALL is not working, thows erros cannot bind etc.. I am Using Oracle 10g Rel2
Thanks for any help. -
Restful service unable to insert data using PL/SQL.
Hi all,
Am running: AL 2.01 standalone mode on OEL 4.8 in VM box A.
Oracle database 10.2.0.4 with Apex 4.2.0.00.27 on OEL4.8 in VM box B.
Able to performed oracle.example.hr Restful services with no problem.
Unable to insert data using AL 2.0.1 but works on AL 1.1.4.
which uses the following table (under schema: scott):
create table json_demo ( title varchar2(20), description varchar2(1000) );
grant all on json_demo to apex_public_user; and below procedure ( scott's schema ):
CREATE OR REPLACE
PROCEDURE post(
p_url IN VARCHAR2,
p_message IN VARCHAR2,
p_response OUT VARCHAR2)
IS
l_end_loop BOOLEAN := false;
l_http_req utl_http.req;
l_http_resp utl_http.resp;
l_buffer CLOB;
l_data VARCHAR2(20000);
C_USER_AGENT CONSTANT VARCHAR2(4000) := 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';
BEGIN
-- source: http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
-- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
-- rather than just returning the text of the error page.
utl_http.set_response_error_check(false);
-- Begin the post request
l_http_req := utl_http.begin_request (p_url, 'POST', utl_http.HTTP_VERSION_1_1);
-- Set the HTTP request headers
utl_http.set_header(l_http_req, 'User-Agent', C_USER_AGENT);
utl_http.set_header(l_http_req, 'content-type', 'application/json;charset=UTF-8');
utl_http.set_header(l_http_req, 'content-length', LENGTH(p_message));
-- Write the data to the body of the HTTP request
utl_http.write_text(l_http_req, p_message);
-- Process the request and get the response.
l_http_resp := utl_http.get_response (l_http_req);
dbms_output.put_line ('status code: ' || l_http_resp.status_code);
dbms_output.put_line ('reason phrase: ' || l_http_resp.reason_phrase);
LOOP
EXIT
WHEN l_end_loop;
BEGIN
utl_http.read_line(l_http_resp, l_buffer, true);
IF(l_buffer IS NOT NULL AND (LENGTH(l_buffer)>0)) THEN
l_data := l_data||l_buffer;
END IF;
EXCEPTION
WHEN utl_http.end_of_body THEN
l_end_loop := true;
END;
END LOOP;
dbms_output.put_line(l_data);
p_response:= l_data;
-- Look for client-side error and report it.
IF (l_http_resp.status_code >= 400) AND (l_http_resp.status_code <= 499) THEN
dbms_output.put_line('Check the URL.');
utl_http.end_response(l_http_resp);
-- Look for server-side error and report it.
elsif (l_http_resp.status_code >= 500) AND (l_http_resp.status_code <= 599) THEN
dbms_output.put_line('Check if the Web site is up.');
utl_http.end_response(l_http_resp);
RETURN;
END IF;
utl_http.end_response (l_http_resp);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line (sqlerrm);
raise;
END; and executing in sqldeveloper 3.2.20.09 when connecting directly to box B as scott:
SET serveroutput ON
DECLARE
l_url VARCHAR2(200) :='http://MY_IP:8585/apex/demo';
l_json VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
l_response VARCHAR2(30000);
BEGIN
post( p_url => l_url, p_message =>l_json, p_response => l_response);
END;which resulted in :
anonymous block completed
status code: 200
reason phrase: OK
with data inserted. Setup using 2.0.1
Workspace : wsdemo
RESTful Service Module: demo/
URI Template: test
Method: POST
Source Type: PL/SQLand executing in sqldeveloper 3.2.20.09 when connecting directly to box B as scott:
SET serveroutput ON
DECLARE
l_url VARCHAR2(200) :='http://MY_IP:8585//apex/wsdemo/demo/test';
l_json VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
l_response VARCHAR2(30000);
BEGIN
post( p_url => l_url, p_message =>l_json, p_response => l_response);
END;which resulted in :
status code: 500
reason phrase: Internal Server Error
Listener's log:
Request Path passes syntax validation
Mapping request to database pool: PoolMap [_poolName=apex, _regex=null, _workspaceIdentifier=WSDEMO, _failed=false, _lastUpdate=1364313600000, _template=/wsdemo/, _type=BASE_PATH]
Applied database connection info
Attempting to process with PL/SQL Gateway
Not processed as PL/SQL Gateway request
Attempting to process as a RESTful Service
demo/test matches: demo/test score: 0
Choosing: oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as current candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true]
Determining if request can be dispatched as a Tenanted RESTful Service
Request path has one path segment, continuing processing
Tenant Principal already established, cannot dispatch
Chose oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as the final candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true] for: POST demo/test
demo/test is a public resource
Using generator: oracle.dbtools.rt.plsql.AnonymousBlockGenerator
Performing JDBC request as: SCOTT
Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
INFO: Error occurred during execution of: [CALL, begin
insert into scott.json_demo values(/*in:title*/?,/*in:description*/?);
end;, [title, in, class oracle.dbtools.common.stmt.UnknownParameterType], [description, in, class oracle.dbtools.common.stmt.UnknownParameterType]]with values: [thetitle, thedescription]
Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
INFO: ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-id
java.sql.SQLException: ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-id
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:242)
at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124)
at oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.invoke(CallableStatementProxyFactory.java:101)
at $Proxy46.execute(Unknown Source)
at oracle.dbtools.common.jdbc.JDBCCallImpl.execute(JDBCCallImpl.java:44)
at oracle.dbtools.rt.plsql.AnonymousBlockGenerator.generate(AnonymousBlockGenerator.java:176)
at oracle.dbtools.rt.resource.templates.v2.ResourceTemplatesDispatcher$HttpResourceGenerator.response(ResourceTemplatesDispatcher.java:309)
at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:88)
at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:412)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1059)
at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:999)
at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:434)
at oracle.dbtools.standalone.SecureServletAdapter.doService(SecureServletAdapter.java:65)
at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:379)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:196)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Error during evaluation of resource template: ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-idPlease advise.
Regards
ZackZack.L wrote:
Hi Andy,
Sorry, forgot to post the Source that's use by both AL1.1.4 and AL2.0.1.
Source
begin
insert into scott.json_demo values(:title,:description);
end;
it's failing during the insert?
Yes, it failed during insert using AL2.0.1.
So the above statement produces the following error message:
The symbol "" was ignored.
ORA-06550: line 2, column 74:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-idThis suggests to me that an unprintable character (notice how there is nothing between the double quotes - "") has worked its way into your PL/SQL Handler. Note how the error is reported to be a column 74 on line 2, yet line 2 of the above block should only have 58 characters, so at a pure guess somehow there's extra whitespace on line 2, that is confusing the PL/SQL compiler, I suggest re-typing the PL/SQL handler manually and seeing if that cures the problem. -
How can I transfer/merge the backup-data of one iphone onto another iphone?
I have two iphones and want to merge the backup-data from one to the other without destroying any data on the new one. How can I do it and will this data be replaced automatically or merged?
Thanks for your help!
ToniAs long as you use the same account, you can sync the same apps, contacts, music and other media content. Set up at least one contact and event on your new phone, to be able to merge your contacts and calendars. You can't transfer settings of your 3rd party apps, because this data is stored in your backup, and restoring from your backup will erase your new phone's data.
See also: "About backups" http://support.apple.com/kb/HT1766
You can also transfer your mail account settings using the option in the info pane in itunes, as well as the option to replace contacts, calendars, bookmarks and notes during the following sync. -
Hello All ,
Ran into a problem using MERGE statement . Looks like the USING clause in merge statement has to return data for the merge to work. My issue is that when the using select is not returning any data the merge does not perform the WHEN NOT MATCHED insert operation. Is it the default behavior or am i missing something . Also is there a way to overcome it. Here is what i am doing
DELETE FROM EMP WHERE EMPNO = 1;
MERGE INTO EMP A
USING (SELECT * FROM EMP WHERE EMPNO = 1) B
ON (A.EMPNO = B.EMPNO)
WHEN NOT MATCHED THEN
INSERT
(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES
(1, 'S', 'S', 23, SYSDATE, 12, '', 34);
Commit;
In the above example i am expecting the row to be inserted but it is NOT . My actual business requirement is that my using clause will be based in input parameters and if no rows returned i need to insert else if match found update. Please clarify.Something like this:
merge into Emp e --destination table
using (select 1 EmpNo --Your inputs
,'S' EName
,'S' Job
,23 Mgr
,12 HireDate
,null Comm
,34 DeptNo
from dual --if the inputs come in an array or a query, use this here
) new_vals
on (e.EmpNo = new_vals.EmpNo)
when matched then
update set e.EName = new_vals.EName
,e.Job = new_vals.Job
,e.Mgr = new_vals.Mgr
,e.HireDate = new_vals.HireDate
,e.Comm = new_vals.Comm
,e.DeptNo = new_vals.DeptNo
when not matched then
insert
(e.EmpNo
,e.EName
,e.Job
,e.Mgr
,e.HireDate
,e.Comm
,e.DeptNo
values
(new_vals.EmpNo
,new_vals.EName
,new_vals.Job
,new_vals.Mgr
,new_vals.HireDate
,new_vals.Comm
,new_vals.DeptNo
Untested. -
Not able to Import data using "clear and replace"
Hi,
If I import data using the data admin package "Import" and "Merge" as 'method for importing' the process runs without problems.
If I change the 'method for importing' to "Clear and Replace" the process fails. See message:
TOTAL STEPS 2
1. Convert Data: completed in 3 sec.
2. Load and Process: Failed in 1 sec.
3. Import: completed in 1 sec.
[Selection]
FILE=\UHRENHOLT\LEGAL_DATALOAD\DataManager\DataFiles\\Axapta_Load.txt
TRANSFORMATION=\UHRENHOLT\LEGAL_DATALOAD\DataManager\TransformationFiles\\Axapta_Load.xls
CLEARDATA= Yes
RUNLOGIC= Yes
CHECKLCK= Yes
[Messages]
Key cannot be null.
Parameter name: key
I'm uisng the standard data admin package (and thereby the values 0 and 1). For some reason the value 1 is not accepted.
Any suggestions?
/LarsHi,
The "Replace & clear..." feature during data import depends on Work Status. So to use this functionality, you need to setup Work Status under your application. Notice that you need to setup Work Status even if you aren't selecting the option to check Work Status when running the package.
Hope this will help you.
Kind Regards,
Patrick -
Extraction using infoset query.
Hi,
I have an extractor in R/3 which is using infoset for extraction. The infoset contains some logic for extraction. I want to debugg the infoset. As the infoset is not attached to a query how can i debugg the code written in infoset.
Thanks & Regards,
Soumya.Soumya,
If the problem is in the data which is being extracted from R/3 then debug the datasource by:
use transaction RSA3 in R/3 to execute the datasource and put a tick in the option "Debug Mode".
Mark -
Interactive report using Infoset quiereis with SQ01,SQ02,SQ03.
Hi,
I have to create a report by using the infoset query with SQ01,SQ02 and SQ03 Tcodes. But problem my requerment is that I have to create one interactive report with these quereis.
Can any body tell me how to create this interactive report using infoset quereis OR are there any standard quereis which are having interactive nature.
Pleas send me the solution and thanks in advance.
regards,
J.Yes, but I am not able to figure exactly how to implement it? I mean I can do this same code in SE38 where I know names of the internal tables. But when in SQ02 we can't modify/read system tables (I found name of the system tables using report generated by SQ01). So how you will access them, then how you will reflect our changes in output ALV grid?
Example:
Data:
Rate Cat. Installation Date
71 60000984 20/10/2009
71 60000984 20/12/2009
71 60001101 10/09/2009
78 60000310 10/09/2009
78 60000315 10/09/2009
83 60000297 10/09/2009
so in this case I want output:
Rate Cat. Installation Date
71 60000984 20/12/2009
71 60001101 10/09/2009
78 60000310 10/09/2009
78 60000315 10/09/2009
83 60000297 10/09/2009
You will see 71 60000984 20/10/2009 is not the latest one, therefore I don't want that row. I can do the ABAP logic for this, but exactly what and how to implement in SQ02? -
Cannot figure out what is wrong. It says my lightroom is up to date but not showing the option photo>photo merge so I can use the new HDR function in Lightroom. Is anyone else having this problem?
Contact Adobe. That is what I finally had to do. the number is 1-800-833-6687. There was a problem with a file. They took over my computer and got everything working for me.
Shane -
How to Merge the Asset Data....
Hi,
we have many subsidiary companies which are maintaining separate books of accounts.out of which
now one of the organization which was following separate accounting package (not sap) is getting
merged with group Co & we need to merge thier data of accounts.
what is the procedure do i need to follow to merge their Assets Data to SAP from different accounting
package.
Any Help Please.....
Regards,
Shekar.Hi Shekar,
For using AS91 you need to change the takeover year of existing company code, which does not seems to be a good idea, I will go for purchase route , but it depend if you want to bring asset at Net book value or with their accumulated depreciation also.
So main thing is how we will treat the merger in our books , if we will bring them at Net book value as acquisition cost then I will go for purchase route as with that option I can also create liability towards the entity from with I am getting the assets.
Hope this will help
Cheers
Nishant -
The application has a very large table with more than 5 billion data , using that table it is planned to have only some years data by doing this it is expected to reduce 20 to 25 % data reduced.
The problem here is as it is very large table we plan to get the required data in partition and plan to have this partition merged in to single partition then exchange partition to one table which is not having partition.
My question is how efficiently this partition merge is with huge data volume ?Hello,
I wonder why are you using Bulk Collect, when the same can be accomplished by a simple Merge statement.
Below can help:
MERGE INTO hotels tgt USING
(SELECT hotel_code,
hotel_name,
hotel_type,
hotel_address,
hotel_number,
hotel_facility
FROM bck_hotel
) src ON (src.hotel_code = tgt.hotel_code)
WHEN MATCHED THEN
UPDATE
SET tgt.hotel_name = src.hotel_name,
tgt.hotel_type = src.hotel_type,
tgt.hotel_address = src.hotel_address,
tgt.hotel_number = src.hotel_number,
tgt.hotel_facility = src.hotel_facility WHEN NOT MATCHED THEN
INSERT
tgt.hotel_code,
tgt.hotel_name,
tgt.hotel_type,
tgt.hotel_address,
tgt.hotel_number,
tgt.hotel_facility
VALUES
src.hotel_code,
src.hotel_name,
src.hotel_type,
src.hotel_address,
src.hotel_number,
src.hotel_facility
);Is it not true?
Regards,
P. -
Hi all,
I want to insert bulk data from external table to database ..Program compiled successfully bt after executing the data doesn't insert to database..plz help me..
External table:-bck_hotel
HOTEL_CODE NUMBER
HOTEL_NAME VARCHAR2(100)
HOTEL_TYPE VARCHAR2(100)
HOTEL_ADDRESS VARCHAR2(100)
HOTEL_NUMBER NUMBER
HOTEL_FACILITY VARCHAR2(100)
HOTEL1 VARCHAR2(100)
LATITUDE NUMBER
LONGITUDE NUMBER
Database table:-hotel
HOTEL_CODE NUMBER
HOTEL_NAME VARCHAR2(100)
HOTEL_TYPE VARCHAR2(100)
HOTEL_ADDRESS VARCHAR2(100)
HOTEL_NUMBER NUMBER
HOTEL_FACILITY VARCHAR2(100)
Code:
CURSOR cur_hotels IS
SELECT hotel_code, hotel_name, hotel_type, hotel_address, hotel_number,
hotel_facility
FROM bck_hotels;
BEGIN
OPEN cur_hotels;
LOOP
FETCH cur_hotels BULK COLLECT
INTO v_hotel_code, v_hotel_name, v_hotel_type, v_hotel_address, v_hotel_number, v_hotel_facility LIMIT 1000;
FORALL i IN 1 .. v_hotel_code.COUNT MERGE INTO hotels tgt USING (
SELECT v_hotel_code(i) AS hotel_code, v_hotel_name(i) AS hotel_name,
v_hotel_type(i) AS hotel_type,
v_hotel_address(i) AS hotel_address,
v_hotel_number(i) AS hotel_number,
v_hotel_facility(i) AS hotel_facility
FROM dual) src
ON (src.hotel_code = tgt.hotel_code)
WHEN MATCHED THEN UPDATE SET
tgt.hotel_name = src.hotel_name, tgt.hotel_type = src.hotel_type, tgt.hotel_address = src.hotel_address, tgt.hotel_number = src.hotel_number, tgt.hotel_facility = src.hotel_facility
WHEN NOT MATCHED THEN
INSERT(tgt.hotel_code, tgt.hotel_name, tgt.hotel_type, tgt.hotel_address, tgt.hotel_number, tgt.hotel_facility)
VALUES(src.hotel_code, src.hotel_name, src.hotel_type, src.hotel_address, src.hotel_number, src.hotel_facility);Hello,
I wonder why are you using Bulk Collect, when the same can be accomplished by a simple Merge statement.
Below can help:
MERGE INTO hotels tgt USING
(SELECT hotel_code,
hotel_name,
hotel_type,
hotel_address,
hotel_number,
hotel_facility
FROM bck_hotel
) src ON (src.hotel_code = tgt.hotel_code)
WHEN MATCHED THEN
UPDATE
SET tgt.hotel_name = src.hotel_name,
tgt.hotel_type = src.hotel_type,
tgt.hotel_address = src.hotel_address,
tgt.hotel_number = src.hotel_number,
tgt.hotel_facility = src.hotel_facility WHEN NOT MATCHED THEN
INSERT
tgt.hotel_code,
tgt.hotel_name,
tgt.hotel_type,
tgt.hotel_address,
tgt.hotel_number,
tgt.hotel_facility
VALUES
src.hotel_code,
src.hotel_name,
src.hotel_type,
src.hotel_address,
src.hotel_number,
src.hotel_facility
);Is it not true?
Regards,
P. -
Error while insert data using execute immediate in dynamic table in oracle
Error while insert data using execute immediate in dynamic table created in oracle 11g .
first the dynamic nested table (op_sample) was created using the executed immediate...
object is
CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
mark1 number,
mark2 number
t_sub_mark is a class of type sub_mark
CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
create table sam1(id number,name varchar2(30));
nested table is created below:
begin
EXECUTE IMMEDIATE ' create table '||op_sample||'
(id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
end;
now data from sam1 table and object (subject_obj) are inserted into the dynamic table
declare
subject_obj t_sub_mark;
begin
subject_obj:= t_sub_mark();
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
end;
and got the below error:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7
then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
execute immediate 'insert into '||dynam_table ||'
(SELECT887684 wrote:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically. -
Network based and a-gps, data use tests
i was trying to find this kind of info, but only found others asking.
i hope this is useful info for others, especially while roaming.
skip to the bottom for conclusion,
this is the process i took:
i called nokia tech support,
their phone support his horrible,
the people on the phone don't actually know anything, and have to look up everything you ask them.
they were the worst.
i emailed nokia tech support.
my message was:
"i would like to know the difference between assisted gps positioning, and network based positioning. these are 2 of the 4 options on my nokia e66 for positioning methods. i would like to know if network based positioning uses internet data from my service provider to obtain my gps position. i am especially concerned with this function while i'm roaming internationally, as i do not want to be charged for roaming data use."
in about half hour they responded w/ an answer, and then 45 min after that someone else responded w/ an answer.
the first response, minus the hello's etc. was:
"In response to your email, Assisted GPS and Network Based positioning methods generate costs related to data traffic so you will be charged for data use. Only "normal" GPS and Bluetooth GPS do not generate additional costs related to data traffic.
Normal GPS is quite slow and does not work indoors. Therefore, it is recommended to enable at least A-GPS to get a faster position outdoors.
Network based and Wi-Fi positioning also allow you to update your position inside buildings, but they cannot be used for navigation."
the 2nd response was:
"In response to your inquiry, the difference between Assisted GPS positioning (A-GPS) and Network based positioning is that, A-GPS uses satellites while Network based positioning is based on information of your cellular network environment. It allows you to update your position inside buildings, but they cannot be used for navigation. Both positioning methods generate costs related to data traffic (unless you have configured the device to use Wi-Fi connection to make the internet connection). The cost may vary while you are on roaming. Kindly contact the service provider for information about data transmission costs."
i can also respond w/ more questions, but instead did some tests, starting with sitting home, indoors, and eventualy moving to a window w/ lots of sky.
test 1:
i enabled:
integrated gps
network based
assisted gps
opened maps,
set maps to be offline,
set default internet access point to my home wlan network,
closed maps,
cleared all counters and the log on the phone's communication log.
opened maps
there is a pink circle around the area i may be in,
the icon that would show gps satellite strength, changes to show the cell phone antenna icon.
but the packet data counter is sending/receiving a total of around 3-8kb immediately, and over the course of time, it keeps adding up, every 1-2 minutes, and it is shown as packet data to/from the access point "at&t internet"
over the course of ten minutes, it's been about 43kb.
and i can tell on the phone's home screen that the packet data connection becomes active when it does.
the maps kb indicator still says 0.0kb, with a line through the double arrow packet data symbol.
test 2:
now i exited maps,
cleared the counters and logs
i turned off a-gps.
enabled only integrated gps and network based.
i open maps,
the same thing is happening as with the assisted gps on, except i connected to my home wlan once, in the middle of connecting to at&t internet 10 or so times.
everything else is happening the same.
test 3:
i exited maps,
cleared the counters and logs.
enabled only integrated gps.
i open maps, and there is no evidence of packet data connection, or wlan connection.
nothing is showing up in the logs or packet counters, and there is no pink circle around where i may be.
if i set maps to go online, w/ my wlan as the access point, or at&t internet, their respective icons show up on maps, as well as the phone's home screen.
the phone's log show respective connections are made but w/ 0.0kb, and the phone's packet counter, as well as the maps kb usage, say 0.0kb.
test 4:
set maps to offline, w/ my wlan as access point.
exited maps,
turned phone off for a bit to test gps from cold start.
turned on phone,
cleared counters/logs,
enabled only assisted gps and integrated gps.
open maps, there's no pink circle around where i may be, just the red dot of where it thought i last was.
there's about 4-5kb of data transfer,
then i bring the phone to the window where there's a lot of clear sky, and my location is found pretty fast.
i know that w/o assisted gps, w/ only integrated gps, it takes a while to get the gps signals.
i went back and forth to/from the window, and there was packet data use again only once more, not continuously like w/ network based positioning.
so to conclude my tests,
setting the maps to be offline, still uses a-gps and network based positioning.
network based uses a more data, continuously,
which is the opposite of what i thought, i thought a-gps would use more, so i was using network based on and a-gps off while in canada. whoops.
using assisted gps uses about 5-10kb, which, when roaming, according to at&t, they charge 1.95cents/kb.
might be worthwhile for getting a quick gps signal, nothing worse than waiting forever for it to connect.
the only way to be completely clear of data use is disable network based and assisted gps, or set the phone to offline mode.A-GPS: This uses information from cell network to get a rough idea of where you are. It then uses this information to figure out which satellites to look for. Result is a faster satellite lock. So A-GPS uses a few kB of data to get an initial position, but navigation is done using GPS satellites, which does not require ANY data connection.
Network based: This uses information from the cell network to plot the current position when GPS satellite signal is not available, ie indoors, in a tunnel, etc. Position info derived from the cell network is not as accurate as that from GPS satellites, but serves as a stopgap until GPS signal can be re-acquired. Network based positioning used your data connection EACH TIME the satellite lock is lost. So the amount of data used is dependent on the quality of access you have to the GPS satellites. If you don't lose the connection to the GPS satellites, then you won't use any data.
The ‘offline’ option within the Nokia Maps app only refers to street, POI, etc searches, NOT to A-GPS, Network based positioning or to connecting with the GPS satellites.
If you want to navigate without using ANY data connection, set A-GPS off AND set Network based positioning off AND set the Internet option in Nokia Maps to Offline. Do this and you will not use any of your data connection allowance when navigating. There is no need to put the phone into flight mode.
If I've helped you, you can thank me by clicking the green 'kudos' star on my post. Cheers. -
Can we load data using .xls in user define format(without using default template)
Hi All,
I'm new bee to FDM. Part of HFM support i use FDM to load flatfile data. Just has a bit more knowledge than end user.
Requirement is that i need to load data from MS excel to Planning application via FDM.
Previously application is in Excel(Macro driven) and upstream(data) is also in Excel(multi tab).
As of my knowledge data can be loaded from .csv file(Excel save as CSV) with single tab.
Could you please let me know possibilities to load data from .xls(.xlsx) to FDM.
Thanks in advance.If you want to load data using Excel, utilising FDM's out-of-the-box functionality you will have to use one of the templates supplied i.e. Excel Trial Balance or Excel Multi-load template.
Maybe you are looking for
-
I currently use an iPhone, an iPad, and a Mac computer for business. The three devices have Contacts Managers that sync with each other through both Google and through Mobile Me. Currently, this has created a mess of duplicate contacts. Please adv
-
User defined function in java for message mapping
I wrote the following user defined function in java for message mapping and mapped vendor with this. The aim of this function is to write a error file at defined path when i send empty Vendor value from File to RFC-Function module BAPI_PO_CREATE. The
-
Delete Functionality in manual tabular form
Hi everyone, I have created 2 tabular forms on the same page.everthing is working fine.Both the tabular form are able to insert and update.I am getting problem to implement the DELETE functionality in those tabular form. I inserted this code htmldb_i
-
Hi, My requirement is LSMW recording conversion process to bring all the data for Listing and Exclusion (VB01) from legacy system to SAP.There are 5 custom condition types for listing and exclusion and 20 scenarios. What I can do is create lsmw recor
-
hi, i am trying to achieve connection pooling in Tomcat , can anybody help what is the process ? which one is better either weblogic or tomcat?