How  to exclude columns dynamic using group functions or any other function

i have a select that look like this
SELECT *
  FROM (SELECT DISTINCT gruposcomerciales.cod_gcomercial,
                        gruposcomerciales.descripcion,
                        DECODE (:0,
                                'OFICIAL', pbeoficialesjerarquia.oficial_id,
                                NULL
                               ) oficial_id,
                        DECODE (:0,
                                'BANCA', NULL,
                                pbeoficialesjerarquia.id_cluster
                               ) id_cluster,
                        pbeoficialesjerarquia.cod_banca
                   FROM grupos_comerciales gruposcomerciales,
                        clientes clientes,
                        clientes_oficiales clientesoficiales,
                        pbe_oficiales_jerarquia pbeoficialesjerarquia,
                        bancos_clientes bancosclientes
                  WHERE gruposcomerciales.cod_gcomercial =  bancosclientes.cod_gcomercial
                    AND clientes.ID = bancosclientes.cliente_id
                    AND clientes.ID = clientesoficiales.cliente_id
                    AND bancosclientes.cliente_id = clientesoficiales.cliente_id
                    AND bancosclientes.entidad_id = clientesoficiales.entidad_id
                    AND clientesoficiales.oficial_id = pbeoficialesjerarquia.oficial_id
                    AND gruposcomerciales.cod_gcomercial <> 'SINGRUPO100'
                    AND clientesoficiales.tipo_oficial = 'PRINCIPA'
                    AND bancosclientes.estado_clientes_ibs = 'ACTIVO') qrslt
WHERE (cod_banca = :1 AND id_cluster = :2 AND oficial_id = :3)This SQL duplicate rows so i use a distinct to exclude duplicate rows and decode to set null for columns that not are interested at runtime to avoid duplicate rows
I use decode to dynamicly set null (a way fo not show duplicate rows from colums)
If :0 is OFICIAL its show 3 columns values for oficial_id,cod_banca,id_cluster
if :0 is CLUSTER its show 2 columns values for cod_banca,id_cluster
There is a way to group by columns without take in consideration duplicate rows of other columns

If i do my query passing pameters to [b]OFICIAL_ID, ID_CLUSTER, AND COD_BANCA get this info
COD_GCOMERCIAL  DESCRIPCION                          OFICIAL_ID ID_CLUSTER COD_BANCA
==============  ===========                          ========== ========== =========
GRUPOALC1149     GRUPO ALCAP                          JESS329     39        BANCAEMP
GRUPOALQ533     GRUPO ALQUILERES NACIONALES          JESS329     39        BANCAEMP
GRUPOANA649     GRUPO ANA MARIA CHEN                 JESS329     39        BANCAEMP
GRUPOANC253     GRUPO ANCON                          JESS329     39        BANCAEMP
GRUPOARI104     GRUPO ARIAS Y DE LA GUARDIA          JESS329     39        BANCAEMP
GRUPOATL813     GRUPO ATLAS CORPORATION              JESS329     39        BANCAEMP
IF I pass parameters to ID_CLUSTER, AND COD_BANCA i get
COD_GCOMERCIAL  DESCRIPCION                          OFICIAL_ID ID_CLUSTER COD_BANCA
==============  ===========                          ========== ========== =========
GRUPOALC1149     GRUPO ALCAP                                    39        BANCAEMP
GRUPOALQ533     GRUPO ALQUILERES NACIONALES                    39        BANCAEMP
GRUPOANA649     GRUPO ANA MARIA CHEN                           39        BANCAEMP
GRUPOANC253     GRUPO ANCON                                    39        BANCAEMP
GRUPOARI104     GRUPO ARIAS Y DE LA GUARDIA                    39        BANCAEMP
GRUPOATL813     GRUPO ATLAS CORPORATION                        39        BANCAEMP
IF I pass parameters to COD_BANCA i get
COD_GCOMERCIAL  DESCRIPCION                          OFICIAL_ID ID_CLUSTER COD_BANCA
==============  ===========                          ========== ========== =========
GRUPOALC1149     GRUPO ALCAP                                            BANCAEMP
GRUPOALQ533     GRUPO ALQUILERES NACIONALES                            BANCAEMP
GRUPOANA649     GRUPO ANA MARIA CHEN                                   BANCAEMP
GRUPOANC253     GRUPO ANCON                                            BANCAEMP
GRUPOARI104     GRUPO ARIAS Y DE LA GUARDIA                            BANCAEMP
GRUPOATL813     GRUPO ATLAS CORPORATION                                BANCAEMPMy decode on select do this functionality of set null to columns because there are sometimes in wich oficial_id or id_cluster get rows
that i dont need take in consideration.
this get overhead on my select and on 10g using inline views by dblink not work fine
this decode on my select do this functionality
decode('OFICIAL', 'OFICIAL' , pbeoficialesjerarquia.oficial_id, NULL) oficial_id,
decode('OFICIAL', 'BANCA' , NULL, pbeoficialesjerarquia.id_cluster) id_cluster,
So i know oracle has a lot off grouping function some of this should help me to get this work
Tnx Warren

Similar Messages

  • Can my need be solved with a group calendar or any other function in Exchange/Outlook?

    I will try to express our need for our "Project Office" and is interested in how this can be solved using Outlook/Exchange.
    Our Project Office is in charge of several Projects and the Project Office Manager is interested to have a single calendar view with all activities for the different Projects.
    The Project leaders and the Project Office Manager also have other activities that they don't want to show up in the Project Office calendar. They do not want to register activities
    two times, one in the personal calendar and one in the Project Office calendar.
    A possible scenario could be to handle the Project Office calendar as a resource or a
    addressee that can be included in those activities that should be included in the Project Office calendar (with the difference that double bookings should be allowed).
    Scenario:
    Project Manager 1 invites to a steering group meeting for project A. She invites all participants,
    a room and the "Project Office calendar"
    Project manager 2 invites to a sprint demo for project B. He invites all participants, a room and also the "Project Office calendar"
    The Project Office manager (and others) can see all activities in the Project Office calendar. They can also use the calendar for planning so that important activities will not
    collide.
    Thanks for ideas in how to realize this scenario.

    Hi,
    I think we can consider to create a shared mailbox for the Project Managers. Then share the shared mailbox calendar for other users. To do it, we can try the following steps:
    1. Create a shared mailbox:
    New-Mailbox -Shared -Name "Projects" -DisplayName "Projects" -Alias Projects
    2. Assign Full access permission for project managers:
    Add-MailboxPermission -Identity Projects -User Manager1 -AccessRights FullAccess
    Add-MailboxPermission -Identity Projects -User Manager2 -AccessRights FullAccess
    3. If the “project Office Calendar” can be viewed by all users in your domain, we can change the default permission to Reviewer:
    Set-MailboxFolderPermission -Identity Projects:\Calendar -User Default -AccessRights Reviewer
    If you just want some specific users to view this calendar, please leave the default permission to None or AvailabilityOnly. We can create a distribution Group (security group) for these users and set permission to it:
    Add-MailboxFolderPermission -Identity Projects:\Calendar -User GroupUsers -AccessRights Reviewer
    Then Project managers can send all activities to this calendar and it is visible for all users.
    Regards,
    Winnie Liang
    TechNet Community Support

  • How to add column dynamically based on user input in oracle?

    **how to add column dynamically based on user input in oracle?**
    I am generating monthly report based on from_date to to_date below is my requirement sample table
    EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE | 01-OCT-12 | 02-OCT-12 | 03-OCT-12
    100001.............John...........02-OCT-12...............6
    100002.............chris...........01-OCT-12...............4
    Based on user input, that is, if user need the report from 01-OCT-12 TO 03-OCT-12, i need to add that dates as column in my table, like 01-OCT-12 | 02-OCT-12 | 03-OCT-12....
    below is my code
    create or replace
    procedure MONTHLY_LVE_NEW_REPORT_demo
    L_BUSINESS_UNIT IN SSHRMS_LEAVE_REQUEST_TRN.BUSINESS_UNIT%TYPE,
    --L_LEAVE_TYPE_CODE           IN SSHRMS_LEAVE_REQUEST_TRN.LEAVE_TYPE_CODE%TYPE,
    L_DEPARTMENT_CODE IN VARCHAR2,
    --L_MONTH                    IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
    L_FROM_DATE IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
    L_TO_DATE in SSHRMS_LEAVE_REQUEST_TRN.LVE_TO_DATE%type,
    MONTHRPT_CURSOR OUT SYS_REFCURSOR
    AS
    O_MONTHRPT_CURSOR_RPT clob;
    v_return_msg clob;
    BEGIN
    IF (L_BUSINESS_UNIT IS NOT NULL
    AND L_FROM_DATE IS NOT NULL
    and L_TO_DATE is not null
    -- AND L_DEPARTMENT_CODE IS NOT NULL
    THEN
    OPEN MONTHRPT_CURSOR FOR
    select EMPLOYEE_CODE, EMPLOYEE_NAME AS NAME, DEPARTMENT_CODE AS DEPARTMENT,DEPARTMENT_DESC, CREATED_DATE,
    NVL(WM_CONCAT(CL_RANGE),'') as CL_TAKEN_DATE,
    case when NVL(SUM(CL2),0)<0 then 0 else (NVL(SUM(CL2),0)) end as CL_BALANCE,
    from
    SELECT DISTINCT a.employee_code,
    a.EMPLOYEE_FIRST_NAME || ' ' || a.EMPLOYEE_LAST_NAME as EMPLOYEE_NAME,
    a.DEPARTMENT_CODE,
    a.DEPARTMENT_DESC,
    B.LEAVE_TYPE_CODE,
    B.LVE_UNITS_APPLIED,
    B.CREATED_DATE as CREATED_DATE,
    DECODE(b.leave_type_code,'CL',SSHRMS_LVE_BUSINESSDAY(L_BUSINESS_UNIT,to_char(b.lve_from_date,'mm/dd/yyyy'), to_char(b.lve_to_date,'mm/dd/yyyy'))) CL_RANGE,
    DECODE(B.LEAVE_TYPE_CODE,'CL',B.LVE_UNITS_APPLIED)CL1,
    b.status
    from SSHRMS_EMPLOYEE_DATA a
    join
    SSHRMS_LEAVE_BALANCE C
    on a.EMPLOYEE_CODE = C.EMPLOYEE_CODE
    and C.STATUS = 'Y'
    left join
    SSHRMS_LEAVE_REQUEST_TRN B
    on
    B.EMPLOYEE_CODE=C.EMPLOYEE_CODE
    and c.EMPLOYEE_CODE = b.EMPLOYEE_CODE
    and B.LEAVE_TYPE_CODE = C.LEAVE_TYPE_CODE
    and B.STATUS in ('A','P','C')
    and (B.LVE_FROM_DATE >= TO_DATE(L_FROM_DATE, 'DD/MON/RRRR')
    and B.LVE_TO_DATE <= TO_DATE(L_TO_DATE, 'DD/MON/RRRR'))
    join
    SSHRMS_LEAVE_REQUEST_TRN D
    on a.EMPLOYEE_CODE = D.EMPLOYEE_CODE
    and D.LEAVE_TYPE_CODE in ('CL')
    AND D.LEAVE_TYPE_CODE IS NOT NULL
    group by EMPLOYEE_CODE, EMPLOYEE_NAME, DEPARTMENT_CODE, DEPARTMENT_DESC, CREATED_DATE
    else
    v_return_msg:='Field should not be empty';
    end if;
    END;
    my code actual output
    EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE
    100001....................John............02-OCT-12.................6
    100001....................chris...........01-OCT-12.................4
    how to add column dynamically based on from_date to to_date?
    Thanks and Regards,
    Chris Jerome.

    You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);

  • How can I deploy EFS using Group Policy and automatically encrypt computers for ALL users who login?

    How can I deploy EFS using Group Policy and Active Directory with a goal to automatically encrypt computers for ALL users who login? (NOT an option for me to use BitLocker)
    I was asked to deploy EFS to encrypt the user my documents folder and profile on all of the users laptops. The laptops are in common areas (board meeting rooms, etc) and security of files is a must.
    I successfully created a recovery certificate in AD. I created an OU and setup an EFS policy and users can now login and select to encrypt their own files. The issue is that management would like to have automaticy Encrypt ALL users my documents AUTOMATICALLY
    when a user login.
    Can this be done?
    Please help

    Hi,
    Any update?
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
    Best Regards,
    Andy Qi
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Andy Qi
    TechNet Community Support

  • My iPhone 4 Bluetooth, using ios7, cannot identify any other bluetooth device (even other apple products). Says device not supported. How to solve this problem?

    My iPhone 4 Bluetooth, using ios7, cannot identify any other bluetooth device (even other apple products). Says device not supported. How to solve this problem?

    Supported Bluetooth Profiles
    It is not supposed to detect other Apple products via Bluetooth.

  • Does my macbook air have a built in virus scan?  how can I access and use it? also any recommendations of what software if this is not avail ?

    does my macbook air have a built in virus scan?  how can I access and use it? also any recommendations of what software if this is not avail ?

    Contrary to what Geeks on Hugs is telling you, Mac OS X does indeed have a basic malware scanner. It is not a feature that is directly accessible to the user, and works a bit differently than every other malware scanner out there. Gatekeeper, which has been mentioned here, is entirely separate, and provides a different method for helping to protect you against malware.
    The anti-malware scanner in Mac OS X is called XProtect. When you download an application (or any other kind of executable code), it is automatically "quarantined," so that when you open it you're asked if you really want to do that. I'm sure you're very familiar with this aspect of Mac OS X if you have ever downloaded any apps from outside the App Store. What you don't know, though, is that each time you try to open a new app, that app is checked by XProtect. If it is identified as malware, you will not be allowed to open it, and will be warned that it's malware.
    At this time, there is no known malware that can infect a properly up-to-date Mac. All current malware will be blocked by one or more methods.
    For more information, see my Mac Malware Guide.
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com.)

  • How to change tax code in sc with BAPI_SCEC_CREATE or other function

    I'm creating shoppingcarts with BAPI_SCEC_CREATE but I can't figure out how I can give a taxcode to the function or with any other function like BBP_PD_SC_UPDATE?
    anybody got a clue how to change the taxcode of a shoppingcart ?
    kind regards
    arthur

    haven't looked correctly, in BBP_PD_SC_UPDATE
    it is possible to change the tax code

  • Use Group Policy to prevent other network connections

    I need to define a Group Policy which says that IF a user is in the companys Domain network that no other connections are avaiable. So if the user is not connected to the Domain network he should be able to connect to any network he wants.
    Are there any possible solutions to this?
    Best regards.

    Hi,
    >>Use Group Policy to prevent other network connections
    As far as I know, group policy can’t help us do this. However, when a user is in the company and there is just domain network, he or she may not be able to connect to other
    network.
    Best regards,
    Frank Shen

  • When I try to use Mac Help or any other help menu, the help window opens up but it is empty.  How do I resolve this issue?

    When I try to use Mac Help or any other help menu, the help window opens up but it is empty.  How do I resolve this issue?

    Try moving these files to the Trash one at a time and test (but don't empty yet.)
    /Users/yourusername/Library/Preferences/com.apple.helpviewer.plist
    /Users/yourusername/Library/Preferences/com.apple.helpviewer.LSSharedFileList.pl ist
    If doing this doesn't help, then navigate to this location and delete the cache (but not the enclosing folder.)
    /Users/yourusername/Library/Caches/com.apple.helpviewer
    All are located in your home folder Library.

  • Hi there!!I have an emergency question,my friend has forgot his ipad 4 password,how can he use his ipad?any other ways expect restore??

    Hi,my friend has forgot his ipad 4 password,how can he use his ipad?any other ways expect restore??

    Forgotten passcode (Recovery Mode)
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3. While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button.
    5. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.

  • Can we achieve like functionality with any other way

    Hi experts,
    Can any one explain how to achieve the results we get using like operator in any other alternate way
    looking for response
    regards
    naidu

    REGEXP_SUBSTR
    First, here is my query with LIKE...
    SQL> SELECT * FROM scott.emp
      2  WHERE ename LIKE 'J%ES';
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
    2 rows selected...and here is the same logic with REG_SUBSTR
    SQL> SELECT * FROM scott.emp
      2  WHERE REGEXP_SUBSTR ( ename, '^J.*ES$') IS NOT NULL;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
    2 rows selected.There is a REGEXP_LIKE, too, but I avoided it because it contains the word "LIKE" ;)

  • How to iterate  xml dynamically using pl/sql

    Example :--
    example data will be stored in one column using clob.
    <?xml version="1.0"?>
    <PO pono="2">
    <PNAME>Po_2</PNAME>
    <CUSTNAME>Nance</CUSTNAME>
    <SHIPADDR>
    <STREET>2 Avocet Drive</STREET>
    <CITY>Redwood Shores</CITY>
    <STATE>CA</STATE>
    </SHIPADDR>
    </PO>
    HOw will you get dynamically for shipaddr
    2 Avocet Drive
    Redwood Shores
    CA
    With Regards,
    L.Rajesh
    Edited by: LRAJESH on Aug 30, 2010 9:52 AM

    You mentioned plsql...so here is an example iterating over POs:
    begin
    for rec in (with q as(select xmltype('<?xml version="1.0"?>
                                           <PO_LIST>
                                            <PO pono="2">
                                             <PNAME>Po_2</PNAME>
                                             <CUSTNAME>Nance</CUSTNAME>
                                             <SHIPADDR>
                                              <STREET>2 Avocet Drive</STREET>
                                              <CITY>Redwood Shores</CITY>
                                              <STATE>CA</STATE>
                                             </SHIPADDR>
                                            </PO>
                                            <PO pono="3">
                                             <PNAME>Po_3</PNAME>
                                             <CUSTNAME>Smith</CUSTNAME>
                                             <SHIPADDR>
                                              <STREET>5 West Drive</STREET>
                                              <CITY>San Francisco</CITY>
                                              <STATE>CA</STATE>
                                             </SHIPADDR>
                                            </PO>
                                           </PO_LIST>') the_xml from dual)  
                 select x.street, x.city, x.state
                   from q,  --your table here
                        XMLTable(
                         'PO_LIST/PO/SHIPADDR'   --note I have wrapped POs in a PO_LIST tag
                         passing q.the_xml  --your clob here
                         columns
                          street varchar2(1000) path 'STREET',
                          city varchar2(1000) path 'CITY',
                          state varchar2(1000) path 'STATE'
                        ) x)
      loop
       dbms_output.put_line(rec.street||' -- '||rec.city||' -- '||rec.state);
    end loop;
    end;Edited by: dmars on Aug 30, 2010 1:39 PM

  • Sorting columns dynamically using Presentation Variables

    Hi,
    I have 4 measures say A,B,C,D , a period dimension and branch name dimension. I would like to select the measure in the prompt and the result should display rank for the selected measure using presentation variables. For eg: If measure-A is selected, the result should be arranged in order by based on "A".
    Is it possible to sort the columns dynamically?
    Kindly help me.
    Regards,
    RB

    Hi RB,
    You can do that, though it's a bit more complicated than a simple SQL statement. For example:
    WITH BASEDATA AS (
    SELECT
      EMPNO,
      ENAME,
      MGR,
      SAL,
      COMM,
      CASE WHEN :P4_SORT_ORDER = 1 THEN
        ROW_NUMBER() OVER (ORDER BY UPPER(ENAME))
      WHEN :P4_SORT_ORDER = 2 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR))
      WHEN :P4_SORT_ORDER = 3 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR), UPPER(ENAME))
      WHEN :P4_SORT_ORDER = 4 THEN
        ROW_NUMBER() OVER (ORDER BY UPPER(ENAME) DESC)
      WHEN :P4_SORT_ORDER = 5 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR) DESC)
      WHEN :P4_SORT_ORDER = 6 THEN
        ROW_NUMBER() OVER (ORDER BY (SELECT NVL(MIN(UPPER(E2.ENAME)),'-Select-') FROM EMP E2 WHERE E2.EMPNO = EMP.MGR) DESC, UPPER(ENAME) DESC)
      END SORTITEM,
      'O' STATUS
    FROM
      EMP
    SELECT
      EMPNO, 
      ENAME,
      MGR,
      SAL,
      COMM
    FROM
      BASEDATA
    ORDER BY
      SORTITEMUsing a CASE statement this assigns a ROW_NUMBER to every record based on its ordering within the selected ORDER BY clause. The output is then sorted by this value.
    Andy

  • Want to sort the columns while using GROUP BY ROLLUP.

    Want to order the below query using by "News' column in descending order and "Email address" column in Ascending order.
    Note: Sorting should not bring Total value to top. It is happening now.
    {code}
    SELECT decode(grouping(NVL(Client, 'NA')),1, 'Totals', NVL(Client, 'NA')) "Email (Login ID)",
    Location "Location",
    SUM(News) "News",
    SUM(Website) "Website",
    FROM VW_FX_USERDATA
    GROUP BY ROLLUP (((NVL(Client, 'NA')),Location,1, 'Totals', NVL(Client, 'NA')))
    {code}
    PLease let me know if you need any details.
    Edited by: Nagaraja Akkivalli on Sep 23, 2011 4:04 PM

    Thanks hm,
    Let me explain bit clearly.
    Say I am getting resultset as below.When I am executing above mentioned query.
    Client*        Location    News      Website       Total
    ABC        YD           9     0           4
    BCD        HB           12     7           13
    CDE        SI            1     18           3
    JNM        BI          25     0           4
    ZZZ        TI          0     221           77
    XYZ        TT          0     1           1
    Totals                      47     247           435I want it to as below. Here records are sorted in the descending order of the News Count and then Client*
    Client*        Location    News      Website       Total
    JNM        BI          25     0           4
    BCD        HB           12     7           13
    ABC        YD           9     0           4
    CDE        SI            1     18           3
    XYZ        TT          0     1           1
    ZZZ        TI          0     221           77
    Totals                      47     247           435If I order the column by News in the descending order, it is taking Totals value to the top. (Since I am using GROUP BY ROLLUP).
    Note: Sorting should not be applied to Totals.
    Hope this is clear to you. Let me know if you need any details.
    Thanks and Regards
    Nagaraja Akkivalli.

  • How to display column specified in group by clause only once?

    I've a result coming out of a sql query that uses group by clause as follows:
    2008-07-25 19" LCD Screen 5
    2008-07-25 HP Printer     4
    2008-08-01 Hanging Files 11
    2008-08-01 Stapler     3
    2008-08-15 19" LCD Screen 5
    2008-08-15 Hanging Files 14
    What should I do in the query to display the result set as follows:
    2008-07-25 19" LCD Screen 5
         HP Printer     4
    2008-08-01 Hanging Files 11
         Stapler     3
    2008-08-15 19" LCD Screen 5
    Hanging Files 14

    Hi,
    That's a display issue, and display issues are best handled by the front end.
    What is your frone end?
    If it's SQL*Plus, you can use the BREAK command.
    For example:
    BREAK ON  deptno     NODUPLICATES
    SELECT       deptno
    ,       ename
    FROM       scott.emp
    ORDER BY  deptno
    ,            ename
    ;Output:
    `   DEPTNO ENAME
            10 CLARK
               KING
               MILLER
            20 ADAMS
               FORD
               JONES
               SCOTT
               SMITH
            30 ALLEN
               BLAKE
               JAMES
               MARTIN
               TURNER
               WARDNote that deptno is never NULL: KING and MILLER have deptno=10; but it doesn't show in the display, because it's the same as the deptno on the previous row.
    NODUPLICATES is actually the default, so you could just say
    BREAK ON deptnoThe BREAK command remains in force until you end the session (or un-do it, e.g. with "CLEAR BREAKS")
    Remember to issue the BREAK command at least once in the session before running the query.
    To get the same results in SQL, use the analytic ROW_NUMBER function.

Maybe you are looking for

  • Re:Linking between the two components.

    Hi Friends, How to link a view in one component to the other component and the view in the second component should be read only..For example am having a submit button in first component when I click on the submit button the second component Approve b

  • Macbook freezes when I start phoning via Skype

    Macbook freezes when I start phoning via Skype but it’s continuing ringing. Here’s the log file for this time 23.11.13 17:26:54,943 xpcproxy[16877]: assertion failed: 13A603: xpcproxy + 3438 [EE7817B0-1FA1-3603-B88A-BD5E595DA86F]: 0x2 23.11.13 17:26:

  • Photos Out of Sequence in Sub-Folders in iPad Photos App

    I use my iPad when working with ballplayers. Specifically, I use the Photos app with sub-folders for each set of photos. I have tens of thousands of photos in a hundred or so folders. It's very important that the photo albums be in numerical order (t

  • List Split icons

    In dreamweaver CS6 - In the JQuery Mobile swatches, the List Split Icons are not displaying,  even once data-split-icon is allocated. Anyone else having this issue?

  • Maintenance strategies in Spanish

    We are preparing to roll out SAP plant maintenance in a plant in Chile and are verifying the routine and preventative process works properly when using the Spanish language pack. When creating a maintenance plan with IP01 while logged in with Spanish