Merging data without primary key
hiii,
I have 2 internal tables "it_final1" and "It_final_new" and i want to join both tables.
both have same fields like BUKRS,GJAHR,SAKNR.
for IT_FINAL1 i am using "BAPI_GL_GETGLACCPERIODBALANCES" FM to get data.
now i need to merge this.
Please explain ...
i am using below logic for that.
LOOP AT IT_FINAL_NEW .
IF sy-SUBRC = 0.
MOVE-CORRESPONDING IT_FINAL_NEW to IT_FINAL_DIS.
ENDIF.
read table it_final1 with key bukrs = it_final_new-bukrs
gjahr = it_final_new-gjahr.
move-corresponding it_final1 to it_final_dis.
APPEND IT_FINAL_DIS.
ENDLOOP.
Hi,
Please try the following,
*Looping at final_new which has all fields except gjahr
LOOP AT IT_FINAL_NEW .
*move wa to destination wa
MOVE-CORRESPONDING IT_FINAL_NEW to IT_FINAL_DIS.
*read internal table having balance value using common field
READ TABLE IT_FINAL1 WITH KEY BUKRS = IT_FINAL_NEW-BUKRS INTO WA.
if sy-subrc = 0.
*assign balance value to final destination balance field
IT_FINAL_DIS-balance = wa-balance.
*append the it
APPEND IT_FINAL_DIS.
*now u got the values from 2 internal tables
endif.
ENDLOOP.
Hope this solves your problem.
Regards,
Meera
Similar Messages
-
Merging data without set text framing - creating continuous, flowing/wrapping records
Hi.
Has anyone figured out a way to merge data without confining each record to set text frame size, hence creating a continuous flow or wrapping of records?
I need to put in an image, followed by a text description, so I can't merge all the text into one text box.
I can fit frame to text, then align with set gap, but this is way to time consuming and ineffective when creating a doc of several 100 pages.OysterBoy84 wrote:
Hi.
Has anyone figured out a way to merge data without confining each record to set text frame size, hence creating a continuous flow or wrapping of records?
I need to put in an image, followed by a text description, so I can't merge all the text into one text box.
I can fit frame to text, then align with set gap, but this is way to time consuming and ineffective when creating a doc of several 100 pages.
Searching Google for "indesign script combine all stories" without quotes turns up a number of links. There's a link to InDesign Secrets that describes a free script that may solve your problem.
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices -
In the case without primary key
Hi experts,
In the case without primary key, we can define a primary key?
In the case
Source: SQL Server 2000
Target: Oracle 11.2.0.3
When both the source and target does not have primary key.
Thank you
Edited by: 891982 on 21 ก.ค. 2555, 18:41 น.GGSCI (win-ms) 48> stats msdp
Sending STATS request to EXTRACT MSDP ...
Start of Statistics at 2012-07-21 12:40:28.
Output to E:\destgg\dirdat\dt:
Extracting from dbo.City to dbo.test:
*** Total statistics since 2012-07-21 12:36:30 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 2.00
and
GGSCI (win-ms) 48> stats msdp
Sending STATS request to EXTRACT MSDP ...
Start of Statistics at 2012-07-21 12:40:28.
Output to E:\destgg\dirdat\dt:
Extracting from dbo.City to example.test:
*** Total statistics since 2012-07-21 12:36:30 ***
Total inserts 2.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 2.00
Thank you -
I have a MacBook, an iMac and a iPhone 3Gs. Currently, I use MobileMe to sync my calendars and contacts over all three devices, but it's time to renew and frankly, it's a bit above my budget.
I know that if I want to merge things that I've entered into my iPhone, I can simply do a physical sync with the iMac (the computer that's holding all my iTunes) but I don't sync with the laptop/MacBook because 1) I don't want to confuse the phone and 2) it doesn't have any of my iTunes library. But I do need my contacts and my calendars to be merged, so I'm trying to figure out how to do that without having to physically type in any new data.
Any tips?OysterBoy84 wrote:
Hi.
Has anyone figured out a way to merge data without confining each record to set text frame size, hence creating a continuous flow or wrapping of records?
I need to put in an image, followed by a text description, so I can't merge all the text into one text box.
I can fit frame to text, then align with set gap, but this is way to time consuming and ineffective when creating a doc of several 100 pages.
Searching Google for "indesign script combine all stories" without quotes turns up a number of links. There's a link to InDesign Secrets that describes a free script that may solve your problem.
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices -
Hibernate without primary key?
i need to use hibernate for the table which do not have primary key. I found many explanation about there should not any table without primary key.
plz let me know for this case-
user table with unique pk userId
group table with unique pk groupId
and one more mapping table for them group-user table which will contain both of the primary keys. there should not have pk for that group-user table. but, with userId and groupId, the rows from that tables are unique.
I just wanna show a sample for this kind of case. plz let me know is there anyway to solve it?Read chapter 7.3 of the Hibernate Reference Documentation.
For future Hibernate questions, please checkout http://forums.hibernate.org
This has definitately nothing to do with JDBC, but with lack of effort to gently read documentations/manuals. -
Does ADF Business Components work well with tables without primary Key?
We have tables using unique index without primary key. Can ADF Business Components relate business objects based on the unique index columns of the tables?
Hi,
Regarding my question about the XML syntax for custom properties:
It turned out to be another problem in the Entity object definition that caused the JDeveloper error. Other entities let me add the custom property without problems. However should anybody ever need that XML syntax, here's how you add a custom property to an entity definition in the XML code:
<Attribute
Name="Id"
IsNotNull="true"
Precision="10"
Scale="0"
ColumnName="ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="TABLE"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="22"/>
</DesignTime>
<Properties>
<CustomProperties>
<Property
Name="SequenceName"
Value="SEQ1"/>
</CustomProperties>
</Properties>
</Attribute>Best regards,
Bart Kummel
Edited by: Bart Kummel on Sep 8, 2009 1:14 PM -
How to speed up fast refresh of materialized view without primary key
Thought I'd share this info, as I couldn't find anything on here to help me diagnose the issue:
I had a materialized view that was taking longer to perform a fast refresh than it took to perform a complete refresh. My mview had no primary key, as the base table had no primary key.
I created a trace file for the session and saw references to a column M_ROW$$ in my mview. Nowhere in the data dictionary could I find a reference to the m_row$$ column in my mview, but apparently it exists and is created automatically. After creating the index below, the fast refresh took 6 minutes to add 500k rows to the materialized view. (versus 4+ hours without the index) When I looked in the trace file, I noticed that for each row in the mview log, it first tries to update the mview with an UPDATE statement, then it performs an insert of the new data. Seems like it should be able to determine whether to perform an update or insert based on the DMLTYPE$$ column of the mview log. What was killing my performance was the UPDATE phase. Since I had no primary key on the mview, and no index on the m_row$$ column, the UPDATE phase was performing a full table scan of my mview for every row in the mview log. I was expecting it to be smart enough to only perform inserts, as the only transactions against the base table were inserts.
In summary: If you have a materialized view without a primary key, create an index on the m_row$$ column of the mview, even though no such column displays in the data dictionary.
ex:
CREATE MATERIALIZED VIEW mv_minidrr ...
CREATE INDEX pk_mv_minidrr ON mv_minidrr(m_row$$) ...Well, there indeed is a column called M_ROW$$
Your MLOG$_EMP is nothing but the materialized view log on the base table.
SQL> create materialized view log on emp with rowid ;
Materialized view log created.
SQL> create materialized view emp_mview refresh fast on demand with rowid as select * from emp ;
Materialized view created.
SQL> desc mlog$_emp
Name Null? Type
M_ROW$$ VARCHAR2(255)
SNAPTIME$$ DATE
DMLTYPE$$ VARCHAR2(1)
OLD_NEW$$ VARCHAR2(1)
CHANGE_VECTOR$$ RAW(255)
SQL> select table_name, column_name from user_tab_columns where column_name = 'M_ROW$$' ;
TABLE_NAME COLUMN_NAME
MLOG$_EMP M_ROW$$
1 row selected.
SQL> -
Need to create a new row in table with same data as Primary key, but new PK
Hello Gurus ,
I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
Any ideas of how it can be done without much complication?
Thanks in advance for your reply.
Reards,
Swapneel Kaleuser9970447 wrote:
Hello Gurus ,
I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
Any ideas of how it can be done without much complication?
Thanks in advance for your reply.
Reards,
Swapneel Kalesomething like
insert into mytable values ('literal for new pk',
select non-pk-1,
non-pk-2,
non-pk-n
from mytable
where pk-col = 'literal for existing pk') -
Hi,
Can we implement Change Data Capture in Oracle 10g without having Primary Key at the source level.
With Regards,
KattaHi;
Can we implement Change Data Capture in Oracle 10g without having Primary Key at the source level.AFAIK yes; Please see
http://docs.oracle.com/cd/B13789_01/server.101/b10736/cdc.htm#i1025409
http://en.wikipedia.org/wiki/Change_data_capture
Regard
Helios -
Creating a snapshot without primary keys
Hi,
I would like to create a snapshot for a table that does not have a primary key. I've read the thread
"Re: creating snapshots without a primary key??"
from Mar 24, 2003, which seems to indicate that this is allowed if the snapshot is not updatable. However, even when I disable the "Updatable?" option, I still get the following error:
WTG-20502 Packaging Wizard Failed. 500
CONS-10032: Publication item: WTGPI_10012 cannot
be updatable, primary keys for xyz.abc not found.
BTW, the Oracle9i Lite Developer's Guide for Windows 32 is really thin in this area. In particular, the description of the Updatable feature is the following:
This check box defines the snapshot to be created
as updatable.
That description has a lot of unmet potential.
Thanks,
TimHello,
If you create a snapshot that has no primary key, you have to check the option "complete refresh".
Oracle uses the primary key to track changes for the "partial refresh" option (only send changes back and forth).
-Antti Virkkunen, www.vilant.com -
Identity without Primary Key or with....which is the difference
Guys, one question: which is the main difference between using Identity and using either Identity and Primary_Key? It looks a stupid question (and maybe it is) but...maybe is not so stupid.
Primary Key is a logical implemention which creates behind the scene unique clustered index (physical implementation)
BTW, if you use an INDENTITY property and do not have PK on this you may end up with duplicates , ans also someone my reseed the values...
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
Using identity you may end up with duplicates??!! -
Bulk REST API v2 Activity Data Export "Primary Key"?
After reading the documentation, I expected that ActivityId would be the primary key when exporting activity data -- e.g. that there would be no duplicate ActivityIds in the items data returned by the export. However, I am seeing exported data where I have multiple activity datums that are identical except they have different CampgainIds
Is ActivityId,CampaignId the primary key for activity data? If not, what is?
When will activity data with the same ActivityId have different fields (excluding CampaignId)?
Thanks!
1086203Hi Chris,
I met the same problem as pod
It happens when I tried to load all historical activities, and one sample is same activityId was given to 2 different types (one is EmailOpen, the other is FormSubmit) that generated in year 2013
Before full loading, I ever did testing for my job, extracting the activity records from Nov 2014, and there is not unique ID issue
Seems Eloqua fixed this problem before Nov 2014, right?
So if I start to load Activity generated since 2015, there will not be PK problem, or else, I have to use ActivityId + ActivityType as compound PK for historical data
Please confirm and advise
Waiting for your feedback
Thanks~ -
Dropping data from primary Key.
Hi ,
I am deleting data from foreign key and it is dropping 1900 records in 1 sec.
Query 1
delete from abbr_pay_dtl_stag where pif_file_id=118bur after that when I drop records from primary key, it takes more then 2 minutes.
Query 2
delete from line_stage e where bip_pif_file_id =118When I have looked into the explain plan, Query 1 was using Full table scan and Query 2 is using Range Index Scan so I have put hint in Query 2 to use Full table scan, but it is still the same.
Please advise.I haven't understood which is the master table and which is the detail table for you haven't given any indication of how the foreign key is created.
Still, when you have foreign keys, whenever you delete from the master table, the database has to check the existence of corresponding detail records for any master record deleted, which definitely inposes scanning the index used for the foreign key.
For best performance, you may disable the foreign key constraint, and then enable it, eventually enable novalidate. Still, disabling a constraint would be a bad thing if you are performing those deletes on a system that processes several transactions at the same time, cause one of the other transactions may possibly insert junk in the detail table. -
Create a materized view without primary key constraint on the base table?
Hi
I tried to create a materized view but I got this error:
SQL> CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
START WITH
to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
NEXT
sysdate + 1
AS
select * from TABLE1@remote_db
SQL> /
CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
ERROR at line 1:
ORA-12014: table 'TABLE1' does not contain a primary key constraint.
TABLE1 in remote_db doesn't have a primary key constraint. Is there anyway that I can create a materized view on a base table which doesn't have a primary key constraint?
Thanks
LizHi,
Thanks for your helpful info. I created a materialized view in the source db with rowid:
SQL> CREATE MATERIALIZED VIEW log on TABLE1 with rowid;
Materialized view log created.
Then I created a MV on the target DB:
CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
REFRESH FAST
with rowid
START WITH
to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
NEXT
sysdate + 1
AS
select * from TABLE1@remote_db
SQL> /
CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
ERROR at line 1:
ORA-12018: following error encountered during code generation for
"my_schema"."TABLE1_MV"
ORA-00942: table or view does not exist
TABLE1 exists in remote_db:
SQL> select count(*) from TABLE1@remote_db;
COUNT(*)
9034459
Any clue what is wrong?
Thanks
Liz -
Creating a New Row Using an ADF Iterator Binding without primary key value
I dropped a Create action onto a DataAction which forwards to a UIX entry page which contains an enabled Commit button. Part of the primary key value is held in a session bean and it is also current in another view on the model side, but I am unable to access this value to set the EntityImpl primary key attribute.
Upon submission the following error message is returned from the model:
ORA-01400: cannot insert NULL into ("GTR"."EMPLOYMENT"."ACCOUNT")
I would like to accomplish this with databinding and not create a custom create method on the application model. Is there a way to update the binding value for the new row in cache before the submission? Any advice would be welcome.I should add that I want the user to enter every attribute value, except for the account number. It must be possible to create a new row and have the account number supplied to the bindings another way.
Maybe you are looking for
-
Logo printed in a reversed manner
Hi, I'm facing a problem while printing a smartform. I have a logo in my smartform which is printed in an inverse manner while printing it in a laser printer. However, in some m/c's this logo is printed properly. Is any setting required somewhere to
-
Conditional Build Tags + Image Map + Popup Doesn't Work
For RH build X.5.0.2, I have images in some topics and a conditional build tag is applied to those images. The images have image maps drawn on them and those image maps launch popup topics. Everything worked fine until I added the conditional build t
-
How to generating the template from apex ?
I have created a quick application that contains names of employees and thier skillset. I am exploring the possibilities of generating a template containing the skills of the individual selected. In other words, if I have a resume template of "Oracle
-
Opening Telnet with a web browser
Hi, I don't know if I'm posting this thread in the right forum, I hope I am. I want to have a web page and, when the user selects a link, I want a telnet prompt to be opened in the user's computer. Not a embeded one, but the actual telnet program the
-
PD infotypes, how to make a selection?
Hi, I have a problem with the infotypes of PD. In my program, the user can select infotypes. I have used PA / PB / PD. I have all the infotypes of PA and all the infotypes of PB. I also have all the infotypes of PD, but, my boss asked me to make a su