Group By Date and Task

Hi Guys,
I have got a report and It was long query to get the data but now I am stuck as I tried to sort it by date but no luck.
I want to sort it so it only shows one date and sum all the tasks on that date.

Hi Mo Yusuf,
Per my understanding that you have sort by the ansactionDate field and want to groub by this field to sum all the task of the same date but failed, right?
Please find details information below about how to add the row group for the ansaction date and sum of the task in the report design:
Right click the field task and select the add group--Row Group to add Parent group like below:
Click to select the task under the task field you will get the "=Sum(Fields!task.Value)" which will sum the task based on the scope of ansactiondate, you can also use the expression "=Sum(Fields!task.Value,"ansactiondate")"
to include the scope of the sum function:
If I have some misunderstanding, please try to provide some sample data in the table and the query you are currently using in the dataset and more details information about the expect result you want to get.
Regards,
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support

Similar Messages

  • Create Report on List , group by data and email as PDF

    Hi ,
    I have a survey List , that contain 7 Question and each question have 5 possible answers (Radio Button , between Strongly agree to strongly Disagree).
    How can I create a report on the list , and send the email to instructors that are also stored in List .
    How can we create a report with group by clause and send as a PDF in attachment?
    Thanks

    You have to programmatically convert all content to PDF and then email it.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/9e38ed97-5156-448d-af71-cf5e949535d6/how-can-i-export-sharepoint-list-item-form-view-to-word-or-pdf?forum=sharepointcustomizationprevious
    Try below 3rd party
    http://blog.muhimbi.com/2010/08/converting-sharepoint-lists-to-pdf.html

  • Real Finish Date and Task Completion Percentage

    Hi, Working With Project Server 2013,
    User enter Task Progress setting the fields:
    Percent Complete: 100%
    But also changes the Finish Date to a later day.
    And Hit "Send"
    This is the information the PL gets, accepts and publishes.
    If the user sees the task again on Tasks he sees a recalculated % percentage and not the 100% that he entered in the first place.
    If the user doesn't change the finish date the 100% percent is not recalculated.
    This behaviour is not seen on PS2010.
    Is this by design on PS2013? is it configurable?

    Andres --
    In either Microsoft Project 2010 or 2013, if you enter a % Complete value of 100% for a task, and then change the Duration of the task, Microsoft Project will recalculate the % Complete value, reducing it from 100%.  This is the default behavior of
    the desktop tool, and Project Server 2013 mimics that behavior.  I cannot test Project Server 2010 for this behavior, since I do not have an instance available to me where I can change the method of tracking to % of Work Complete.
    To answer your second question, no, the Finish field is NOT the same as the Actual Finish field.  In your situation, I would recommend that you add both the Actual Start and Actual Finish fields to the following views in PWA:
    My Work view in the Timesheet section
    Details view in the My Work section
    My Assignments view in the My Work section
    The process for using the above field with the % Work Complete method of tracking progress would be as follows:
    When a team member begins work on a new task, the team member enters that date in the Actual Start field.
    Each week the team member enters their estimated task progress in the % Work Complete field.
    When a team member completes work on a task, the team member enters that date in the Actual Finish field (they DO NOT need to enter 100% in the % Work Complete field as the software will assume the task is completed by entering an Actual Finish date).
    This is the process that we recommended to all of our clients who use the % of Work Complete method of tracking progress.  Using this method gives you more accurate tracking, and will eliminate the problems you have experienced with Project Server 2013.
    Hope this helps.
    Dale A. Howard [MVP]

  • Finding Groups of Data and Treat as a Single Occurrence

    Hi. I have data that looks like the following:
    ORDER#, ORD_TYPE, LINE#, PROD_CD
    120 SO 1 56A
    120 SO 2 56A
    120 SO 3 55B
    121 SO 1 56A
    56A and 55B can be grouped together and is treated as one occurrence within Order# 120 (because 56A and 55B are the same Product). Likewise for Order# 121.
    Expected result (CNT columns added):
    ORDER#, ORD_TYPE LINE#, PROD_CD, ORD_CNT, PROD_CD_OCCUR_CNT
    120 SO 1 56A 1 1
    120 SO 2 56A 0 0
    120 SO 3 55B 0 0
    121 SO 1 56A 1 1
    Can the expected result be achieved using a single SQL statement? Will analytics do this for me?
    Thanks in advance for the tips and help.

    I modified the suggested SQL statement against my dataset. The desired result is to not tally the number of lines, but rather indicate by Order# if there is at least one occurrence of the specified Product Code (56A,55B). If there is at least one occurrence, set the COUNT column to 1 (equivalent to setting a flag column to 'Y').
    I provided more examples. Any Order#s that have Product Code of 56A or 55B will be grouped and can be considered as having one occurrence for that Order and flag only one row in that Order (set all other rows to 0 for that Order). This means the PROD_CNT column can be set to 1 (or flagged as Yes).
    For any Product Codes that are not 56A or 55B, its count = 0.
    (sorry, i don't know how to change the font of the below text to courier. the format is off, but hopefully you can still get the gist of it...)
    ORDER# ORD_TYPE LINE# PROD_CD
    120 SO 101 56A
    120 SO 201 56A
    120 SO 202 55B
    121 SO 100 56A
    121 SO 101 60
    122 SO 100 60
    122 SO 100 61
    ORDER# ORD_TYPE LINE# PROD_CD PROD_CNT
    120 SO 101 56A 1
    120 SO 201 56A 0
    120 SO 202 55B 0
    121 SO 100 56A 1
    121 SO 101 60 0
    122 SO 100 60 0
    122 SO 100 61 0
    Thanks.

  • Group by date and print for every week

    Crystal defaults to using Sunday-Saturday as its weekly breakdown when grouping.  I need to group by week but need to show a Monday-Saturday week.  Any help will be appreciated.
    Thanks,
    John

    I figured it out. I grouped on a formula containing:
    datediff("ww",date(year(currentdate),1,1),{PR_GLDET.Pay_Date},crMonday)

  • TDMS - Writing a "Group" with data timestamp and values

    I'm trying to make building my trends from timewaveform max/mins easier.  Right now I have two TDMS groups: Measurement Data and Events.  Measurement data is the timewaveform data for all 32 channels.  The events group has two channels: Timestamps and Trend Data.  Is there a better way to organize these groups to build my trends easier.  Ideally I would want my data sent to my trend plot to have Measurement Data (Channel Name), Events (Timestamp), Events (Trend Data).
    What I want is similiar to what is contained in a waveform (to, dt, y) except I have a varying to and don't need the dt.
    This post may not make much sense, but I've found it much more difficult to build these trends then I think it needs to be.

    Hi LabViewer35242,
    I do not completely understand your question, would you provide some diagram, or code that you are working on?
    I would like to better understand this issue.  Here you can find a TDMS tutorial.
    Regards,
    steve.bm
    AE | NI

  • TSQL query to calculate Count / Sum grouping by date on a Pivot Table

    Hi All
    I need help to group the pivot table output to group by dates and sum/count the values. I have a table like shown below.
    Date
    Student 
    Subject
    Hunt
    Marks
    18/02/2014
    Sam 
    Maths
    1
    20
    18/02/2014
    Sam 
    Maths
    1
    10
    18/02/2014
    Sam 
    Maths
    2
    30
    18/02/2014
    Luke
    Science
    1
    50
    17/02/2014
    Sam 
    Maths
    2
    50
    17/02/2014
    Luke
    Science
    2
    60
    16/02/2014
    Luke
    Science
    2
    20
    16/02/2014
    Luke
    Science
    3
    20
    I want to Group by dates and move the Hunt to columns calculating their counts and sum their marks too. Like given below.
    I wrote a pivot query like below but If i group it with dates and calculate the total marks it throws aggregate errors.
    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    select [DATE] , [Student], [Subject] ,[1],[2],[3],[4],Total =([1]+[2]+[3]+[4])
    from
    ( select [Date], [Student], [Subject],[Hunt],[Marks] from Student_Log
    )x
    pivot
    count ( [Hunt]) for [Hunt]
    in ([1],[2],[3],[4])
    )p
    order by [Date] desc
    I have done this far only. More than this I need to enhance it with the Percentage of Hunts for each Student.
    ie like below table.
    On 18th Sam in Maths he had 2 rows on 1st hunt  and 1 row on 2nd hunt. So On the Pivot table is it possible to represent it on percentage using the Total Attempts column.
    Thanks a lot in advance.
    Its runnung in SQL 2000 Server.

    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    ;with mycte as
    Select [Date], [Student], [Subject] ,
    Count(CASE WHEN [Hunt]=1 Then Hunt End) as Hunt1,
    Count(CASE WHEN [Hunt]=2 Then Hunt End) as Hunt2,
    Count(CASE WHEN [Hunt]=3 Then Hunt End) as Hunt3,
    Count(CASE WHEN [Hunt]=4 Then Hunt End) as Hunt4,
    Count(CASE WHEN [Hunt]=1 Then Hunt End)
    +Count(CASE WHEN [Hunt]=2 Then Hunt End)
    +Count(CASE WHEN [Hunt]=3 Then Hunt End)+
    +Count(CASE WHEN [Hunt]=4 Then Hunt End) as Total,
    ISNULL(SUM(CASE WHEN [Hunt]=1 Then Marks End),0) as Mark1,
    ISNULL(SUM(CASE WHEN [Hunt]=2 Then Marks End),0) as Mark2,
    ISNULL(SUM(CASE WHEN [Hunt]=3 Then Marks End),0) as Mark3,
    ISNULL(SUM(CASE WHEN [Hunt]=4 Then Marks End),0) as Mark4
    from Student_Log
    Group By [Date], [Student], [Subject]
    Select [Date], [Student], [Subject]
    , Cast(Hunt1*1./Total*100 as int) as [1]
    , Cast(Hunt2*1./Total*100 as int) as [2]
    ,Cast(Hunt3*1./Total*100 as int) as [3]
    ,Cast(Hunt4*1./Total*100 as int) as [4]
    ,Total,Marks=( Mark1+Mark2+Mark3+Mark4)
    from mycte
    order by [Date] DESC, Student desc
    drop table Student_Log

  • ST03 Export: How to export all instances and task types?

    I am exporting ST03 data using SAP GUI
    I can export data for a single task type and a single instance.Is there a way I can export the Time Profile data for all instances and all task types in a single export? Can I do a single export rather than NxM exports?
    Also, when I export to a text file, there is a header that reports the instance, data, and task type. When I export to excel file I only get the table, not the header info. Is there a way to to get the header info into the excel export?
    Is this the appropriate forum for these questions?
    Any help is appreciated.
    Thanks.
    Tim

    I moved this question to an ABAP forum. Here's the [thread|ST03 Export: How to export all instances and task types?;.
    Tim

  • SSRS Report Group By Vertical and Horizontally with Detail Data

    Dears,
    I am expecting your help to achieve blow task in SQL Reporting Service. I am pulling data from a SharePoint List and my data set looks like below; and, I need to show those data in following layout;
    Group by: Destination and Week (vertical, horizontal)
    Detail : JobNo and VessleName (no aggregation and should show detail text data)
    How could I show that in SSRS Report? I tried Matrix and couldn’t get that layout yet; it shows me always 1<sup>st</sup> Job NO and Vessel Name for each Destination, not showing the rest.
    Kindly share with me guide lines attached is for your reference.
    ASP.Net, C#.Net, SQL Server ,Win32

    Dear Ricardo,
    I was trying your project with my real data and was not success.
    Also, when I check in details with my test data, I saw that Job2 is missing in your output.
    I can not find any reason why it is missing, could you please tell me what could be the reason?
    Also, it takes first lines of each Destination form below data as well, appropriate if you can test below data also.
    with SampleTable(Destination,WekkNo, JobNo, VesseName, ATA)
    as
     Select 'GENOA-ITGOA' , '7','J507979', 'AL BAHIA', '14/2/15' Union All  
     Select 'GENOA-ITGOA' , '7','J507981', 'AL BAHIA', '14/2/15' Union All  
     Select 'GENOA-ITGOA' , '7','J508342', 'SABYA', '14/2/15' Union All  
     Select 'GENOA-ITGOA' , '7','J508343', 'SABYA', '14/2/15' Union All  
     Select 'GENOA-ITGOA2' , '7','J508418', 'SABYA', '14/2/15' Union All  
     Select 'GENOA-ITGOA2' , '7','J508342', 'SUDAIR', '14/2/15' Union All  
     Select 'GENOA-ITGOA2' , '7','J508343', 'SUDAIR', '14/2/15' Union All  
     Select 'GENOA-ITGOA' , '8','J508418', 'SUDAIR', '20/2/15' Union All  
     Select 'GENOA-ITGOA' , '8','J508606', 'JAZAN', '20/2/15' Union All  
     Select 'GENOA-ITGOA' , '8','J508607', 'JAZAN', '20/2/15' Union All  
     Select 'GENOA-ITGOA2' , '8','J508608', 'JAZAN', '20/2/15' Union All  
     Select 'GENOA-ITGOA2' , '8','J509006', 'HANJIN ELIZABETH', '20/2/15' Union All  
     Select 'GENOA-ITGOA' , '8','J509007', 'HANJIN ELIZABETH', '20/2/15' Union All  
     Select 'GENOA-ITGOA' , '8','J509129', 'HANJIN MALTA', '20/2/15' Union All  
     Select 'GENOA-ITGOA2' , '10','J509130', 'HANJIN MALTA', '7/3/15' Union All  
     Select 'GENOA-ITGOA2' , '10','J509326', 'SUDAIR', '7/3/15' Union All  
     Select 'GENOA-ITGOA' , '10','J509327', 'SUDAIR', '7/3/15' 
    Select * from SampleTable
    ASP.Net, C#.Net, SQL Server ,Win32

  • Consolidation Group in Target Cube (Data Collection Task)

    Dear Experts,
    In consolidation Monitor, While doing Data Collection task via Load from Data Stream, after doing Updation, WHen I see the content of Target InfoCube in RSA1, In GL account Line item I do not get COnsolidation Group Value.
    Like
    GL account   Company  CCode  Cons Group  Currency  PV LC    PV GC
    100000           3000         3000     (Blank)          USD         1000      44000
    1) Is it necessary to Have Value in Consolidation Group?
    2) If Yes, What is the utility and how to get value in this column.?
    Regards
    Ritesh M.

    No, ConsGoups are determined later, during the ConsGroup-dependent tasks.

  • Read from sql task and send to data flow task - [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

    I have created a execut sql task -
    In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'
    Resultset=resultname=0 and variablename=empidvar
    I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?
    I am getting an error.
    [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.
    [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.

    shouldnt setting be Result
    Set=Full Resultset as your query returns a resultset? also i think variable to be mapped should be of object type.
    Then for data flow task also you need to put it inside a ForEachLoop based on ADO.NET recordset and map your earlier variable inside it so as to iterate for every value the sql task returns.
    Also if using SP in oledb source make sure you read this
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I deactivate the pricing date and material pricing group in VA01?

    Hello All,
    How can I deactivate (output only) the pricing date and material pricing group field in VA01/2, VA21/2, and VA41/2? What user exit can I use? Thanks in advance...
    PeeJay

    You can use the t.code SHD0, choose your transaction variant here, further choose your screen variant.
    Next select your screen variant and in the Menu bar select Variant> change with processing>Make repairs in foreign namespaces only if they are urgent> Continue(Enter)>again 'enter'>Object can only be created in SAP package>continue(enter)> Exit and save >This variant contains other screens, adopt these as well?>enter>enter>  scroll down to the entry 'pricing date' or VBKD-PRSDT make the necessary changes and save.
    The system will prompt to assign a package and request enter the necessary values.
    Your issue is sorted!!
    Regards,
    PATHIK

  • Best way to group data and show details of only last result in group

    Hi All! First off, just letting everyone know that this is a great place to explore and learn Oracle - I've learned more here than I have in some classes. Just exploring the forums and searching for an answer leads me to functions that I hadn't otherwise known existed.
    Here's what I'm looking to accomplish now... let's say I have a table that holds family information - if two or more persons are related in a family (determined by a separate table) then it should return the person identification and then the details of the group.
    For instance, the following data is contained in two tables, the current result follow and then the result I'm looking for...
    PERSONS TABLE
    PERSON         PERSON_ID           ADDRESS
    John Smith     101                     1 Oracle Drive
    Jane Smith     102                     1 Oracle Drive
    RELATIONSHIPS TABLE
    PERSON_ID      RELATEDPERSON_ID
    101                 102
    102                 101A simple query would result in the following:
    WITH PERSONS AS
      SELECT 'John Smith' AS person, 101 AS person_id, '101 Oracle Drive' AS address FROM dual union all
      SELECT 'Jane Smith', 102, '101 Oracle Drive' FROM dual
    ,    RELATIONSHIPS AS
      SELECT 101 AS person_id, 102 AS relatedperson_id FROM dual union all
      SELECT 102, 101 FROM dual
    SELECT
        person
      , address
    FROM  PERSONS p
    JOIN  RELATIONSHIPS r ON r.person_id = p.person_idRESULT
    PERSON      ADDRESS
    John Smith      101 Oracle Drive
    Jane Smith      101 Oracle DriveI'm looking to generate the following result but I'm not sure how to accomplish this... I'm confident it's something simple.
    DESIRED RESULT
    PERSON      ADDRESS
    John Smith     
    Jane Smith      101 Oracle DriveNotice that the address for the related family members is not displayed until the last family member is returned. It would repeat this process for each family.
    Thanks everyone for any help you can provide! 11g
    Edited by: nage62587 on Oct 16, 2012 8:20 PM

    Hi,
    nage62587 wrote:
    I've done a lot of forum searching and revised my question a bit to hopefully make things a bit clearer... I've taken a query Frank wrote and revised to meet my criteria; Searching the forum (and other places on the web) is great! Not only do you find things yourself, but people on this forum are more likely to help you when they see that you're doing all you can.
    If you find something that you try to adapt, post a link to it. Seeing the correct way to adapt it can be very instructive.
    essentially, if I can determine what relatives a person has, then I can create a unique "FAMILY_ID" for them - once I have that, it would appear as though I could then use the FAMILY_ID to group their addresses and other info together.
    The problem I'm having is that if a RELATEDPERSON_ID is linked to a PERSON_ID (PERSON_ID linked to RELATEDPERSON_ID works great), it assigns them a new FAMILY_ID rather than including them into the correct family.
    Here's my sql
    WITH PERSONS AS
    SELECT 'John Smith' AS person, 101 AS person_id, '1 Oracle Drive' AS address FROM dual union all
    SELECT 'Jane Smith', 102, '1 Oracle Drive' FROM dual union all
    SELECT 'Jack Smith', 103, '8 Oracle Drive' FROM dual union all
    SELECT 'John Doe', 104, '10 Oracle Drive' FROM dual union all
    SELECT 'Jane Doe', 105, '10 Oracle Drive' FROM dual union all
    SELECT 'Pete Smith', 106, '1 Oracle Drive' FROM dual
    ,    RELATIONSHIPS AS
    SELECT 101 AS person_id, 102 AS relatedperson_id FROM dual union all
    SELECT 102, 101 FROM dual union all
    SELECT 104, 105 FROM dual union all
    SELECT 105, 104 FROM dual union all
    SELECT 106, 101 FROM dual
    , table_x
    AS
    SELECT   person_id         AS col1
    ,        relatedperson_id  AS col2
    FROM     relationships
    ,     got_relatives     AS
         SELECT     col1
         ,     CONNECT_BY_ROOT col2     AS relative
         FROM     table_x
         CONNECT BY NOCYCLE     col1     =  col2
    OR  col2  =  col1
    SELECT       col1
    ,       DENSE_RANK () OVER ( ORDER BY  MIN (relative)
    ) AS family_id
    FROM      got_relatives
    GROUP BY  col1The result I expect is:
    COL1   FAMILY_ID
    102     1
    106     1
    101     1
    105     2
    104     2
    I suspect that whatever you copied originally had the PRIOR keyword somewhere in the CONNECT BY clause.
    Here's one way to do what you want:
    WITH    all_relationships     AS
         SELECT  person_id
         ,     relatedperson_id
         FROM     relationships
        UNION
         SELECT  relatedperson_id     AS person_id
         ,     person_id          AS relatedperson_id
         FROM     relationships
    ,     got_relatives     AS
         SELECT     CONNECT_BY_ROOT person_id     AS person_id
         ,     relatedperson_id
         FROM     all_relationships
         CONNECT BY NOCYCLE     person_id       = PRIOR relatedperson_id
                 OR          relatedperson_id  = PRIOR person_id
    ,     got_family_id     AS
         SELECT       person_id
         ,       MIN (relatedperson_id)     AS family_id
         ,       ROW_NUMBER () OVER ( PARTITION BY  MIN (relatedperson_id)
                                      ORDER BY          person_id     DESC
                                    )            AS r_num
         FROM       got_relatives
         GROUP BY  person_id
    SELECT       p.person
    ,       CASE
               WHEN  f.r_num  = 1
               THEN  p.address
           END          AS address
    ,       p.person_id
    ,       f.family_id     
    FROM       got_family_id  f
    JOIN       persons      p  ON  p.person_id  = f.person_id
    ORDER BY  family_id
    ,            person_id
    ;Output:
    PERSON     ADDRESS          PERSON_ID  FAMILY_ID
    John Smith                        101        101
    Jane Smith                        102        101
    Pete Smith 1 Oracle Drive         106        101
    John Doe                          104        104
    Jane Doe   10 Oracle Drive        105        104Obviously, you don't have have to display all the columns I displayed above In your first message, you said you wanted only person and address. In your last message, you said you only wanted person_id and family_id. Change the main SELECT clause any way you wish.
    I used the lowest person_id in each family as the family_id. You could use DENSE_RANK if you really wanted to have the families numbered 1, 2, 3, ..., but I suspect you don't really care what family_id is, as long as all the members of the family have the same value.
    You relationship table has some symmetrical relationships, such as
    SELECT 104, 105 FROM dual union all
    SELECT 105, 104 FROM dual union alland some asymmetrical relationships. For example, the only relationship involving person_id=106 is
    SELECT 106, 101 FROM dualthat is, there is no mirror-image row:
    -- SELECT 101, 106 FROM dual union all   -- THIS IS NOT IN THE SAMPLE DATAI assume there is no significance to that. As long as 101 and 106 appear on the same row, they are in the same family, regardless of which is the person_id and which is the relatedperson_id.
    So the first thing I did above was make sure all the mirror-image rows were represented. That's what all_relationships does.
    The next sub-query, got_relatives, is probably what you meant to adapt, but you left off the PRIOR operators.
    Got_family_id actually does the grouping, and also computes r_num to determine which is the last member of the family. Only that family member's address will be displayed in the main query.
    You could combine got_family_id and the main query; you don't really need a sub-query for that. It would be a little less coding, but I wrote it this way because I think it's a little easier to understand and maintain.

  • Can I turn off grouping by date in Finder and also 'Arrange by' and 'Sort by' in ascending and descending order?

    I am trying to arrange my photostream saved search (which doesn't update automatically after I did the search for the first time which is very annoying) but finder won't let me arrange in ascending order of date (i.e.: oldest to newest). Is there a way I can do this or will my folder arrangements always be the one way without the option to change it to the opposite arrangement (same for alphabetical). Also, Finder automatically arranges my photos into groups of dates (e.g.: 'previous 30 days', 'September'). Is there any way I can turn this off?
    Also if anyone can fix this stupid photostream issue for me that would be great!
    thanks very much 

    Even in list view, the photos are grouped by previous seven days, previous 30 days, October, and so on.. there is no option i see that will let me change to order by date modified without these groupings or to just turn these groupings off altogether
    but thank you for your reply
    -Peelo2311

  • Date and Time Submitted in Task Notes to show in Project Pro 2013

    I wonder if anybody could assist.
    I am running PWA 2013 and Project Pro 2013
    When a resource updates a task on PWA and creates/updates the notes on the task, it pulls to the notes section for the task in Project Professional.  This is great but…
    Is there a way to pull the Date and Time Submitted next to the resources’ name in the note too?
    I would appreciate any assistance.
    Many Thanks :)

    Hi,
    I don't think this is feasible out-of-the-box. Note that the information is available in the task details when you click on the task (either in the task update page or in the approval center).
    A workaround would be to train the users to start their comments by typing their initials and the date-time.
    Another way more complex would be to do some custom code.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

Maybe you are looking for

  • How to connect my PB to TV using Mini-DVI to Video Adapter

    I went through the posts, so I'm sure this is a stupid question, but: I have a mini-dvi to video adapter for my powerbook, which I want to connect to my TV. What's the extra cable I need to connect the adapter to the TV?

  • Remote Key Field not visible on destination during Import

    Hi All, I have made certain tables(Main, Flat,QT) remote key enabled. but when i m trying to import data remote key field in the destination side doesn't come up. Remote sys is of type Inbound/Outbound. Please let me know in case any one can provide

  • Palm Pixi simple question for the pros

    How do I block my wireless number from being displayed on an outgoing call, or can it be done? Post relates to: Pixi p120eww (Sprint)

  • Imac crashes when i install the windows 7 sp1

    So I have gotten past the intiall hurdle of installing windows 7 on my 27 inch Imac, which was not easy. it was done through boot camp and involved deleting a few key system files after the install crashes on reboot. Now the computer is crashing when

  • Lost music after updating how do i regain

    Very new at this. Use ipod shuffle set up itunes all was good. Connected husbands ipod touch asked for updates, lost all the music can I get it back?