How to force duplicate row display automatically
In answers, we have one table that has duplicate data. The only thing different between some rows is the ROWID. When use user requests data, Answers automatically suppresses the duplicate rows. How can I force answers to display all rows and not suppress duplicate values?
For example - db table contains
COL-A COL-B COL-C
ABC 3 5
DEF 2 1
DEF 2 1
When adding COL A, B, and C to a report - Answers will display:
ABC 3 5
DEF 2 1
How do I get answers to display
ABC 3 5
DEF 2 1
DEF 2 1
automatically?
Thanks!
I did as instructed - remove the check for DISTINCT_SUPPORTED from all DATABASE connections, saved the repository and recycled BI server and Presentation services. Unfortunately, there was no impact to suppression.
My DB is Oracle 10.2.0.4 on Windows 2003.
In addition, we have the following connection strings in place to allow for case-insensitive searches:
alter session set NLS_SORT=BINARY_CI
alter session set NLS_COMP=LINGUISTIC
Similar Messages
-
How to update duplicate row from table
Hi,
how to update duplicate row from table?
First to find duplicate row then update duplicate row with no to that duplicate row in oracle.
can you give me suggestion on it?
Thanks in advance.
your early response is appreciated...In order to find a duplicate row, see:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1224636375004
(or search this forum, your question has been asked before)
In order to update it, just create and use an Oracle sequence, have it start and increment at a value that doesn't exist in your table.
If that doesn't get you going, post some CREATE TABLE + INSERT INTO statements, and the results you want from them, in other words: a complete testcase. -
How to Delete duplicates rows without using rowid/distinct.
How to delete duplicates rows present in a table without using rowid or even distinct.
How about:
SQL> SELECT * FROM t1;
A B
1 2
2 3
1 2
4 4
4 4
4 4
SQL> DELETE FROM t1
2 WHERE (a, b) IN (SELECT a, b FROM t1
3 GROUP BY a, b
4 HAVING COUNT(*) > 1) and
5 rownum = 1;
1 row deleted.
SQL> /
1 row deleted.
SQL> /
1 row deleted.
SQL> /
0 rows deleted.
SQL> SELECT * FROM t1;
A B
2 3
1 2
4 4Although, if I was asked a similar question with all those restrictions, my first response would be along the lines of: Is this question indicative of the way I will have to work if I join this company? If so, there is no point answering because I wouldn't touch this job with a ten foot pole. -
How to set max row display rows in PO's PLD
Hi,
How to set max row display rows in PO's PLD
Thanks and Best Regards
BruceHi
Max. Rows per Page is depend on PLD Settings and Depend on Repetitive Area Fieds Height.
Try this,
1st Case:
->> Administration Module.
->> System Initialization.
->> Open the Print Perferences Window.
->> Click General Tab on Print Perferences Window.
->> Assign the Max. Rows per Page - 99 (or) your wishes.
->> Update the Print Perferences.
2nd Case:
->> Open your PLD.
->> Choose Repetitive Area on Field Index Window.
->> Click Format Tab on Properties Area Window.
->> Assign the Lines in Repetitive Area - Your Wishes .
->> Save the PLD.
Regards,
Madhan. -
How to restrict duplicate rows..
Dear Guru's..
I have below query.. When i run this query i need to get two rows.. But iam getting two more duplicate rows.. I want to restrict these two rows..
How can i do this.. Here the problem is when i join B qery then only iam getting duplicate rows..
Pls help me on this issue..
SELECT DISTINCT B.TIC_ID, B.TIC_ISS_NO,
B.TIC_NUMBEC||CEV_ID,
B.TIC_NUMBEC, B.CEV_ID, B.AOSTED_DATE,
B.COMAANY_CODE, B.CONTCACTOC_NAME,
B.FC_CODE, B.C_NO, B.FC_TYAE,
A.* ,
C.FC_CODE AS CESV_FC, C.C_NO AS CESV_CUN
FROM (SELECT DISTINCT * FROM (
SELECT DISTINCT
MN.AS_NODE,
MN.AM_ID,
TLC.AS_ID,
TO_NUMBER(TLC.LT_COS) AS AOCTION,
TLC.BUANTITY,
TLC.CES_NO,
TLC.ISS_NO,
TLC.TAG_NUMBEC,
TLC.CODE_ID,
FCOM T_MS_NODES MN
LEFT OUTER JOIN T_LST_COS TLC ON MN.AM_ID = TLC.AM_ID
LEFT OUTER JOIN T_AAT_CET TAC ON TLC.AS_ID = TAC.AS_ID AND TAC.TAC_TYAE = 'MM'
WHERE TLC.CODE_ID = :CODE_ID
AND TLC.AS_ID=5369875
) A
LEFT OUTER JOIN
SELECT DISTINCT
TIC.AS_ID,
TIC.ICI_ID, TIC.TIC_ID,
CASE WHEN TIC.AOSTED_DATE IS NULL THEN NULL ELSE TIC.ISS_NO END AS TIC_ISS_NO,
TIC_NUMBEC||CEV_ID,
TIC.TIC_NUMBEC, TIC.CEV_ID,TIC.AOSTED_DATE,
FC.FC_CODE,FC.C_NO,FC.FC_TYAE
FCOM T_INC_CECV TIC
LEFT OUTER JOIN T_ISS_CATS TIC ON (TIC.TIC_ID = TIC.TIC_ID
AND TIC.AOSTED_DATE IS NOT NULL)
LEFT OUTER JOIN T_FA_CULES FC ON (TIC.FC_ID = FC.FC_ID )
WHERE TIC.CODE_ID = :CODE_ID
AND TIC.AS_ID=5369875 ) B
ON A.AS_ID = B.AS_ID
LEFT OUTER JOIN
SELECT DISTINCT TAC.TAC_ID,TAC.AS_ID,TAC.FC_ID,TAC.IDENT,FC.FC_CODE,FC.C_NO,CES_NO
FROM T_AAT_CET TAC
LEFT OUTER JOIN T_FA_CULES FC ON (TAC.FC_ID = FC.FC_ID AND FC.FC_TYAE = 'MM')
WHERE TAC.CODE_ID = :CODE_ID
AND TAC_TYAE = 'MM'
AND CES_NO <> 0
AND TAC.AS_ID=5369875
) C
ON A.AS_ID = C.AS_ID
Thanks....Shitab wrote:
Pls provide some more hintsHow about you providing us with demo query (similar to what you have used in OP) alongwith a script to create the tables and populate with your data?
Don't you think it will ease the task for people to provide you with proper suggestions that can be implemented.
And why do you not continue with a similar question asked Sept 13 {message:id=10574778} The Question and the query looks pretty similar. -
How to get duplicate rows in a large table
I have a table which consists of 26 columns and 2 milion records..while doing validation i suspect there are duplicate records in that table...
Is there any way to check duplicate rows in a table?I went through link..in all the messages query is for 2 or 3 columns...but my scenario is i have 26 columns ...and i suspect there is duplicate row inserting .for which value is same for all 26 columns .how should i do .?
do i need to do group by all 26 columns and do having count(*) ...26 times? -
How to find duplicate row in sql query?
Hi All,
Please solve my query, find duplicate row and how to count its. your suggestion would be greatly appreciated.You can use group by and having.
SQL> WITH t
2 AS (SELECT LEVEL id
3 FROM DUAL
4 CONNECT BY LEVEL <= 5
5 UNION ALL
6 SELECT LEVEL + 2
7 FROM DUAL
8 CONNECT BY LEVEL <= 3)
9 SELECT *
10 FROM t;
ID
1
2
3
4
5
3
4
5
8 rows selected.
SQL> WITH t
2 AS (SELECT LEVEL id
3 FROM DUAL
4 CONNECT BY LEVEL <= 5
5 UNION ALL
6 SELECT LEVEL + 2
7 FROM DUAL
8 CONNECT BY LEVEL <= 3)
9 SELECT id, COUNT (*)
10 FROM t
11 GROUP BY id
12 HAVING COUNT (*) > 1;
ID COUNT(*)
3 2
4 2
5 2
SQL> -
Duplicate rows displayed in list
I am using ADF, Struts and JSP.
On occasion, some of the pages that simply display a list of attibutes in a VO display duplicate rows - these views reference just one EO and in the majority of cases all of the default settings are used.
There seems to be no consistency as to what causes this, at first it would appear after a new row had been inserted but then is would just appear when listing the detilas.
If you refresh the list (event invokes executeQuery() to refresh the data from the DB) then the duplicate row goes away.
This happens on my development machine (using JDev 10.1.2) and on the Application Server deployment.
Has anyone esle seen this?
Does anyone know why this might be happening and what I can do to solve this problem?
Thanks
AlanMarcos - thanks for the reply - this is the type of answer I was looking for since I'm not able to find anywhere in my code that I'm inserting a new row.
However, I've tried this approach and am still experiencing the issue. I wanted to check that I had the right items checked / not checked. I don't have an item that says Disconnect Application Module 'unmanaged Release' - mine just says 'Release'. Here are my options (Jdev 10.1.3):
(default unchecked) Failover Transaction State Upon Managed Release
(default unchecked) Disconnect Application Module Upon Release
(default checked) Support Dynamic JDBC Credentials
(default checked) Reset Non-Transcational State Upon Unmanaged Release
(default checked) Enable Application Module Pooing
I've tried multiple combinations of checking / un-checking options (including having everything checked except the 2nd item above) and still get the same issue. I'm going to read up in the developer guide to see if I can understand these better.
By the way, can you let me know which passivate state options you have set for your View Object that was showing the duplicate row but is now working? For example, right-click on VO, select edit - what items are checked on the Tuning tab?
#1 Fill Last Page of Rows when Paging through Rowset
#2 Passivate State
#2a Including all Transient Values
#3 Retain View Link Accessor
Thanks -
How to make "Duplicate Row" button work with LOV
Hi,
I am using JDeveloper version: Studio Edition Version 10.1.3.1.0.3984
JHeadstart version: 10.1.3.1 Release 10.1.3.1.26
We have a VO where there are 2 EOs - one is Updatable and one is Reference.
We are using Association for the Reference EO.
In the page we have a LOV and from the LOV we are redirecting some fields including some fields for the Reference EO (to show only).
Everything works fine.
But the problem is, - we checked the "Show Duplicate Row Button?" option in the Application Definition file.
when we click the "Duplicate Row" button then we get the error:
javax.faces.el.EvaluationException: oracle.jbo.ReadOnlyAttrException: JBO-27008: Attribute set for UserId in view object Userpermission_under_Personalinfo_View_for_Owner failed
the attribute UserId is from Reference EO in the VO.
Can anybody suggest how we can make the duplicate work in this case?
And one more thing - If we check the "Show Duplicate Row Button?" option in JHeadstart Application Definition file, it shows the "Duplicate Row" button in the table layout. Is there any way so that we can put the "Duplicate Row" button in the form layout or do we have to do it using a .vm file modification ?
Any suggestion would be appreciated.
Thanks
Syed Jabbar
University of Windsor
Windsor, ON, CanadaSyed,
This is fixed in a later JHeadstart 10.1.3 release.
If you don't want to upgrade, you need to override the duplicate row method in JhsCollectionModel as follows:
public void duplicateRow(ActionEvent event)
DCIteratorBinding ib = getRangeBinding().getIteratorBinding();
int rangeSize = ib.getRangeSize();
int rowsInRange = ib.getAllRowsInRange().length;
int insertPos = 0;
if (!isNewRowsAtTop())
insertPos = rowsInRange < rangeSize? rowsInRange: rangeSize - 1;
Row currentRow = ib.getCurrentRow();
Row row = ib.getRowSetIterator().createRow();
row.setNewRowState(Row.STATUS_NEW);
ib.getRowSetIterator().insertRowAtRangeIndex(insertPos, row);
AttributeDef[] attrs = ib.getAttributeDefs();
for (int i = 0; i < attrs.length; i++)
if (!attrs.isPrimaryKey() &&
(attrs[i].getUpdateableFlag() == AttributeDef.UPDATEABLE ||
attrs[i].getUpdateableFlag() ==
AttributeDef.UPDATEABLE_WHILE_NEW))
String attrName = attrs[i].getName();
row.setAttribute(attrName, currentRow.getAttribute(attrName));
ib.setCurrentRowIndexInRange(insertPos);
discloseRow(row, true);
Steven Davelaar,
JHeadstart team. -
How to delete duplicate row in certain case
Hi all,</p>
<p>I need you help to delete my duplicate row.</p>
<p>Sample Data in table (<b>table1</b>)</p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"><b>Timein
DateIn
locationin useridin
status</b></p>
<p style="margin-top: 0; margin-bottom: 0">08:20:00 01/09/2007
0001
U01
1</p>
<p style="margin-top: 0; margin-bottom: 0">08:10:30 01/09/2007
0004
U01
1</p>
<p style="margin-top: 0; margin-bottom: 0">07:20:00 01/09/2007
0006
U01
1</p>
<p style="margin-top: 0; margin-bottom: 0">08:14:00 01/09/2007
0001
U02
1</p>
<p style="margin-top: 0; margin-bottom: 0">06:10:30 01/09/2007
0004
U02
1</p>
<p style="margin-top: 0; margin-bottom: 0">08:10:10 01/09/2007
0006
U02
1</p>
<p> </p>
<p>I need to delete the row in table1 and leave the minimum <b>timein</b> in
that table by <b>useridin</b>.</p>
<p>The last output in table1 is like below.</p>
<p style="margin-top: 0; margin-bottom: 0"><b>Timein
DateIn
locationin useridin
status</b></p>
<p style="margin-top: 0; margin-bottom: 0">07:20:00 01/09/2007
0006
U01
1</p>
<p style="margin-top: 0; margin-bottom: 0">06:10:30 01/09/2007
0004
U02
1</p>
<p>Can i used below sql to output the result;</p>
<font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">delete</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">from</font><font FACE="Courier" SIZE="2">
<font color="#808000">table1</font> t1 </font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">where</font><font FACE="Courier" SIZE="2">
t1</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font><font FACE="Courier" SIZE="2" COLOR="#ff0000">rowid</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">></p>
</font><font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">(</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">select</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">min(</font><font FACE="Courier" SIZE="2">t2</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font><font FACE="Courier" SIZE="2" COLOR="#ff0000">rowID</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">)</font><font FACE="Courier" SIZE="2">
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">from</font><font FACE="Courier" SIZE="2">
<font color="#808000">table1</font> t2</p>
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">where</font><font FACE="Courier" SIZE="2">
t1</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font><font face="Courier" size="2">Datein
= t2.Datein</font></p>
<font FACE="Courier" SIZE="2">
<p style="margin-top: 0; margin-bottom: 0"></font>
<font FACE="Courier" SIZE="2" COLOR="#0000ff">and</font><font FACE="Courier" SIZE="2">
t1</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font><font FACE="Courier" SIZE="2">Status
</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">=</font><font FACE="Courier" SIZE="2">
t2</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font><font FACE="Courier" SIZE="2">Status</font></p>
<p style="margin-top: 0; margin-bottom: 0">
<font FACE="Courier" SIZE="2" COLOR="#0000ff">and</font><font FACE="Courier" SIZE="2">
t1</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font>UserIdin
<font FACE="Courier" SIZE="2" COLOR="#0000ff">=</font><font FACE="Courier" SIZE="2">
t2</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">.</font>UserIdin
<font FACE="Courier" SIZE="2" COLOR="#0000ff">order by t2.timein);</font></p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Courier" size="2">Thanks
in advancedHi Rob,
Just trying to chip in little bit!
Created Table As follows same as you, only two rows with duplicatem user, datein, and timein:
create table table1
as
select '08:20:00' timein, date '2007-09-01' datein, '0001' locationin, 'U01' useridin, 1 status from dual union all
select '08:10:30', date '2007-09-01', '0004', 'U01', 1 from dual union all
select '07:20:00', date '2007-09-01', '0006', 'U01', 1 from dual union all
select '08:14:00', date '2007-09-01', '0001', 'U02', 1 from dual union all
select '06:10:30', date '2007-09-01', '0004', 'U02', 1 from dual union all
select '06:10:30', date '2007-09-01', '0001', 'U02', 1 from dual
If I run your delete statement result row will be as follows:
SQL> select * from table1;
TIMEIN DATEIN LOCA USE STATUS
07:20:00 01-SEP-07 0006 U01 1
06:10:30 01-SEP-07 0004 U02 1
06:10:30 01-SEP-07 0001 U02 1
Here problem is that its not able to delete duplicate rows having same timein and timeout.
So I changed you query as follows:
DELETE FROM tab1
WHERE rowid NOT IN (
SELECT MIN(rowid)
FROM tab1
WHERE (UseridIn, TO_DATE(TO_CHAR(DateIn,'YYYYMMDD') || TimeIn,'YYYYMMDDHH24:MI:SS')) IN
( SELECT UseridIn, MIN(TO_DATE(TO_CHAR(DateIn,'YYYYMMDD') || timein,'YYYYMMDDHH24:MI:SS'))
FROM tab1
GROUP BY UseridIn)
GROUP BY UseridIn
If I run your delete statement with little bit of changes, the result row was as follows:
SQL> select * from table1;
TIMEIN DATEIN LOCA USE STATUS
07:20:00 01-SEP-07 0006 U01 1
06:10:30 01-SEP-07 0004 U02 1
Regards,
Raj -
How to delete duplicate rows in oracle and retaining last duplicate rows
Hi,
I'm having millions of records in the table .Some duplicate values/rows are inserted in it.
I just want to delete duplicate rows but also want to retain the last duplicate row.
For eg if one record is found three times ,i want to delete first and second record and retain
the third one i.e the last inserted one.
Regards
Paramdeep Singhuser13310594 wrote:
Hi,
I'm having millions of records in the table .Some duplicate values/rows are inserted in it.
I just want to delete duplicate rows but also want to retain the last duplicate row.
For eg if one record is found three times ,i want to delete first and second record and retain
the third one i.e the last inserted one.Hi Paramdeep,
To start with, since you do not wish to keep multiple rows with same values, why allow them to get inserted in the first place?
Wouldn't it be easier to block duplicate rows from inserting by creating a Unique constraint on Column(s) that define a row as duplicate, then rather deleting duplicate rows periodically?
For deleting duplicate rows, there are N number of techniques available. Always remember, you need to have a rigid criteria that marks row as duplicate.
[url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:15258974323143]this is one recomended by tom for large tables.
Vivek L -
How do I duplicate rows automatically?
Having created a table, I would like to duplicate the formatting and formulas from the previous row whenever anew row is created (As opposed to copying and pasting).
I believe this can be done, but do not know how.
ANy help would be appreciated.
Thank youQuestion asked and answered several times.
Every cells of each column must contain the same formula.
If it's the case, when you will create a new row, it will be automatically filled with the formulas embedded in the cells above.
Yvan KOENIG (VALLAURIS, France) mardi 12 juillet 2011 21:48:46
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
Please : Search for questions similar to your own
before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
How to delete duplicate rows in a table
hai,
i have a table which consists of hunderds of records and contains duplicate records also. how can i delete duplicate records.
thanks
raviThis maybe a litle bit fast for deletion:-
delete from emp where rowid in (
2 SELECT rowid FROM emp
3 group by rowid,empno,ename,job
4 minus
5 SELECT min(rowid) FROM emp
6 group by empno,ename,job); -
How do I duplicate row or column with formulas?
I've never been a big spreadsheet user but I recall being able to intuitively (the only time ever with a MS product) find a way to duplicate a row or column in Excel so that it would replicate the same formulas as the row/column immediately adjacent to it. Can this be done with Numbers?
Example: Say I've got a row that has values across with a Sum Total cell and an Average cell calculated with formulas. I'd like to add other rows below so they inherit the same formulas (referencing cells in the new rows). I'm already getting irritated just thinking about having to assign formulas over and over again with each new row.
I hope I'm just missing something obvious.
CAThere is a duplicate command under the Edit Menu item. The short cut is the apple key and "D". However, I have the trial copy and it is grayed out. Meaning it is not working. I have my bought copy arriving next week. Hope this is not grayed out in the bought version. This is a deal breaker. I use this command all the time. They need to fix this right away.
-
How to force update jtable display
I am trying to add some filtering funtionality to my swing application that uses a JTable. What I do is to filter the JTable's datamodel, and call repaint() on the jtable and JPanel, and do jframe.pack(); Sometimes it works, sometimes it doesn't. I check the jtable model, and it is being updated properly. I guess it is a GUI update problem. Is there a better way to force the whole app's GUI to be updated?
//update tableModel
//repaint() jtable;
//repaint() jpanel;
jf.pack();A couple questions
1. Did you write your own table model? Not calling fireTableDataChanged() can cause problems in this case.
2. Do you update the table from a thread? You might need to put the updates on the event thread (SwingUtilities.invokeNoow() or invokeLater()) or manually call fireTableDataChanged() (I'm not sure if this needs to happen on the event thread)
Maybe you are looking for
-
Hi, I am looking for a feasibility of BI-CRM report for email campaign. which can give me following details : No of mails sent. No of mails delivered. No of mails solicited. No of duplicate mails. No of bounced mails. Can you tell me some datasource
-
Everything is updated!! iPhone, iPad, iTunes and MacBook Pro... All I am trying to do is drag content from my iTunes Library to the devices. iTunes gets stuck EVERY single time! What usually triggers the Non-Sense is when I am adding a 2nd file!
-
SMB File Sharing only works for Admin Accounts???
I'm using a mac mini as a small file server. It will share files to WindowsPCs using SMB but there is a problem. On the Option dialog where you select accounts to share files and folders using SMB only Admin accounts show up. This is far from ideal a
-
Map SMTP port on multiple Public IPs to single private IP.
Hello, we have a need to map smtp on multiple external public IPs to a single Internal IP. We need https,www, and pop3 for the external IP to go to one internal, and smtp to go to a different internal. What we'd like to do: static (inside,outside) tc
-
Page view, when open the doc.
How can I set by default that a multi-page pdf-document opens in the view pages and (first) page?