Selecting distinct combination of records

Hi Expart ,
               I have table fields like function ,tcode,objects,fields,from ,to ,user like that in which except user all r primary key fields but i want Number of unique Function-Tcode-Object combinations when select the data.
i am doing like that
SELECT COUNT( distinct  FUNCTIONID TCODE OBJECT)
FROM /PSYNG/FUNCTTRAN
INTO L_FUN_TCD_OB
WHERE VRSIO =  P_VRSIN.
but it will give an error
plz help me to get no of this combination of records .
Thanks in advance .
Tsen

hi
u can write code like this
SELECT distinct FUNCTIONID TCODE OBJECT
FROM /PSYNG/FUNCTTRAN
INTO table it_L_FUN_TCD_OB
WHERE VRSIO = P_VRSIN.
data: var type sy-tabix.
describe table it_L_FUN_TCD_OB lines var.
L_FUN_TCD_OB = var.
refresh  it_L_FUN_TCD_OB.
Regards
Sajid

Similar Messages

  • Select distinct records without using distinct

    hi experts,
    my retrieved data like these:
    cnt_id cnt_type rcrd_id wrkflw_id
    558848     PRODUCT     553503     248     
    558848     PRODUCT     553503     248     
    558848     PRODUCT     553503     248     
    558808     PRODUCT     553463     248     
    558808     PRODUCT     553463     248     
    558808     PRODUCT     553463     248     
    558810     PRODUCT     553463     248     
    558810     PRODUCT     553463     248     
    558810     PRODUCT     553463     248
    now i want to select one record for each cnt_id without using any distinct function .. how can i do that?
    regards,
    SKP

    you can use the below query
    select * from t where rowid in (select max(rowid)
    from t group by cnt_id)You're query is not the equivalent of DISTINCT.
    SQL> ed
    Wrote file afiedt.buf
      1  create table t as
      2            (select 558848 as cnt_id, 'PRODUCT' as cnt_type, 553503 as rcrd_id, 248 as wrkflw_id from dual union all
      3             select 558848, 'RETURN', 553503, 248 from dual union all
      4             select 558848, 'PRODUCT', 553503, 248 from dual union all
      5             select 558808, 'PRODUCT', 553463, 248 from dual union all
      6             select 558808, 'PRODUCT', 553463, 248 from dual union all
      7             select 558808, 'PRODUCT', 553463, 248 from dual union all
      8             select 558810, 'PRODUCT', 553463, 248 from dual union all
      9             select 558810, 'PRODUCT', 553463, 248 from dual union all
    10*            select 558810, 'PRODUCT', 553463, 248 from dual)
    11  /
    Table created.
    Elapsed: 00:00:00.01
    SQL> select * from t where rowid in (select max(rowid) from t group by cnt_id);
        CNT_ID CNT_TYP    RCRD_ID  WRKFLW_ID
        558810 PRODUCT     553463        248
        558808 PRODUCT     553463        248
        558848 PRODUCT     553503        248
    Elapsed: 00:00:00.00
    SQL> select distinct * from t;
        CNT_ID CNT_TYP    RCRD_ID  WRKFLW_ID
        558810 PRODUCT     553463        248
        558808 PRODUCT     553463        248
        558848 RETURN      553503        248
        558848 PRODUCT     553503        248
    Elapsed: 00:00:00.00
    SQL>

  • "Select Distinct Records" Option Not Available

    Hello Experts.
    I am working on a new report in CR XI, and noticed that I had many duplicate records.  I went to the File; Report Options; and expected to click on "Select Distinct Records", but that choice was grayed-out.  What would have caused me to lose this option, and how do I fix it?
    Thanks in advance for your help.

    Not sure if this covers it or not, but....
    The Select Distinct Records command is only available for ODBC, OLE DB, and SQL native drivers; it is not available for Stored Procedures. Note also that your server may automatically sort returned values if no sort is specified in Crystal Reports.

  • Select distinct records in query

    If I want to read a table in an infoset, how can I just select distinct entries from the table?
    Is it done at the infoset level or the query level?

    I've actually created the infoset for table VBFA and created a query.
    But I can't limit the output such that for each DO, show only distinct subsequent Invoice.
    eg. DO 123 has 3 items, and this DO 123 has only 1 Invoice 456, then in the output, there will be
    DO    |     Invoice
    123   |     456
    123   |     456
    123   |     456
    It's repeated 3 times because there are 3 items in VBFA for this DO. How can I create the infoset/query so that the output will be 1 entry only, ie
    DO    |     Invoice
    123   |     456
    Thanks

  • Select distinct record based on column

    Hello All,
    I have a table that has more than one row as Detail for a single invoice number(screenshot below). When I create report based on this table, I get multiple rows for single invoice. I mean Invoice 000027 shows up with 5 different rows on the SSRS report.
    Is there a way I could display a single row for a single invoice? Any thoughts on this will be greatly appreciated. Thanks.
    Regards,
    Amol
    eport )

    Thank you all for your suggestions. The issue is how can I get single distinct columns after joining 2 tables (InvoiceHeader & InvoiceDetail). I am using following query in my dataset.
    SELECT DISTINCT I.recid, I.InvNumber, D.Detail, I.CompanyName, I.Addr1, I.SalesRep, I.JobNumber, I.Status, I.InvDate, I.TotalInvAmount
    FROM            InvoiceHeader AS I INNER JOIN
                             InvoiceDetails AS D ON I.InvNumber = D.InvoiceNumber
    WHERE        (I.InvNumber = @InvoiceNumber) AND (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) OR
                             (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) AND (I.JobNumber = @JobNo) OR
                             (I.InvNumber = @InvoiceNumber) AND (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) 
                             AND (@JobNo = '') OR
                             (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) AND (I.JobNumber = @JobNo) AND 
                             (@JobNo = '') OR
                             (I.InvDate >= @StartDate) AND (I.InvDate <= @EndDate) AND (I.CompanyName IN (@Customer)) AND (I.Status IN (@Status)) AND (@JobNo = '') AND 
                             (@InvoiceNumber = '')
    ORDER BY I.InvNumber DESC
    Thanks again.
    Amol

  • Help! Howto use the join function in a query with select distinct ?

    Hi!
    I have 2 tables. I want to select only 1 painting of each artists.
    select distinct idartist
    from tbl_artworks
    where blah blah blah
    order by rand()
    how does the "join" function work for add: name, lastname, title, image and much more... i try... but i fail...
    tbl_artists
    idartist
    name
    lastname
    1
    Paul
    Gaugain
    2
    Vincent
    Van Gogh
    3
    Pablo
    Picasso
    tbl_artworks
    idartwork
    idartist
    title
    image
    1
    1
    days of gods
    image1.jpg
    2
    2
    sunflower
    image2.jpg
    3
    3
    Dora maar au chat
    image3.jpg
    4
    2
    Sky
    image4.jpg
    5
    3
    La vie
    image5.jpg

    Getting a single random image for each probably requires a combination of sql and cf.  It would take someone smarter than me to do it with sql alone.  I would probably try something like this:
    1.  Run a database query that gets all the images from all the artists.
    2.  Run a Q of Q that gets a distinct list of artist ids.
    3.  Loop through that list and run a Q of Q to get all the images for that artist.
    4.  Still in that loop, use randrange (1 to the recordcount) to select a random record from your Q of Q

  • Query help in select Distinct on one column.

    CREATE GLOBAL TEMPORARY TABLE Table1 (
    ID1 varchar2(100) ,
    Name1 varchar2(100),
    Name11 varchar2(100)
    insert into Table1 values ('a','n1','h3');
    insert into Table1 values('b','n2','h2');
    insert into Table1 values('a','n3','h1');
    insert into Table1 values('c','n4','h5');
    insert into Table1 values ('c','n5','h4');
    insert into Table1 values('d','n6','h6');
    select * from Table1;
    ID1,NAME1,     NAME11
    a,     n1,     h3
    b,     n2,     h2
    a,     n3,     h1
    c,     n4,     h5
    c,     n5,     h4
    d,     n6,     h6
    I am trying to select distinct ID1 and all values associated with it which is max row.I want to result as -
    ID1,NAME1,     NAME11
    a,     n3,     h1
    b,     n2,     h2
    c,     n5,     h4
    d,     n6,     h6
    Can you please help me to write simple query to get above result.
    Edited by: 871447 on Jul 25, 2011 9:42 AM
    Edited by: 871447 on Jul 25, 2011 9:45 AM

    Hi,
    Do a self-join, to combine the two rows for each value of id1 onto one output row.
    Make it an outer join, in case there is only one row with a vlaue for id1.
    SELECT  l.id1
    ,     l.name1
    ,     NVL ( r.name11
             , l.name11
             )          AS name11
    FROM              table1     l
    LEFT OUTER JOIN     table1     r  ON  l.id1     = r.id1
                              AND l.name1     < r.name1
    ;Edited by: Frank Kulash on Jul 25, 2011 12:57 PM
    Sorry, I mis-read the problem.
    Lee's solution, above, assumes that name1 is unique, as it is in your sample data.
    What output would you want if that's not the case?
    If name1 is not unique, but the combination of (id1, name1) is unique, then you can modify Lee's solution like this:
    SELECT  *
    FROM    table1
    WHERE   (id1, name1) IN (
                        SELECT    id1
                        ,       MAX (name1)
                               FROM          table1
                        GROUP BY  id1
    ;Or, if you can't make any assumptions about uniqueness, you might need something like this:
    WITH     got_r_num     AS
         SELECT  id1, name1, name11
         ,     ROW_NUMBER () OVER ( PARTITION BY  id1
                                   ORDER BY          name1     DESC
                             ,                name11     DESC
                           )      AS r_num
         FROM     table1
    SELECT  id1, name1, name11
    FROM     got_r_num
    WHERE     r_num     = 1
    ;

  • Serious performance problem - SELECT DISTINCT x.JDOCLASSX FROM x

    I am noticing a huge performance problem when trying to access a member that
    is lazily loaded:
    MonitorStatus previousStatus = m.getStatus();
    This causes the following query to be executed:
    SELECT DISTINCT MONITORSTATUSX.JDOCLASSX FROM MONITORSTATUSX
    This table has 3 million records and this SQL statement takes 3 minutes to
    execute! Even worse, my app heavily uses threads, so this statement is
    executed in each of the 32 threads. As a result the application stops.
    Is there any way that I can optimize this? And more importantly, can Kodo
    handle a multithreaded app like this with a huge database? I've been having
    a lot of performance problems since I've started doing stress & load
    testing, and I'm thinking Kodo isn't ready for this type of application.
    Thanks,
    Michael

    You can prevent this from happening by explicitly enumerating the valid
    persistent types in a property. See
    http://docs.solarmetric.com/manual.html#com.solarmetric.kodo.PersistentTypes
    for details.
    >
    Inconveniently, this nugget of performance info is not listed in the
    optimization guide. I'll add in an entry for it.This setting did in fact prevent the query from running which fixed the
    problem. It definitely belongs in the optimization guide.
    And more importantly, can Kodo
    handle a multithreaded app like this with a huge database? I've beenhaving
    a lot of performance problems since I've started doing stress & load
    testing, and I'm thinking Kodo isn't ready for this type of application.I'd like to find out more information about details about your issues. We
    do a decent amount of stress / load testing internally, but there are
    always use cases that we don't test. Please send me an email (I'm assuming
    that [email protected] is not really your address) and let's
    figure out some way to do an analysis of what you're seeing.This email is just for posting to usenet, to avoid spam. I'm now running my
    app through stress/load testing so I hope to discover any remaining issues
    before going into production. As of this morning the system seems to be
    performing quite well. Now the biggest performance problem for me is the
    lack of what I think is called "outer join". I know you'll have this in 3.0
    but I'm suprised you don't have this already because not having it really
    affects performance. I already had to code one query by hand with JDBC due
    to this. It was taking 15+ minutes with Kodo and with my JDBC version it
    only takes a few seconds. There are lots of anti-JDO people and performance
    issues like this really give them ammunition. Overall I just have the
    impression that Kodo hasn't been used on many really large scale projects
    with databases that have millions of records.
    Thanks for configuration fix,
    Michael

  • Select from table of records

    Hi,
    Inside of a stored procedure I created:
    - a record type:TYPE gr_rec IS RECORD (contact_id number)
    - a table of records: TYPE gr_tb IS table of gr_rec INDEX BY BINARY_INTEGER
    and then I populated the table in a loop: tb(i).contact_id := a.contact_id.
    My question is:
    Is it posible to perform a select statement on the table of records to get only distinct records?
    If not, how can I filter these records, as I use the procedure as a block data source in a form and I need only distinct records.
    Note: I can not obtain select rows from the query that populates the table.
    Thank you, Monica

    Look at this function:
    create or replace type TYP_REC_EMP as object
      EMPNO     NUMBER(4),
      ENAME     VARCHAR2(10),
      JOB       VARCHAR2(10),
      MGR       NUMBER(4),
      HIREDATE  DATE,
      SAL       NUMBER(7,2),
      COMM      NUMBER(7,2),
      DEPTNO    NUMBER(2)
    create or replace type TYP_TAB_REC_EMP is table of TYP_REC_EMP
    CREATE OR REPLACE FUNCTION Ret_Cur RETURN TYP_TAB_REC_EMP
    IS
      TAB TYP_TAB_REC_EMP := TYP_TAB_REC_EMP(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
      CURSOR C_EMP IS
      SELECT *
      FROM   EMP ;
      i PLS_INTEGER := 0 ;
    BEGIN
      FOR CEMP IN C_EMP LOOP
             TAB.extend ;
            i := i + 1 ;
            TAB(i) := TYP_REC_EMP
                            CEMP.EMPNO,
                             CEMP.ENAME,
                             CEMP.JOB,
                             CEMP.MGR,
                             CEMP.HIREDATE,
                             CEMP.SAL,
                             CEMP.COMM,
                             CEMP.DEPTNO
      END LOOP ;
      RETURN TAB ;
    END;
    /And the Sql*plus query :
    SQL*Plus: Release 9.0.1.3.0 - Production on Ve Mar 24 09:18:37 2006
    (c) Copyright 2001 Oracle Corporation.  All rights reserved.
    Connecté à :
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    SQL>
    SQL> SELECT DISTINCT(empno),deptno FROM TABLE(ret_cur()) WHERE deptno=20
      2  /
         EMPNO     DEPTNO
          7369         20
          7566         20
          7788         20
          7876         20
          7902         20
    SQL> Francois

  • Select distinct from an infoset query

    Hello
    I need to select distinct / delete duplicate from an infoset query created thru SQ02.
    Please let me to know how this can be done?
    Many thanks in advance!
    regards
    Sanjyot

    Hi,
    You can verywell use infoset query if you are doing following things
    Join using Keyfields to retreive data from tables
    If not using keyfields create index for those table fields  in those fields which will improve in accessing database
    Try to use minimum of tables of small size dont try to join big tables like GLPCA and all.
    Try to load small set of data like a period or month. Dont try for a year or so.
    if your performance is good for aperiod you can go for a year.
    If you are good in function module you can try function module in which you will have the option of specifying no of records to be selected usign package size.
    Hope this helps for you.
    Thanks,
    Arun

  • SELECT DISTINCT does not work. Why?

    Dear All,
    I wrote the Query below in SAP B1 8.8 and it works fine.
    But, for some strange reason, certain records are duplicated.
    Could anybody explain why?
    I tried to eliminate the duplicates by changing the 1st line of the Query from SELECT to SELECT DISTINCT
    Error Message:
    The ntext data type cannot be selected as DISTINCT because it is not comparable.
    Could you help amend the Query?
    Thanks
    Leon Lai
    SELECT
    T0.[UpdateDate] AS 'Update Dt',
    T0.[TaxDate] AS 'Doc Dt',
    CASE T5.[TransType]
         WHEN '18' THEN 'PU ' + CONVERT(VARCHAR(6), T0.[DocNum])
         WHEN '19' THEN 'PC ' + CONVERT(VARCHAR(6), T0.[DocNum])
    END 'SAP Ref.',
    T1.[ImportLog]     AS 'Ship #',
    T0.[CardCode] + '' AS 'Supplier #',
    T0.[CardName]      AS 'Supplier Name',
    T0.[DocTotal]      AS 'Rs',
    T1.[BlockNum]      AS 'Reqn #',
    T0.[DocNum]        AS 'Doc No',
    T0.[U_SupInv]      AS 'Link'
    FROM klship.[dbo].[OPCH] T0
    INNER JOIN klship.[dbo].[PCH1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN klship.[dbo].[OJDT] T5 ON T0.[TransID] = T5.[TransID]
    WHERE
    (T0.[UpdateDate] >= '[%2]' AND
    T0.[UpdateDate]  <= '[%3]' AND
    T0.[U_SupInv] IS NULL)
    OR
    (T0.[UpdateDate] >= '[%4]' AND
    T0.[UpdateDate]  <= '[%5]' AND
    T0.[U_SupInv] IS NOT NULL)
    FOR BROWSE
    Note: -  U_SupInv is a UDF used to attach a scanned pdf file to the Supplier's Invoice.

    Dear István Korös,
    Thanks a lot for your answer.
    Your suggestion works!
    I am closing this thread.
    However, I have never met the problem of duplicate records before
    with such straightforward Queries.
    If you could explain to me why such duplicates arose, it would be very
    satisfying.
    Best Regards
    Leon Lai

  • Select Distinct Fields from non related table

    Hi Experts,
    I have to fetch Distinct Fields from table zdcxy along with the fields from the table zvend but there is no primary key forigen key relationship also if I wanted use join condition. I need to move fields from both the table into output file and 1 part I implemented but I am unable to do second part plz any body can help me its argent. below I pasted part of code along with two requirements.
    1.Select all data (Location - LIFNR, Descr u2013 ZPLTNAMEC, CJI_CUSTOMER u2013 CJI customer flag) from ZVEND table.
    2.Select all distinct DCs and BUs from zdcxy table.
    SELECT * FROM ZVENDPLT INTO CORRESPONDING FIELDS OF TABLE IT_VENDPLT.
    *select distinct zdc from zdcxy into corresponding fields of table it_map.
    *select distinct zbu from zdcxy into corresponding fields of table it_map.
      IF SY-SUBRC  = 0.
        LOOP AT IT_VEND.
          MOVE :  IT_VENDPLT-LIFNR              TO IT_TAB-FIELD1,
                  IT_VENDPLT-ZPLTNAMEC          TO IT_TAB-FIELD2,
                  IT_VENDPLT-CJI_CUSTOMER       TO IT_TAB-FIELD3,
           CONCATENATE :IiT_TAB-FIELD1   IT_TAB-FIELD2   IT_TAB-FIELD3   IT_TAB-FIELD4
    INTO IT_LOAD-RECORD SEPARATED BY SEPARATOR.
          TRANSFER IT_LOAD TO OUT_FILE.
    ENDLOOP.
    Can any body explain me hw to fetch DC and Bu from the table zdcxy and keep in the same loop of   it_vend.
    Second thing is that I need to give information about records into second output file hw to do that means I opened one more file and I am unable to move the record history there plz help me.
    Thanks in advance

    Plz any body can help me it's argent.
    Thanks
    Basu

  • SELECT DISTINCT does not work - Another Problem!

    Dear All
    Previous Post
    I just posted a thread, which has been answered by an expert. It's here:
    SELECT DISTINCT does not work. Why?
    My original problem was that the Query returned duplicate records, and SELECT DISTINCT did not work.
    The solution was to change this select:
    T0.[U_SupInv]      AS 'Link'
    ... to this:
    CAST(T0.[U_SupInv] as nvarchar(100))      AS 'Link'
    The amended Query worked.
    New Problem
    I just discovered that resolving the problem created a new one.
    The field U_SupInv (Link) is in fact a UDF.
    I created it so that all Suppliers' Invoices could be Scanned to pdf files, and these pdf could be linked
    to the respective AP Invoice.
    Originally, when I clicked 'Link' in my Query results, the pdf scan pops up.
    When the Query is amended by adding CAST, the link becomes dead.
    Help
    Could anyone tell me how I can make SELECT DISTINCT work, as well keeping the LINKS live?
    The main purpose of my Query is to help users view the pdf scans by clicking on the links.
    Thanks
    Leon Lai
    Here's my Original Query
    SELECT
    T0.[UpdateDate] AS 'Update Dt',
    T0.[TaxDate] AS 'Doc Dt',
    CASE T5.[TransType]
         WHEN '18' THEN 'PU ' + CONVERT(VARCHAR(6), T0.[DocNum])
         WHEN '19' THEN 'PC ' + CONVERT(VARCHAR(6), T0.[DocNum])
    END 'SAP Ref.',
    T1.[ImportLog]     AS 'Ship #',
    T0.[CardCode] + '' AS 'Supplier #',
    T0.[CardName]      AS 'Supplier Name',
    T0.[DocTotal]      AS 'Rs',
    T1.[BlockNum]      AS 'Reqn #',
    T0.[DocNum]        AS 'Doc No',
    T0.[U_SupInv]      AS 'Link'
    FROM klship.[dbo].[OPCH] T0
    INNER JOIN klship.[dbo].[PCH1] T1 ON T0.[DocEntry] = T1.[DocEntry]
    INNER JOIN klship.[dbo].[OJDT] T5 ON T0.[TransID] = T5.[TransID]
    WHERE
    (T0.[UpdateDate] >= '[%2]' AND
    T0.[UpdateDate]  <= '[%3]' AND
    T0.[U_SupInv] IS NULL)
    OR
    (T0.[UpdateDate] >= '[%4]' AND
    T0.[UpdateDate]  <= '[%5]' AND
    T0.[U_SupInv] IS NOT NULL)
    FOR BROWSE

    Dear István Korös,
    Thanks a lot for your answer.
    I will test your suggestion tomorrow, as it's night and I am returning home now.
    However, I do not think it will suit my requirements for the foll reasons:
    - I worked hard to get rid of the need to enter anything in the @Scan2 field.
    - This UDF was created solely as a text of instruction for my staff.
       Unfortunately I had to fill in something to make the Query work.
    - The problem is that if the user forgets to click the drop-down arrow and leaves @Scan2
       blank, the query does not work.
    - With the help of another expert, I succeeded in ignoring @Scan2 altogether.
    - I posted only a simplified version of my Query on the forum, without the codes relating to eliminating the
      need to enter something in @Scan2, so you may not be aware of my requirement.
    - I hope you understand my reluctance. But I will try your suggestion nevertheless.
    My Suggestion
    I think using PCH1.VISORDER may be the solution.
    If we select only those rows where visorder = 0, then
       - there will be no duplication
       - I need not use SELECT DISTINCT
       - All my LINKS to pdf files will be live because I need not use CAST
       - I may retain that part of my Query which permits ignoring @Scan2 altogether.
    - A Dream!-
    The problem is that I don't know how and where  to place that VISORDER.
    If you think I may be right, could you help me along that line?
    Best Regards
    Leon Lai

  • Count distinct combinations

    I have a table which has 3 columns a, b, c
    there could be duplicates in a/b/c.
    I want to count the total number of distinct combinations of a, b, c using a select query (i.e. the result of the select query should be the count). How do I do this?

    Look, Elic, for all practical purposes count(*) is equivalent to sum(1). Therefore:
    1. Argument to the count doesn't make any sense
    2. count aggregate function is redundant
    Browse any mathematical book. Do you see any count symbols in it? Nope. Only sigmas (summation) and occasional pi's (multiplication). OK, even more infrequently lattice joins (maximum) and meets (minimum).

  • Select one among multiple record

    Dear all,
    how can i create a select statement which returns only one record if there are the same values in tkn and numero column?
    Table ROSE
    TKN NUMERO
    75684523 4523
    75684523 4523
    75684523 4523
    Thank you,

    You can just use DISTINCT keyword if you have just two columns in your table
    with t as
        select 75684523 tkn, 4523 numero from dual union all
      select 75684523, 4523 from dual union all
      select 75684523, 4523 from dual union all
      select 99984523, 3333 from dual union all
      select 99984523, 3333 from dual
    select distinct tkn,numero from t;
    TKN                    NUMERO                
    99984523               3333                  
    75684523               4523       Or if you have more number of columns in the table but still you want to get only one row then you can use either of the above mentioned methods by gurus.
    with t as
        select 75684523 tkn, 4523 numero, 12 eid from dual union all
      select 75684523, 4523, 12 from dual union all
      select 75684523, 4523, 13 from dual union all
      select 99984523, 3333, 14 from dual union all
      select 99984523, 3333, 15 from dual
    select l.tkn, l.numero, eid
      from
           select t.tkn, t.numero,eid, row_number() over (partition by t.tkn, t.numero order by 1) rn
           from t
         ) l
    where rn = 1
    /

Maybe you are looking for

  • Contribute 6.5 the parameter is incorrect error

    I have three clients who all have the same problem on the same day on different site. When they try to edit a page and add a link they get an error message 'the parameter is incorrect' - if they continue to add link from the pop up box Contribute cra

  • Sony DVD 403 users with Final Cut Express

    Hi. Anybody's input on getting Sony's Mini DVD-RW. into Final Cut Express that uses a Sony DCR-DVD 403 camcorder. Walter

  • Grace Period before Cancelling and Deleting Email Accounts

    I recently change my phone provider to a VoIP phone, but did not cancel my DSL service.  However, once the porting of my phone number occured, Verizon "suspended " account completely.  I have not access to my email, and according to the agent I spoke

  • IP Name of the server !

    Guys, I have a question on IP number: When the SAP GUI is not installed in our desk top and while I am in office, I go to start>run>type''SAPGUI IPNumber" and enter. It takes me to SAP login screen.Then I am able to login. What I want to understand i

  • Source message split into 2 orders - 2nd order populating wrong values

    Hi Friends, I have an issue related to X12 to Orders, X12 file is processed and split into 2 orders/idocs, 1 idoc is outputing the right values, however the 2nd idoc is extracting all wrong values. According to my observation, there are no values com