Another way to achieve this?

SQL > desc cname
Name Null? Type
----------------------------------------- -------- ----------------------------
IDENTIFICATION NUMBER
CTYPE VARCHAR2 (10)
CLIA VARCHAR2 (10)

SQL > select * from cname;

CTYPE CLIA ID
---------- ---------- ----------
11 can tst
12 can tst
12 ucp nbs
ASF 12 trp


SQL > ed
A written file afiedt.buf

1 Select a.id, a.ctype, a.clias cname, a, cname and b
where the 2
3 a.ctype = b.ctype and
4 a.clias = b.clias and
5 * a.rowid! = b.rowid
SQL > /.

CTYPE CLIA ID
---------- ---------- ----------
12 can tst
11 can tst



SQL >

Another way to achieve the above output?

Thank you. :-)

Maybe

select id,ctype,clias
  from cname
 where (ctype,clias) in (select ctype,clias
                           from cname
                          group by ctype,clias
                          having count(*) > 1
                        )

Concerning

Etbin

NO TESTS because I did not access database on weekends and holidays

Tags: Database

Similar Questions

  • I'm moving my files to workspaces to cloud.adobe.  What is the best way to achieve this?

    I'm moving my files to workspaces to cloud.adobe.  What is the best way to achieve this?

    Hi Traci,

    So big that you get ready for the transition to cloud.acrobat.com! Please see that the specified item was not found. For more detailed information on downloading your files.

    When you open a session workspaces, however, you will see a big red box at the bottom left. Click this box, and your files will be packed to the top for you. You will receive an email with the instructions when the packaged files are ready for you.

    Best,

    Sara

  • Another way to do this perhaps?

    Hi I have a CF app that uses a form page to enter data in the fields, and then passes these fields as SESSION variables to the action page so that usage can see hwo page will look like. Basically, is an application to create new documents/pages html.

    Everything works fine so far. I need to continue to add fields to input at various stages, and so I added a text box to add a list of sorts that is a list of references to a particular product associated with the page under construction.

    The variable list of cross-references: SESSION.crossRefList then turned to the action page and appear in a list not ordered by < cfloop > as follows:

    <cfif SESSION.crossRefList NEQ "">
    <ul>
              <cfloop index="crossRefList" list="#FORM.crossRefList#" delimiters="#chr(13)##chr(10)#">
                <li><cfoutput>#crossRefList#</cfoutput></li>
              </cfloop>
            </ul>
    </cfif>
    

    Everything is fine with this exception: each page can have only one list or it may have 20 lists. And each list is launched with a brand name which is conveniently placed within a < h3 > tag.

    I'd love to be able to for the daughter of data entry to enter in this without having to actually place the first element of the list of < h3 > tags, however, it ezcapes me on how this could be done, since it is completely dynamic and the number if list items is unknown. Here is an example of these lists that I want to talk to, then you can see what I try to understand.

    Alpine
    SKY10
    
    Apollo
    Products Imager 100
    
    Best Hood
    K15
    
    Callisto
    3094071
    
    Cole-Parmer
    Compound Microscope
    Trinocular, Catalog No. A-48924-30
    
    Fenix
    3069061
    
    Helix
    3003051
    
    Kitchenaid
    
    Locos
    3072071
    
    Lumos
    3071071
    3093071
    
    Rumex
    3001061
    
    Solaris
    3043061
    
    Sunnex
    Flexible Halogen Light
    
    Thermadore
    Hood Light HG5W36TS
    

    I hope that all makes sense. Once again, the way that I have now, the daughter of data entry must type in < h3 > tags to the text in bold above will bring the correctly. I wish I could have this done for her so that she would not have to worry about this. Thanks for any help and if you need more info, let me know.
    OK well the text of the list above is to not translate well when I copied and pasted. The first item in each list must be bold, or in my code would be a < h3 > tag.

    Here is a complete example of what I was original to offer.  I'm worried about your solution using the delimiters of same to distinguish the different types of data.

    
    BrandGroup:product1|product2|product3
    A Brand:foobar|george|gracie
    Another Brand:something|something else|yet another, something
    
    
    
    
    
        

    #listFirst(BrandGroup,":")#

    • #product#

    This should produce the following output:

         

    BrandGroup

    • product1
    • product2
    • product3

    A Brand

    • foobar
    • george
    • gracie

    Another Brand

    • something
    • something else
    • yet another, something

    BrandGroup

    • Product1
    • Product2
    • Product3

    A brand

    • foobar
    • George
    • Gracie

    Another brand

    • something
    • something else
    • Yet one another, something
  • You want to animate a vector line on the edge - a simple way to achieve this?

    I have a logo I want to animate on the edge of a Web site.

    Its a line chart & I want to achieve the "hand-drawn" animation style for the header of the first page of a Web site.

    Y at - there no easy way to go about it - I can't find anything online! I'm using the wrong program?

    lulu_line_graphic.PNG

    Thank you

    You can use the Web to do.

  • I replace a website done previously before Page with a new site that I built in Dreamweaver, but wants to keep the URL address, what is the best way to achieve this?

    I replace a site is at the top with a new website that I'm building in Dreamweaver, but want to keep the same URL which is the best way to go about this?

    If you want to keep the same hosting provider, you have nothing to do. Just delete the old files of the site and download your new.

  • Best way to achieve this shadow effect?

    Im trying to recreate the shadow effect of the main content area on this site;

    http://www.CSSzengarden.com/?cssfile=196/196.CSS

    Is a filter drop shadow, the best way to do it and that I have to have 2 shadows or is it possible to make one appear on both sides?

    Thank you

    I think you want to just play with the settings of the shadow from the corner. The default angle puts the shadow to the lower right. You can move that kind of shadow is just below. Then play with the distance and the amount of fabric softener. This is a .png of Fireworks with some changed settings:

  • Is there a more easy/more simple way to achieve this?

    Good morning (afternoon to you, BluShadow).

    I got following exact, as you wish, output (derived from the EMP table):
    D10     D20     D30     PREZ    MGRS    ANALS   SALESM  CLERKS
    ------- ------- ------- ------- ------- ------- ------- -------
    CLARK   JONES   WARD    KING    BLAKE   FORD    ALLEN   ADAMS
    KING    FORD    TURNER          CLARK   SCOTT   MARTIN  JAMES
    MILLER  ADAMS   ALLEN           JONES           TURNER  MILLER
            SMITH   JAMES                           WARD    SMITH
            SCOTT   BLAKE
                    MARTIN
    by using the following query:
     with
       --
       -- pivoted departments  (haven't studied the Oracle PIVOT clause yet)
       --
       depts as
       (
        select max(case deptno
                     when 10 then ename
                   end)                                 as d10,
               max(case deptno
                     when 20 then ename
                   end)                                 as d20,
               max(case deptno
                     when 30 then ename
                   end)                                 as d30,
               rnd
          from (
                select deptno,
                       ename,
                       row_number() over (partition by deptno
                                              order by deptno)  rnd
                  from emp
               )
         group by rnd
         order by rnd
       ),
       --
       -- pivoted jobs
       --
       jobs as
       (
        select max(case job
                     when 'CLERK'         then ename
                   end)                                 as Clerks,
               max(case job
                     when 'PRESIDENT'     then ename
                   end)                                 as Prez,
               max(case job
                     when 'MANAGER'       then ename
                   end)                                 as Mgrs,
               max(case job
                     when 'ANALYST'       then ename
                   end)                                 as Anals,
               max(case job
                     when 'SALESMAN'      then ename
                   end)                                 as SalesM,
               rnj
          from (
                select job,
                       ename,
                       row_number() over (partition by job
                                              order by ename)   as rnj
                  from emp
               )
         group by rnj
         order by rnj
       )
    select d10,
           d20,
           d30,
           Prez,
           Mgrs,
           Anals,
           SalesM,
           Clerks
      from depts a full outer join jobs b
                                on a.rnd = b.rnj
     order by rnj, rnd;
    that takes a total of 5 selects to get there.

    I tried to find a query that would be, I hope more simple, easier and does not require as much selects. My last attempt is the following (which is closer to the desired result, but does not get a cigar yet):
    select case deptno
             when 10 then ename
           end                                 as d10,
           case deptno
             when 20 then ename
           end                                 as d20,
           case deptno
             when 30 then ename
           end                                 as d30,
           case job
             when 'CLERK'         then ename
           end                                 as Clerks,
           case job
             when 'PRESIDENT'     then ename
           end                                 as Prez,
           case job
             when 'MANAGER'       then ename
           end                                 as Mgrs,
           case job
             when 'ANALYST'       then ename
           end                                 as Anals,
           case job
             when 'SALESMAN'      then ename
           end                                 as SalesM,
           row_number() over (partition by deptno
                                  order by deptno)  as rnd,
           row_number() over (partition by job
                                  order by ename)   as rnj
      from emp
     order by rnj;
    The query above annoys me to this result which is encouraging, but... the brand:
    D10     D20     D30     CLERKS  PREZ    MGRS    ANALS   SALESM   RND  RNJ
    ------- ------- ------- ------- ------- ------- ------- ------- ---- ----
                    ALLEN                                   ALLEN      3    1
            ADAMS           ADAMS                                      2    1
                    BLAKE                   BLAKE                      6    1
    KING                            KING                               2    1
            FORD                                    FORD               1    1
            SCOTT                                   SCOTT              5    2
                    JAMES   JAMES                                      5    2
    CLARK                                   CLARK                      3    2
                    MARTIN                                  MARTIN     2    2
                    TURNER                                  TURNER     1    3
    MILLER                  MILLER                                     1    3
    
    D10     D20     D30     CLERKS  PREZ    MGRS    ANALS   SALESM   RND  RNJ
    ------- ------- ------- ------- ------- ------- ------- ------- ---- ----
            JONES                           JONES                      3    3
                    WARD                                    WARD       4    4
            SMITH           SMITH                                      4    4
    It uses a single SELECT statement and contains all the data that should be displayed, but I can't find a way to eliminate NULL values without losing a few jobs or departments

    Your help is welcome and appreciated,

    John.

    PS: I'll be perfectly happy to learn that there is no way more easy/simple. In other words, if the answer is simply "No, there no simpler or easier way", please let me know which is the case. (I ask that you be sure enough of that though, thank you)

    Published by: 440bx - 11 GR 2 on July 25, 2010 07:19 - added PS.

    According to the hoek' suggestion ;-)

    SQL> select d10, d20, d30, prez, mgrs, anals, salesm, clerks
      2    from (select row_number() over(partition by deptno order by ename) rn,
      3                 ename,
      4                 to_char(deptno) deptno
      5            from emp
      6          union all
      7          select row_number() over(partition by job order by ename),
      8                 ename,
      9                 job
     10            from emp) pivot(max(ename) for deptno in(10  d10,
     11                                                     20  d20,
     12                                                     30  d30,
     13                                                     'ANALYST'  anals,
     14                                                     'CLERK'  clerks,
     15                                                     'MANAGER'  mgrs,
     16                                                     'PRESIDENT'  prez,
     17                                                     'SALESMAN'  salesm))
     18   order by rn
     19  /
    
    D10        D20        D30        PREZ       MGRS       ANALS      SALESM     CLERKS
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
    CLARK      ADAMS      ALLEN      KING       BLAKE      FORD       ALLEN      ADAMS
    KING       FORD       BLAKE                 CLARK      SCOTT      MARTIN     JAMES
    MILLER     JONES      JAMES                 JONES                 TURNER     MILLER
               SCOTT      MARTIN                                      WARD       SMITH
               SMITH      TURNER
                          WARD
    
    6 rows selected.
    

    Best regards

    Maxim

  • What is the best way to achieve this?

    What is the best to do the following?

    Form1 lists items that have a cost value

    Form2 is a form of invoice

    What is the best way to export goods of a value of cost of form1 to form2?

    A user would be making selections of point in form1 and save the form, and then send it or export data.

    Then form2 would retrieve the selections point of form1 and display cost values that I can sum up at the end of the form2.

    Thanks in advance for any advice!

    Hello

    If both forms have the same objects to the items and the same names, then export to xml of form1 and import of xml in form2 should work.

    Data in the xml file that does not match the names of the objects to form2 will be ignored.

    In both forms, objects that you want to export/import must have their liaison, the normal/name of the object value > Bindings tab.

    Niall

  • Another way to achieve

    Hey guys, I have a container with 3 boxes aligned side by side within container using lists, the code shown below, I wonder how I can accomplish this by using 3 divs, not to mention the container instead of using lists.

    Thanks for the help

    {#bottomContent}
    margin: 0;
    padding: 0;
    Clear: both;
    }
    #bottomContent div {}
    float: left;
    Width: 300px;
    line-height: 1.8em;
    }
    #bottomContent div h3 {}
    margin: 0;
    do-size: 14px;
    padding: 0 0 0 10px;
    }
    #bottomContent div p {}
    display: list item;
    padding: 0 0 0 10px;
    line-height: 25px;
    list-style: none;
    }



    Left box


    Karima




    Middle box


    Karima




    Box to the right


    Karima



  • I've recently updated Firefox. Now, I can't clear the cache. It is grayed under Tools. Is there another way to do this?

    I can't clear the cache from the Firefox ' tools' drop.

    Same keyboard shortcut ("Ctrl + Shift + P") to enter, or tools > Options > "Start private browsing:" similar (stop or end) to stop him.

    See

  • Another way to do this (time, milliseconds)?

    Hi all

    are there other more "elegant"(without stringsubset) how do the thing next (I need milliseconds!): "."

    Use the search/Split String function. Only need 1. Just wire the 10 in the entry "offset"

  • Find the stock quantity of the previous year with another way...

    Hello
    I have a table with the following structure:
    create table stock_qties_items
    (subinv varchar2(10),item_code varchar2(10),period_name varchar2(5), qty_a number(5,2), qty_b number(5,2));
    alter table stock_qties_items
    add constraint stock_qties_items_pk primary key(subinv,item_code,period_name);
    and some data...
    insert into stock_qties_items
    values('01','410010010','01-08',10.50,0);
    insert into stock_qties_items
    values('01','410010010','02-08',19.30,10.35);
    insert into stock_qties_items
    values('01','410010010','03-08',3,0);
    insert into stock_qties_items
    values('02','410010010','03-08',8.54,1.90);
    insert into stock_qties_items
    values('03','410010010','03-08',120.45,1.25);
    insert into stock_qties_items
    values('03','410010010','04-08',502.10,6.50);
    insert into stock_qties_items
    values('03','410010010','05-08',5.05,6.20);
    insert into stock_qties_items
    values('03','410010010','08-08',19.35,65.90);
    insert into stock_qties_items
    values('02','410010010','10-08',40.85,5.20);
    insert into stock_qties_items
    values('03','410010010','12-08',75.20,90.15);
    insert into stock_qties_items
    values('02','410010020','12-08',60.55,0.85);
    insert into stock_qties_items
    values('01','410010020','07-08',100.90,10.05);
    insert into stock_qties_items
    values('01','410010010','01-09',8.95,0.05);
    insert into stock_qties_items
    values('02','410010010','01-09',88.95,100.05);
    insert into stock_qties_items
    values('03','410010020','01-09',91.05,0.05);
    insert into stock_qties_items
    values('04','410010020','01-09',11.75,10.05);
    insert into stock_qties_items
    values('04','410010010','03-09',1.75,110.40);
    insert into stock_qties_items
    values('04','410010010','05-09',0.75,10.40);
    insert into stock_qties_items
    values('04','410010025','03-09',1.75,90.00);
    insert into stock_qties_items
    values('04','410010025','07-09',51.75,190.00);
    insert into stock_qties_items
    values('04','410010010','09-09',62.15,10.05);
    insert into stock_qties_items
    values('04','410010010','10-09',39.15,0);
    The goal is to find the stock for the current year and previous year. I have accomplished with the following...
    select period_year,
               item_code,
               sqi1 stock_prev_year,
               sum(stock_curr_year) stock_curr_year
        from
        (
        select  to_char(to_date(substr(period_name,4,2),'RRRR'),'RRRR') period_year,
             item_code,
          (select sum(qty_a+qty_b)
                  from stock_qties_items sq
                  where sq.item_code=sqi.item_code
                 and to_char(to_date(to_number(substr(sqi.period_name,4,2)-1),'RRRR'),'RRRR')=
                        to_char(to_date(substr(sq.period_name,4,2),'RRRR'),'RRRR')
             ) sqi1,
             qty_a+qty_b stock_curr_year
         from stock_qties_items sqi
         )
         group by period_year,
               item_code,
               sqi1
    which generates the following output...
    PERIOD_YEAR ITEM_CODE  STOCK_PREV_YEAR STOCK_CURR_YEAR
    ----------- ---------- --------------- ---------------
    2008        410010020                           172,35
    2009        410010010           991,79          432,65
    2008        410010010                           991,79
    2009        410010025                            333,5
    2009        410010020           172,35           112,9
    Y at - it another way to achieve the same result, given that this table has a few million records and in this request a few other tables parameter should be added...?

    Note: I use Db 10 g v.2
    Thank you
    SIM

    Using the LAG function:

    SQL> with t as (
      2  select to_char(to_date(substr(period_name,4,2),'RRRR'),'RRRR') period_year,
      3  ITEM_CODE, sum(qty_a+qty_b) STOCK
      4  from stock_qties_items
      5  group by to_char(to_date(substr(period_name,4,2),'RRRR'),'RRRR'), ITEM_CODE
      6  )
      7  select period_year, ITEM_CODE,
      8  lag(stock) over (partition by ITEM_CODE order by period_year) stock_prev_year,
      9  stock stock_curr_year
     10  from t
     11  order by item_code, period_year;
    
    PERI ITEM_CODE  STOCK_PREV_YEAR STOCK_CURR_YEAR
    ---- ---------- --------------- ---------------
    2008 410010010                           991,79
    2009 410010010           991,79          432,65
    2008 410010020                           172,35
    2009 410010020           172,35           112,9
    2009 410010025                            333,5
    

    Max
    [My Italian oracle Blog | http://oracleitalia.wordpress.com/2010/01/30/compilazione-condizionale-in-plsql/]

  • Is there a another way to resize the browser to share window by dragging the corner?

    My Firefox window is slightly larger than the size of my desktop, so I put the hand on the corner down to resize the window horizontally. Y at - it a shortcut keyboard or another way to do this?

    • You can resize the window by dragging the cursor of the mouse on any part of the edge of the window, not just the lower corner.
    • Press Alt + space to display the window menu, press S to select the size option, use the arrow keys to resize the window and then Enter to confirm.
    • Click expand in the upper right of the window.
    • Click on the title bar and drag the window to the left, up, or the right edge of the desktop. For more information, see Aero snap.
    • Move the cursor to the upper edge or bottom of the window, until the cursor turns into a two-headed arrow, and then double-click the left button of the mouse.
  • What is the best way to get this layout of the chapter?

    I have a document which is now a large flow of pages.

    However, there are "chapters, in this 'book'. A 'chapter' actually starts on the right page. But I want the left page to participate in the design of the spread of the beginning 'chapter '. This means that left before the start page real "chapter" is reserved in control of layout and all "chapter" before that would end on a left page, needs a right-hand page empty inserted, after which the left page of the early-'chapter' spread follows.

    Now, I can do the pages on the left of the start "chapter" start a section and to correct even a page number. That it is positioned on the left side. But when I add pages from the previous section, this means I have to change the page numbers of the beginning of all the sections that follow hand.

    Are there not a better way to do this? Somehow I don't have to worry about the numbering of the pages myself while still getting the page before the "chapter" included in the section of this "chapter"?

    (I write "chapter" because these aren't chpaters Id in an Id book, but a few sections in a single document Id).

    If the previous "chapter ends with a page of pairs (left hand), you add two pages, if it ends on the right add you a..

    Another way to do this automatically is to set an Option to keep on the paragraph style that you use for the first paragraph on the page at beginning of chapter, then it will start the section on the next odd-numbered page.

  • not all no body no how to achieve this effect in ae or premiere pro cs5

    looking to see if any1 can help me achieve this effect for my music videos http://www.youtube.com/watch?v=xIBEl35_wB0 & feature = related is there a plug-in as fcp or an easy way to achieve this appreciate any help thanks...

    If you do not understand the answer you gave Andrew, so it is important to start at the beginning and learn the basics of After Effects first.

    Start here to learn After Effects.

Maybe you are looking for

  • Satellite Pro 6100 - unable to connect to the WLAN router

    Hello I brought a 2nd hand Satellite Pro, model version SP6100 (PS610E-029ZV-EN), P4 1.7 Ghz, 512 MB, 30 GB, with Windows 2000 Pro loaded. I can't connect to my wireless router. The switch is in the correct position. I want to change to XP using the

  • Read data from Excel

  • How to change the boot order in the BIOS?

    I have a gateway computer. I recently bought a WD My Book Essential external hard drive. It took me a while to change the setting to get the computer to boot with the connected outside of the bios.WD has maintained that the hard 'C' drive must be the

  • HP Envy Touchsmart 15-j181na SSD Bay

    Hello I have a HP Touchsmart Envy 15 - j181na with 1 TB SSHD, Intel i7 [email protected], 12.0 GB Dual Channel DDR3 @ 798 MHz. Inside the cover of the matinence, there is an empty Bay SSD in which I want to install an SSD. After reading several articles

  • Remove and check color HP PSC 1610 printer cartridge error message.

    Original title: remove and check color cartridge My printer HP PSC 1610 rpet 'Remove and check color cartridge'. After that, I press 'ok' and the message still appears. What is the problem with the printer? Thank you.