Find double entries in the Table.

Hello!

Suppose I have a table in which double values entered mistakely, now I want to select/Search these entries.
e.g. student with values double rollno and year as rollno etc. table 1 and 1 and year like 2010, etc.
now, please tell me select query that displays all of the double values with the same rollno and year.

Thank you and best regards!

Kami_Lily wrote:
Hello!

Suppose I have a table in which double values entered mistakely, now I want to select/Search these entries.
e.g. student with values double rollno and year as rollno etc. table 1 and 1 and year like 2010, etc.
now, please tell me select query that displays all of the double values with the same rollno and year.

Thank you best regards &!

You can use the analytical function of the COUNTY.

with student_tbl
as
(
select rollno, year, count(*) over(partition by rollno, year) cnt
  from student
)
select rollno, year
  from student_tbl
 where cnt > 1

Or just the count aggreagate function

select rollno, year
  from student
 group by rollno, year
having count(*) > 1

Tags: Database

Similar Questions

  • Can I hide a book or entry in the table of contents, based on a parameter?

    Hi all. I am currently using RH 11.  Is there a way in which I can hide a book or entry in the table of contents, based on a parameter passed in the URL?

    Rh10 introduced dynamic content to the user, otherwise known as categories of content-centric. In an SSL, you can create different outputs. The idea is that aid is open with a drop down menu where the user can select a category. If you look in the output folder, there is a folder for each category and you can open this assistance to a specific category. However, the user can then select other categories.

    The method is described in the HR visit to my site and the projects in the sample have a SSL showing the method.

    To open a specific category, point you to the start page for the category, the name of the category. So the TypeA category can be open from TypeA.htm.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • How to find null values in the table

    Hi experts,

    my version is oracledb10g:

    I am doubted simple.

    for example:

    create table ex1 (e varchar2 (20));

    Insert ex1 (null).

    insert into ex1 (e)

    number of will be: 2

    I can easily find the value "e".

    so my question is:

    How can I find null values in the table and I want to remove the null values from the table.

    ADF 7 wrote:
    Hi experts,

    my version is oracledb10g:

    I am doubted simple.

    for example:

    create table ex1 (e varchar2 (20));

    Insert ex1 (null).

    insert into ex1 (e)

    number of will be: 2

    It depends on what you expect. If you issue count (*) you ask Oracle "how many lines there. If you issue a County () you ask Oracle 'how non null values for are there. "

    ADF 7 wrote:

    I can easily find the value "e".

    so my question is:

    How can I find null values in the table and I want to remove the null values from the table.

    delete from 
    where  is null;
    

    Ideally you would simply place a NOT NULL constraint on the column in question, thus prohibiting NULL values into the system (assuming that your business needs, it is that the column MUST always have a value).

  • Find maximum in the entries in the table

    Dear all,

    I would like to find and replace the highest value among a set of values being interviewed.  Only, I managed to find the highest value, if I compare the new value with the old value by using a shift with a single value (element) register only.

    Currently, if I deal with entries in table instead of a single value, how can I do?

    Example:

    New entry 1 = [5

    4

    3

    2

    1]

    Entry 2 = [4

    3

    5

    3

    [3]

    The answer should therefore x = 5

    4

    5

    3

    [3]

    So if another new table of entry has higher values x, the answer will change again. The values are compared against the row of each element in the table. The final answer should be in a table.

    Can anyone help this? Thank you very much!

  • Schedule of blackBerry Smartphones - sync results in double entries on the device

    When I sync with Desktop Manager, calendar entries in the device are not recognized, and as a result, it attempts to load all meetings to Outlook again.  How to eliminate double entry?

    The fastest solution is to WIPE the device and then re-sync.  Of course if you also have a wireless sync turned on and then continue to use the Desktop Manager software via USB, that cause you too might some problems.  Unfortunately, that's the quickest short to delete one by one in your email contacts software.  It would be well if there was a VB Script there would be delete duplicate, but there still should be very clever, because many users may have duplicate entries in it contacts.

  • Conversion tables and the entries in the table

    I'm working on a conversion table for our former products of FM unstructured to DITA. I understand the basic concepts, but I'm having a problem with the table cells.

    I have P:CellBody in my conversion table, in the first row, mapped at the entrance with a cellbody qualifier.

    I also TC mapped at the entrance.

    The same applies to P:CellHeading, and Th.

    Therefore, my text is wrapped in two input elements. The context tab to show the item says:

    entry

    entry

    line

    TBODY

    tgroup

    Table

    body

    NoName

    NoName

    I'm sure it should be the same as above with the input only one element (and of course with the fixed NoNames which I think I know how to do; I just have not had here yet).

    How to avoid get my cells wrapped in two input elements?

    Thanks in advance,

    Marsha

    Marsha,

    I don't understand what you're trying to do, or what is exactly in your conversion table. Be aware, however, that FrameMaker will always create elements for the basic elements that occur in your tables. The table of conversion that you give little control of how these items will be marked, but not question whether elements will exist.

    If your conversion table contains lines such as:

    P:CellBody entry cellbody
    TC: entry

    You will get the nested input elements. External is the cell of the table itself and inside is the paragraph. FrameMaker does not have a valid document to use the tag of the element itself to a cell and a container, so aside from the results is not what you wanted, they are not correct in FrameMaker.

    If your table cells contain simple paragraphs and you don't want the elements for cells and paragraphs, your conversion table didn't even need to mention paragraph CellBody and CellHeading tags. Indeed, if your table formats using CellBody as paragraph format for cells in the body of a table and CellHeading as the paragraph format for the cells in the table, your ESD header didn't even apply the paragraph formats.

    Another alternative is to include a paragraph tag in a table row of conversion for a table cell by combining TC: and P: to match table cells containing such paragraphs. For example:

    TC: P:CellBody entry

    creates items named cell entry of table cells containing paragraphs tag CellBody. The paragraph in such a cell is not encapsulated in an extra element.

    One final note is that TH: in a conversion table refers to the position of the entire table. his children are header lines. The analogue of table of TH body: to:, not TC.:

    -Lynne

  • How do find no data in the table

    Hi all

    I have 250 table in my diagram and when I query like this

    Select * from object where type_objet = 'TABLE' and owner = 'MATTELLI.
    order by object_name CSA


    Some tables have no data in it. How to find the tables that not have data or records

    Thanks and greetings
    Srikkanth.M

    Hi Srikkanth,

    First of all, if you are only interested in object TABLE type, so you should better use dba_tables instead of dba_objects.
    Then, assuming that your statistics are up to date, it would look like:

    SELECT *
      FROM all_tables
     WHERE owner = 'MATTELLI'
      AND num_rows > 0
     ORDER BY table_name ASC
    

    Otherwise, you can go with a subquery and a 'select count.

    HTH,
    Thierry

  • Store an uncertain number of entry in the table

    Hi, I am new to java, and even if I make a practice of the input of entrance of the store array I have a question like this:

    If we want to use the table, we must create the table and require that give us the size of the array.

    For example, if I know I will have ten full entries, I can simply store an array like: int [] intArray = new int [10];

    But what happens if we are not sure about the number of entries, it could be 10, it could be 20.

    Can I create an array with an uncertain size? Or I shouldn't use table to store the entry?

    Collections. And more specifically lists.

    Tables are fine when they are good, but especially you should use Collections. And in this case you should use list.

    List myints = new ArrayList();
    myints.add(1);
    myints.add(15);
    myints.add(-3);
    myints.add(6);
    // etc
    for( int i : myints){
      System.out.println(i);
    }
    

    See: http://download.oracle.com/javase/tutorial/collections/index.html

  • Unable to display data for the date where there is no entry in the table

    Hello

    I need a urgent, described below:

    I have a table named as 'dirty', consisting of three columns: empno, sale_amt and sale_date.
    (Please ref. The table with data script as shown below)

    Now, if I run the query:
    "select trunc (sale_date) sale_date, sum (sale_amt) total_sale of the sales group by order trunc (sale_date) by 1.
    It then displays the data for the dates there is an entry in this table. But it displays no data for the
    date in which there is no entry in this table.

    If you run the Table script with data in your schema, then u will see that there is no entry for the 28th. November 2009 in
    sales table. Now the above query displays data for the rest as his dates are in the table of the sale with the exception of 28. November 2009.
    But I need his presence in the result of the query with the value "sale_date' as '28. November 2009 "and that of"total_sale"as
    « 0 ».

    Y at - there no way to get the result I need?

    Please help as soon as POSSIBLE.

    Thanks in advance.

    Create the table script that contains data:
    ------------------------------------------

    CREATE TABLE SALE
    (
    NUMBER EMPNO,
    NUMBER OF SALE_AMT
    DATE OF SALE_DATE
    );
    TOGETHER TO DEFINE
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (100, 1000, TO_DATE (DECEMBER 1, 2009 10:20:10 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (100, 1000, TO_DATE (NOVEMBER 30, 2009 10:21:04 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (100, 1000, TO_DATE (NOVEMBER 29, 2009 10:21:05 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (100, 1000, TO_DATE (NOVEMBER 26, 2009 10:21:06 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (100, 1000, TO_DATE (NOVEMBER 25, 2009 10:21:07 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (200, 5000, TO_DATE (NOVEMBER 27, 2009 10:23:06 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (200, 4000, TO_DATE (NOVEMBER 29, 2009 10:23:08 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (200, 3000, TO_DATE (NOVEMBER 24, 2009 10:23:09 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (200, 2000, TO_DATE (NOVEMBER 30, 2009 10:23:10 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (300, 7000, TO_DATE (NOVEMBER 24, 2009 10:24:19 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (300, 5000, TO_DATE (NOVEMBER 25, 2009 10:24:20 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (300, 3000, TO_DATE (NOVEMBER 27, 2009 10:24:21 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (300, 2000, TO_DATE (NOVEMBER 29, 2009 10:24:22 ',' DD/MM/YYYY HH24:MI:SS'));))
    Insert into SALES
    (EMPNO, SALE_AMT, SALE_DATE)
    Values
    (300, 1000, TO_DATE (NOVEMBER 30, 2009 10:24:22 ',' DD/MM/YYYY HH24:MI:SS'));))
    COMMIT;

    Any help will be necessary for me


    Kind regards
    WITH tab AS
      (SELECT TRUNC(sale_date) sale_date,
        SUM(sale_amt) total_sale
         FROM sale
       GROUP BY TRUNC(sale_date)
       ORDER BY 1
      )
     SELECT sale_date,
      NVL(total_sale,0) total_sale
       FROM tab
       model
       REFERENCE refmodel ON (SELECT 1 indx, MAX(sale_date)-MIN(sale_date) AS daysdiff , MIN(sale_date) minsaledate FROM tab)
         dimension BY (indx)
         measures(daysdiff,minsaledate)
       main main_model
       dimension BY (sale_date)
       measures(total_sale)
       RULES upsert SEQUENTIAL ORDER ITERATE(1000) until (iteration_number>refmodel.daysdiff[1]-1)
       ( total_sale[refmodel.minsaledate[1]+iteration_number]=total_sale[cv()] )
    ORDER BY sale_date
    

    using a clause type

    Ravi Kumar

  • Remove the entries in the table less resolution to

    For example, I have the following table:

    [1 k, 2 k, 3 k, 23 k, 24 k, 25 k, 26 k, 51 k, 52 k, 54 k, 56 k, k 76, 78 k]

    For example, the resolution is 10 k

    I want to process the table in a way so that it returns a table with the frequencies-more-than-resolution deleted while at the more-than-resolution-frequencies only maintain the highest and delete the rest.

    In the table above, I've separated the elements to indicate the Group of frequencies forming 'more-than-resolution-frequencies' example 1 k, 2 k, 3 k are more-than-resolution-frequencies

    The resulting table should look like.

    [3 k, 26 k, 78 k]

    In the example above, there are 3 groups of frequencies ilustration purposes, but it could be any number.

    Round table and removing duplicates close brings the result but this adds an error equal to the resolution.

    I hope this helps.

  • Tables to double entry or Pivot table using oracle 11 g

    Hi all


    I want my PivotTable and create something like below:

    I have the table in this format

    Objective measure of the output in detail
    _________________________________________

    NVM CSV Some text to the text
    F & M VS some text somet


    I want it to appear on the page

    Output: NVM
    Detail: CSV
    Goal: A text
    Measure: a text

    Output: Vs
    Detail: CSV
    Goal: A text
    Measure: A text

    No idea how to do it?

    Thanks in advance

    Pivot doesn't seem to be necessary. Create a standard report using one of the by default: vertical report... built-in report templates, or model of attribute value pairs in the current theme.

    (Please update your forum profile with a real handle instead of "858002".)

  • How to find missing values in the table?

    Hi all..

    Please help me.

    1.jpg

    For example:

    I have a. table

    in this table, I have a folder with the number 1 up to 10 serial number.

    And then, in table B, I put number between 1 and 10.

    and I use the number 1, 2, 3, 6, 8, 10.

    I want to find missing values between 1 and 10. So, can I select with query for this case?

    It's the value of query output:

    4, 5, 7, 9

    Sorry for the bad language.

    Thank you all.

    Select

    r

    Of

    (

    Select Rownum r

    Of the double

    Connect by Rownum<= (select="" serialto="" from="">

    )

    where are > = ((select serialfrom from tablea))

    less

    Select the series from tableb

  • type of data entry in the table of clusters

    Hi I have 4 table column in the cluster

    X Y Z & entry type

    X + Y = Z simply

    I want to do

    When I entered x; cell data type will automatically X (not the numeric value just 'X')

    When I entered z; cell data type will automatically Z

    Then I can build my algorithm.

    How can I do that.

    Thank you.


  • Text entry in the Table, height of automatic resizing to insert content

    I have a table with a variety of components inputText several rows, most of them with the attribute @row the value 2.

    However, one of these fields has sometimes wordy content. Is it possible to configure the component InputText AutoSize himself (and line) at a height that displays the entire contents without scroll bars? In other words, is there a way to set the text box/column/table, so that the height of the text in each line box auto-tailles to display all content.

    I am aware of a brute force method to set line attribute of the 10 inputText; However, since most of the time the text can be inserted into the 2 or 3 rows, assigning 10 wastes a lot of real estate.

    Have tried to define different properties without luck anl - this is the current definition of the InputText and the column that contains:

    <af:column sortProperty="Definition" sortable="true"
                             headerText="#{bindings.NamesBatchApproveVO1.hints.Definition.label}"
                             id="c9" width="450" inlineStyle="height:inherit;">
                    <af:inputText value="#{row.bindings.Definition.inputValue}"
                                  label="#{bindings.NamesBatchApproveVO1.hints.Definition.label}"
                                  required="#{bindings.NamesBatchApproveVO1.hints.Definition.mandatory}"
                                  columns="#{bindings.NamesBatchApproveVO1.hints.Definition.displayWidth}"
                                  maximumLength="#{bindings.NamesBatchApproveVO1.hints.Definition.precision}"
                                  shortDesc="#{bindings.NamesBatchApproveVO1.hints.Definition.tooltip}"
                                  id="it4"
                                  rendered="#{row.bindings.Definition.inputValue != null}" simple="true"
                                  wrap="soft" rows="3">
                      <f:validator binding="#{row.bindings.Definition.validator}"/>
                    </af:inputText>
                  </af:column>
    Using 11g.

    Thanks for your help.

    Published by: user757151 on November 15, 2012 11:12

    See that Frank's article: https://blogs.oracle.com/jdevotnharvest/entry/gotcha_when_using_javascript_in

    AP

  • Setting a different value to a text entry in the table of the adf conditionally

    Hi guys

    I work in Colombia - British ADF and ADF Faces.I have a table of adf upadable in which a text input is there in every page row.when is loading the input text is filled with-1 (i.e., the value of one of my columns in a table in the database). My goal is to make this entry blank when text the value retrieved is - 1 for this line. Entering text except-1 data will remain as it is.

    We set the value of this text of entry through inputtext2.setValue("") conditionally to the support of this page bean. But even if a given line is - 1, it contains the definition of the data of all the empty lines.

    Can anyone suggest me how to do this please?

    Put a transient attribute in your view object and use that one instead of the actual column.

    In the accessor get for the transient, did return null if the value of the real column is - 1

    In the setter, just delegate to the true Set accessor.

    John

Maybe you are looking for

  • IPad 3rd gen to overwrite/reset after IOS upgrade

    I have an ipad - A1430 on the iPad (3rd generation) Wi - Fi + cell - and have updated to 9.3.4 and 9.3.5 IOS in the last days. Two upgrades have caused a significant of the screen changes and regular downturn freezes or resets - every three minutes.

  • Cruzer Force USB Flash drive.

    I have a Force Cruzer 32 GB USB flash drive. I installed it in a mac mini ok and safe mode and regular mode works in the mini mac ok but when I put it in a laptop or a PC desk top it works in normal mode. The secure vault does not open even when you

  • Why not display when I boot Linux Live DVD?

    I have a new Pavilion g6-1257sa running Windows 7, work all OK. I tried to start up to a Live DVD of Linux, but the screen remains blank. This happened with two recent versions of Linux 64-bit: 12.1 OpenSUSE and Ubuntu 11.04. If anyone else has tried

  • What is install updater iq

    What is install updater iq?

  • Instalacion more lexmark x 1185

    Saludos a todos... por favor alguien sabe como hacer para instalar una more lexmark x 1185 en windows 7... probe el truco Escalin compatibility pero no me funcion. Apparently instalda pero esta me not of as el cable usb no esta conectado y if lo esta