Numbering table with parent grouping

Hi, i have a table that i grouped by email in ssrs, and i would like to insert a row number, that will be by the parent grouping
i tried using a solution from another question.
;with cte as
(select *,dense_rank() over(order by row1) as rowID
from @table
select * from cte
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/078e45e5-edbf-4451-a5d2-bcf2f0382353/how-to-make-a-grouped-row-number?forum=transactsql
but i was not able to get it working. this was the query i used to prepare the table
SELECT        FirstName, LastName, EmailAddress, tused, CourseTitle, lastlogindate, Noofmodules, COUNT(coursecompleted) AS modulesstarted, 
                         REPLACE(REPLACE(REPLACE('<' + STUFF
                             ((SELECT        ',' + CAST(CourseModule AS varchar(20)) AS Expr1
                                 FROM            edsf1
                                 WHERE        (FirstName = e.FirstName) AND (LastName = e.LastName) AND (coursecompleted = '1') AND (CourseTitle = e.CourseTitle)
FOR XML PATH('')), 1, 1, ''), 
                         '<Expr1>', ''), '</Expr1>', ''), ',', '') AS CoursesCompleted
FROM            edsf1 AS e
WHERE        (coursecompleted = '1') OR
                         (coursecompleted = '0')
GROUP BY FirstName, LastName, EmailAddress, CourseTitle, lastlogindate, Noofmodules, tused

Sorry 
not fully clear
sounds like this
SELECT DENSE_RANK() OVER (ORDER BY EmailAddress),
FirstName, LastName, EmailAddress, tused, CourseTitle, lastlogindate, Noofmodules, COUNT(coursecompleted) AS modulesstarted,
REPLACE(REPLACE(REPLACE('<' + STUFF
((SELECT ',' + CAST(CourseModule AS varchar(20)) AS Expr1
FROM edsf1
WHERE (FirstName = e.FirstName) AND (LastName = e.LastName) AND (coursecompleted = '1') AND (CourseTitle = e.CourseTitle) FOR XML PATH('')), 1, 1, ''),
'<Expr1>', ''), '</Expr1>', ''), ',', '') AS CoursesCompleted
FROM edsf1 AS e
WHERE (coursecompleted = '1') OR
(coursecompleted = '0')
GROUP BY FirstName, LastName, EmailAddress, CourseTitle, lastlogindate, Noofmodules, tused
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page
it works in sql server when i run the query, it assigns the row number to the right person. but when i try to use it in ssrs query, i get 
The OVER SQL construct or statement is not supported.
Make it into proc like this
CREATE PROC ProcName
AS
SELECT DENSE_RANK() OVER (ORDER BY EmailAddress),
FirstName, LastName, EmailAddress, tused, CourseTitle, lastlogindate, Noofmodules, COUNT(coursecompleted) AS modulesstarted,
REPLACE(REPLACE(REPLACE('<' + STUFF
((SELECT ',' + CAST(CourseModule AS varchar(20)) AS Expr1
FROM edsf1
WHERE (FirstName = e.FirstName) AND (LastName = e.LastName) AND (coursecompleted = '1') AND (CourseTitle = e.CourseTitle) FOR XML PATH('')), 1, 1, ''),
'<Expr1>', ''), '</Expr1>', ''), ',', '') AS CoursesCompleted
FROM edsf1 AS e
WHERE (coursecompleted = '1') OR
(coursecompleted = '0')
GROUP BY FirstName, LastName, EmailAddress, CourseTitle, lastlogindate, Noofmodules, tused
Then in SSRS use below as command
EXEC ProcName
and it will work fine
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Union on tables with parent-child records and Sorting

    Hi,
    I have an application that has an existing query which returns org units (parent and child) from organization table with a sort on createddate +  org_id combination
    WITH Org_TREE AS (
    SELECT *, null as 'IS_DELETED', convert (varchar(4000), convert(varchar(30),CREATED_DT,126) + Org_Id) theorderby
    FROM Organization WHERE PARENT_Org_ID IS NULL and case_ID='43333'
    UNION ALL
    SELECT a1.*, null as 'IS_DELETED', convert (varchar(4000), a2.theorderby + convert(varchar(30),a1.CREATED_DT,126) + a1.Org_Id)
    FROM Organization a1 INNER JOIN Org_TREE a2 ON a1.PARENT_Org_ID = a2.Org_Id and case_ID='43333'
    SELECT * FROM Org_TREE order by theorderby
    I have created a new log table for organization 'Organization_Log' with exact columns as Organization table with an additional 'IS_DELETED' bool column.
    Questions:
    I need to modiy the query,
    1. To display the parent and child records both from the organization table and organization_log table.
    2. the sort on the result should be based on 'Organization Name' column asc. First with parent org and the child org underneath it. For eg.
    aaa
    ==>fff
    ==>ggg
    bbb
    ==> aaa
    ==> hhh
    Any help on how the query should be constructed?
    Thanks
    gkol

    @Visakh16,
    I am getting...
    All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
    The problem is that you will have different number of columns in both log and Organization and Organizationlog tables. UNION/UNION ALL expect the same number of columns.
    Try the below:
    WITH Org_Log_TREE AS (
    SELECT Organization_name,Org_id,Parent_Org_id, IS_DELETED, CAST(Organization_Name AS varchar(max)) AS theorderby,1 AS level
    FROM Organization_Log WHERE PARENT_Org_ID IS NULL and case_ID='43333'
    UNION ALL
    SELECT a1.Organization_name,a1.Org_id,a1.Parent_Org_id, a1.IS_DELETED, CAST(a2.theorderby +'/' + CAST(a1.Organization_Name AS varchar(1000)) AS varchar(max)),a2.Level + 1
    FROM Organization_Log a1 INNER JOIN Org_Log_TREE a2 ON a1.PARENT_Org_ID = a2.Org_Id and case_ID='43333'
    ) ,Org_TREE AS (
    SELECT Organization_name,Org_id,Parent_Org_id, NULL AS IS_DELETED, CAST(Organization_Name AS varchar(max)) AS theorderby,1 AS level
    FROM Organization WHERE PARENT_Org_ID IS NULL and case_ID='43333'
    UNION ALL
    SELECT a1.Organization_name,a1.Org_id,a1.Parent_Org_id,NULL AS IS_DELETED, CAST(a2.theorderby +'/' + CAST(a1.Organization_Name AS varchar(1000)) AS varchar(max)),a2.Level + 1
    FROM Organization a1 INNER JOIN Org_TREE a2 ON a1.PARENT_Org_ID = a2.Org_Id and case_ID='43333'
    SELECT * FROM Org_Log_TREE
    UNION ALL
    SELECT * FROM Org_TREE
    ORDER BY LEFT(theorderby,CHARINDEX('/',theorderby + '/')-1),Level

  • Table with column group (one column) - next row is showing on new page instead of below previous row

    I am creating new table. My goal is to display some text in few lines like this:
    "AAAAAAAA"           "BBBBBBBB"           "CCCCCCCCC"     
    "DDDDDDD"           "EEEEEEEE"
    Actually the next row (with "DD" and "EE" values) is not displayed below first row, but on the next page.
    I've tried to put table into rectangle, disabled all page breaks and still the same effect. Any help?

    Hi Heidi,
    Actually, it's not solution, I only gave more details about my problem :)
    Another description:
    In my report I'm creating Tablix with Column grouping. There is only one column with image (every image has same width). If there is only three pictures, then they are displayed next to each other in one row.
    In case, there is more than three pics, another row is showing on next page. I'd like to display all rows one after another on one page.
    I've tried to create three vertical lists, and filter each column group to display only records:
    1) =(RowNumber("Tablix1")) mod 3 = 1
    2) =(RowNumber("Tablix1")) mod 3 = 2
    3) =(RowNumber("Tablix1")) mod 3 = 0
    Unfortunately, I got an error:
    "A FilterExpression for the tablix ‘Tablix1’ uses the function RowNumber.  RowNumber cannot be used in filters."
    Do You have any other propositions?
    --------EDIT--------
    ok, I manged to solve it. As I said, I've created three vertival lists and placed them next to each other.
    Then, instead of using filter, I've used Visibility trigger:
    1)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix1") mod 3 = 1, false, true)
    2)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix2") mod 3 = 2, false, true)
    3)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix3") mod 3 = 0, false, true)
    I had to use function RunningValue to count all occurrences, as my report is quite complex and "RowNumber" [ssrs function] and "ROW_NUMBER() OVER (ORDER BY [rowgroupfield])" [sql query] were not working properly.

  • Populate table with refresh group outcome

    Hi everyone,
    I need a little help.
    I am working on an Oracle 10.2.0.4 in Windows environment.
    I have a table I created like this:
    Table name: DIM_REPLICA
    COD_SEZ VCHAR2(2)
    NOME_SEZ VCHAR2(20)
    FLAG CHAR(1)
    D_REPLICA DATE
    On this DB I have 210 refresh groups executing every night. I need to populate this table with the outcome of the refresh groups.
    So when the refresh group called for example ROME runs I need written on the table the name ROME in the "NOME_SEZ" field, a Y or a N if the refresh group worked correctly in the FLAG field and the LAST_DATE the refresh group ran in the D_REPLICA field. The COD_SEZ field is a code I get from other things. It is not needed at the moment. I can add it myself on me own.
    Can anyone please help me?
    I was looking on SYS tables DBA_JOBS and DBA_REFRESH for this data, but I am not sure what to take and how to populate the table. Trigger? Procedure? Any help will be great!
    Thank you all in advance!

    Hi Phelit,
    After update trigger may help you with few customization
    Refer sample code
    CREATE OR REPLACE TRIGGER orders_after_update
    AFTER UPDATE
       ON orders
       FOR EACH ROW
    DECLARE
       v_username varchar2(10);
    BEGIN
       -- Find username of person performing UPDATE into table
       SELECT user INTO v_username
       FROM dual;
       -- Insert record into audit table
       INSERT INTO orders_audit
       ( order_id,
         quantity_before,
         quantity_after,
         username )
       VALUES
       ( :new.order_id,
         :old.quantity,
         :new.quantity,
         v_username );
    END;Thanks,
    Ajay More
    http://www.moreajays.com

  • Creating View for a table with parent child relation in table

    I need help creating a view. It is on a base table which is a metadata table.It is usinf parent child relationship. There are four types of objects, Job, Workflow, Dataflow and ABAP dataflow. Job would be the root parent everytime. I have saved all the jobs
    of the project in another table TABLE_JOB with column name JOB_NAME. Query should iteratively start from the job and search all the child nodes and then display all child with the job name. Attached are the images of base table data and expected view data
    and also the excel sheet with data.Picture 1 is the sample data in base table. Picture 2 is data in the view.
    Base Table
    PARENT_OBJ
    PAREBT_OBJ_TYPE
    DESCEN_OBJ
    DESCEN_OBJ_TYPE
    JOB_A
    JOB
    WF_1
    WORKFLOW
    JOB_A
    JOB
    DF_1
    DATAFLOW
    WF_1
    WORKFLOW
    DF_2
    DATAFLOW
    DF_1
    DATAFLOW
    ADF_1
    ADF
    JOB_B
    JOB
    WF_2
    WORKFLOW
    JOB_B
    JOB
    WF_3
    WORKFLOW
    WF_2
    WORKFLOW
    DF_3
    DATAFLOW
    WF_3
    WORKFLOW
    DF_4
    DATAFLOW
    DF_4
    DATAFLOW
    ADF_2
    ADF
    View
    Job_Name
    Flow_Name
    Flow_Type
    Job_A
    WF_1
    WORKFLOW
    Job_A
    DF_1
    DATAFLOW
    Job_A
    DF_2
    DATAFLOW
    Job_A
    ADF_1
    ADF
    Job_B
    WF_2
    WORKFLOW
    Job_B
    WF_3
    WORKFLOW
    Job_B
    DF_3
    DATAFLOW
    Job_B
    DF_4
    DATAFLOW
    Job_B
    ADF_2
    ADF
    I implemented the same in oracle using CONNECT_BY_ROOT and START WITH.
    Regards,
    Megha

    I think what you need is recursive CTE
    Consider your table below
    create table basetable
    (PARENT_OBJ varchar(10),
    PAREBT_OBJ_TYPE varchar(10),
    DESCEN_OBJ varchar(10),DESCEN_OBJ_TYPE varchar(10))
    INSERT basetable(PARENT_OBJ,PAREBT_OBJ_TYPE,DESCEN_OBJ,DESCEN_OBJ_TYPE)
    VALUES('JOB_A','JOB','WF_1','WORKFLOW'),
    ('JOB_A','JOB','DF_1','DATAFLOW'),
    ('WF_1','WORKFLOW','DF_2','DATAFLOW'),
    ('DF_1','DATAFLOW','ADF_1','ADF'),
    ('JOB_B','JOB','WF_2','WORKFLOW'),
    ('JOB_B','JOB','WF_3','WORKFLOW'),
    ('WF_2','WORKFLOW','DF_3','DATAFLOW'),
    ('WF_3','WORKFLOW','DF_4','DATAFLOW'),
    ('DF_4','DATAFLOW','ADF_2','ADF')
    ie first create a UDF like below to get hierarchy recursively
    CREATE FUNCTION GetHierarchy
    @Object varchar(10)
    RETURNS @RESULTS table
    PARENT_OBJ varchar(10),
    DESCEN_OBJ varchar(10),
    DESCEN_OBJ_TYPE varchar(10)
    AS
    BEGIN
    ;With CTE
    AS
    SELECT PARENT_OBJ,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM basetable
    WHERE PARENT_OBJ = @Object
    UNION ALL
    SELECT b.PARENT_OBJ,b.DESCEN_OBJ,b.DESCEN_OBJ_TYPE
    FROM CTE c
    JOIN basetable b
    ON b.PARENT_OBJ = c.DESCEN_OBJ
    INSERT @RESULTS
    SELECT @Object,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM CTE
    OPTION (MAXRECURSION 0)
    RETURN
    END
    Then you can invoke it as below
    SELECT * FROM dbo.GetHierarchy('JOB_A')
    Now you need to use this for every parent obj (start obj) in view 
    for that create view as below
    CREATE VIEW vw_Table
    AS
    SELECT f.*
    FROM (SELECT DISTINCT PARENT_OBJ FROM basetable r
    WHERE NOT EXISTS (SELECT 1
    FROM basetable WHERE DESCEN_OBJ = r.PARENT_OBJ)
    )b
    CROSS APPLY dbo.GetHierarchy(b.PARENT_OBJ) f
    GO
    This will make sure it will give full hieraracy for each start object
    Now just call view as below and see the output
    SELECT * FROM vw_table
    Output
    PARENT_OBJ DESCEN_OBJ DESCEN_OBJ_TYPE
    JOB_A WF_1 WORKFLOW
    JOB_A DF_1 DATAFLOW
    JOB_A ADF_1 ADF
    JOB_A DF_2 DATAFLOW
    JOB_B WF_2 WORKFLOW
    JOB_B WF_3 WORKFLOW
    JOB_B DF_4 DATAFLOW
    JOB_B ADF_2 ADF
    JOB_B DF_3 DATAFLOW
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Updating child table with parent table

    Can anyone help me with this update statement?
    I have a table BETA with children of the family list and I have table GAMA with children and family list. The relation between family and children is 1 to many. Now we have decided to update table BETA which has children list with table GAMA’s family list. So I did as below.
    UPDATE beta B
    SET (b.childe_code 
       ,b.childe_name) =(SELECT DISTINCT g.family_code
                          ,g.family_name
           FROM gama g
           WHERE b.childe_code IN (SELECT g.childe_code
                                             FROM gama g)
           AND g.period = (SELECT MAX(period) FROM gama g))
    WHERE EXISTS (SELECT 1
           FROM gama g
           WHERE b.childe_code IN (SELECT g.childe_code
                                             FROM gama g)
           AND g.period = (SELECT MAX(period) FROM gama g));It is giving this error: ORA-01427: single-row subquery returns more than one row
    Could someone please help me with this?
    Thanks for the help.

    Hello tubby,
    Here is the answers for all your questions.
    How about you post your Oracle version
    select * from v$version
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionThe DDL for BETA and GAMA tables (create table statements).
    CREATE TABLE BETA
      CHILDE_CODE  NUMBER,
      CHILDE_NAME  VARCHAR2(50 BYTE),
      PERIOD       INTEGER
    CREATE TABLE GAMA
      FAMILY_CODE  NUMBER,
      FAMILY_NAME  VARCHAR2(50 BYTE),
      CHILDE_CODE  NUMBER,
      CHILDE_NAME  VARCHAR2(50 BYTE),
      PERIOD       INTEGER
    )Sample data for both tables (in the form of INSERT statements) which represent a small test case you've constructed.
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (10, 'google', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (11, 'amazon', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (12, 'ebay', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (13, 'yahoo', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (20, 'word', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (21, 'excel', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (22, 'access', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (23, 'cognos', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (30, 'cell phone', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (31, 'laptop', 201010);
    Insert into BETA
       (CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (32, 'pager', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (1, 'website', 10, 'google', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (1, 'website', 11, 'amazon', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (1, 'website', 12, 'ebay', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (1, 'website', 13, 'yahoo', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (2, 'software', 20, 'word', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (2, 'software', 21, 'excel', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (2, 'software', 22, 'access', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (2, 'software', 23, 'cognos', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (3, 'wireless', 30, 'cell phone', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (3, 'wireless', 31, 'laptop', 201010);
    Insert into GAMA
       (FAMILY_CODE, FAMILY_NAME, CHILDE_CODE, CHILDE_NAME, PERIOD)
    Values
       (3, 'wireless', 32, 'pager', 201010);The desired output you want based on the input data, with an explanation as to how the data needs to be transformed.
    I want to replace data of childe_code and childe_name with family_code and family_name in the beta table. The error message you are currently getting is quite descriptive, you are getting back more than a single row for a given row you are trying to update. If you can deterministically decide which rows to take and outline that in your example, we can help you.

  • Problem with checkbox group in row popin of table.

    In table row popin I have kept Check Box Group.I have mapped  the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
    if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
    the check box group in the row popin  belongs to that perticular row.
    but the checkboxegroup values in row popins of all the  rows are getting changed to the row which is lead selected.
    The same scenario  (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of  checkbox group in row popin with datasource property of table  binded to the subnode
    I cant trace out the problem with checkbox group in place of table.
    Please help me in this regard.I have to place check box group in place of table in row popin.
    Thanks and Regards
        Kiran Kumar K

    I have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.

  • Insert Record with Parent/Child Tables doesn't work with Oracle - unlike AC

    Hi,
    I just Migrated a MS Access 2010 Database to an Oracle 11g Backend with the SQL Developer Tool.
    The Migration went fine, all the Tables and Views are migrated.
    I'm working with MS Access as Frontend.
    The application has some Datasheets with Subdatasheets with Parent/Child Relationship. (1-n Relationship)
    After changing to Oracle, it's not possible, to Insert a new Record in a Subdatasheet I always get the following Error Message:
    "The Microsoft Access database engine cannot find a record in the table 'xxxx' with key matching field(s) 'zzzzz'"
    It used to work perfect with the MS Access Backend, do I need a trigger which first adds the child Record ?
    Or what should I do?
    Thank you

    Hi Klaus,
    Thanks for your answer. I still haven't solved my problem. The only way would be to use a singel 1:n Relationship, but in fact I need a n:m Relationship.
    I tried the same scenario with a new Access Application, same result.
    To clearify my problem.
    Goal: Parent Form with Parent Records, Linked Child Form with Child Records in a Datasheet View => Insert of a NEW Child Record.
    I have 3 Tables (table1 = Parent tabel, table2 = Child Table, table12 = n:m Tabel with PK and two FK)
    The Recordsource of the Parent Form is Tabel1
    The Recordsource of the Child Form is Table2 joined with Table12.
    In my Old Access Project, Access Triggered the Insert and filled Table12 with the NEW PK of Table2.
    It seems like Access can't do that anymore....
    I'm pretty desperate and I'm sure it is just a litte thing to fix.....

  • Analytical Services failed to get user's parent group tree with Error

    Hi,
    We have a frequent errror during our weekly batch for an application.
    The context:
    - Essbase Administration Services we are using is version is 9.3.1.
    - 8 applications are calculated during the week-end. The scripts executed are exactly the same for the 8 applications.
    - For example let's say that 5 scripts are launched during the night in the batch for each application (script 1, script 2 ... script 5)
    - App1 and App2 are launched alone and before the 6 others applications as these applications database are 3 x bigger (App1 is calculated alone, then app2 is calculated alone, then app3 to app8 scripts are launched in the same time).
    The issue :
    - We don't see any issue for app3 to app8, the calculation are executed without any problem from script1 to script5.
    - But we have an error in App1 and App2 log when the bath execute script 4 and we see the following error in the server log **
    "Analytical Services failed to get user's parent group tree with Error".
    (** : we don't see any log for script 4 in the application log - it's like the server bypass script 4 to go directly from script 3 to script 5 )
    Nothing special is done in script 4 but just an aggregation of the Year dimension (using a @SUM(@RELATIVE(Year,0)) calculation.
    I think that there is may be a synchronization error with Shared Services but what is strange is that it's always for the same script 4 and the batch is launched at different time every week-end.
    Can the issue be linked to the size of the database of applications (8 Gb) and difficulties for the processor to executes aggregation in a large database volume ?

    Hi,
    According to your description, my understanding is that the error occurred when sending an email to the user in workflow.
    Did you delete the existing Connections before setting NetBiosDomainNamesEnabled?
    If not, I recommend to delete and recreate your AD connections, then set NetBiosDomainNamesEnabled to true.
    Or you can delete the original User Profile Service Application and create a new one, then set the NetBiosDomainNamesEnabled to true and start the User Profile Service Application
     synchronization.
    More reference:
    http://social.technet.microsoft.com/wiki/contents/articles/18060.sharepoint-20xx-what-if-the-domain-netbios-name-is-different-than-the-fqdn-of-the-domain-with-user-profile.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Diff Between Internal Table with Occurs 0 & Field Groups

    Hi,
    Is there really any difference between just using an internal table with an OCCURS 0 statement-- which would write the entire table to paging space-- and using field-groups? How is Field-Groups is more effective than Internal tables with occurs 0 when it comes to performance?
    Could anybody please give some information regarding above question?
    Thanks,
    Mohan.

    hi,
    occurs 0 means it wont create any extra memory. based on the records only the memory is allocated to internal tables at run time. but when an internal table is created it can hold data of type to which it is declared.
    i.e data: itab like mara occurs 0 with header line.
    can take data only from mara table
    we can also do in another way as using types keyword we can declare a standard structure and create a internal table of that type. its also not that useful as we have to change the structure depending on changes for storing data.
    for this purpose field symbols are used. field symbols can hold any data means that they can point to tables, fields, any standard or user-defined types. field symbols actually points to respective types by which we can directly access to that types using field symbols.
    filed symbols works more faster than internal tables.
    if helpful reward some points.
    with regards,
    Suresh.A

  • Differences between Internal table with Occurs 0 and Field-Groups?

    Is there really any difference between just using an internal table with an OCCURS 0 statement-- which would write the entire table to paging space-- and using field-groups? How is Field-Groups is more effective than Internal tables with occurs 0 when it comes to performance?
    Could anybody please give some information regarding above question?
    Thanks,
    Surya.

    hi,
    occurs 0 means it wont create any extra memory. based on the records only the memory is allocated to internal tables at run time. but when an internal table is created it can hold data of type to which it is declared.
    i.e data: itab like mara occurs 0 with header line.
    can take data only from mara table
    we can also do in another way as using types keyword we can declare a standard structure and create a internal table of that type. its also not that useful as we have to change the structure depending on changes for storing data.
    for this purpose field symbols are used. field symbols can hold any data means that they can point to tables, fields, any standard or user-defined types. field symbols actually points to respective types by which we can directly access to that types using field symbols.
    filed symbols works more faster than internal tables.
    if helpful reward some points.
    with regards,
    Suresh.A

  • Fixed length outer table with nested repeating group inner table.

    I had to re-create a PDF using tables in an RTF template. It has a fixed 1 page width. However, one of the rows in the template has a nested table with a repeating group. I set the width of the outer table row width to 2". However when I have repeating groups it makes the outer row grow wider than the 2" inches. The option to un-select "automatically resize to fit contents" is grayed out.
    Is there a way to keep the outer table width fixed with an inner repeating group?
    Thanks.
    --Johnnie
    Edited by: Vortex13 on Jun 13, 2012 11:15 AM

    Hi Borris,
    Found the following in the Oracle Documentation under: Oracle8i Application Developer's Guide - Object-Relational Features Release 2 (8.1.6)
    2 Managing Oracle Objects / Using Collections / Collection Unnesting
    URL: http://www.znow.com/sales/oracle/appdev.816/a76976/adobjmng.htm#1002885
    Oracle8i also supports the following syntax to produce outer-join results:
    SELECT d.*, e.* FROM depts d, TABLE(d.emps)(+) e;
    The (+) indicates that the dependent join between DEPTS and D.EMPS should be NULL-augmented. That is, there > will be rows of DEPTS in the output for which D.EMPS is NULL or empty, with NULL values for columns
    corresponding to D.EMPS.

  • Viewing custom Z tables with blank authorization group

    I'm trying to view all the Z tables without any authorization group (blank) in TDDAT.  It only displays Z tables with &NC& or other valid groups we assign.  Is there another table I can query to show ALL Z tables without an auth group?
    Thanks.

    > It only displays Z tables with &NC& or other valid groups we assign. 
    Oops, sorry. Martin had already mentioned this.
    &NC& is not a valid group, it is a symbolic group which is the equivalent of a blank for the table - except that a view had been created for it and during that process no authorization group was set either. This also used to be the default, which doesn't really make sense... hence all the values.
    If you take a look at FM VIEW_AUTHORITY_CHECK then you will see how it works and which tables are used.
    Cheers,
    Julius
    Edited by: Julius Bussche on Feb 13, 2010 10:01 AM

  • SAP tables with &NC& Auth Group.

    In SAP there are about 7000 plus tables with &NC& Auth Group.
    Are all these tables not financial relevant.
    What is the impact if we change these tables auth group to custom auth groups?

    On their own they might not be finance relevant, but might even be system relevent for that matter.
    &NC& means "Not Classified" hich should be understood as "no intention to display and or change them from the application layer" as their single fields on their own are not usefull or inconsistent.
    The bugger is that if developers don't understand this and security folks don't respect it, then because of one single table you might open access to all other unclassified tables (depending on how they are designed in the Data Dictionary and how they are accessed).
    I have seldom seen a SAP system which got this right, primarily because of the developers (also the ones from SAP).
    Yes, you can change the groups is SE54. But report it to SAP and keep track of which SP level introduces the new check value. Try to obtain that information from them in advance if you need to, and check that it is conceptually consistent with your concept (minimum requirement is that it should not be conceptually inconsistent with other SAP standard concepts).
    If this is a topic for you and delivery classes also play a role, then also search OSS for the term "Current Settings". These give you more options - for specific objects.
    Cheers,
    Julius

  • Updating parent row in a self-join table with triggers

    Hi Gurus!
    Need of a business to update parent row(s) in the same table with triggers (insert, update and delete). Table is having recursive relation and error is coming as mutating error. I was able to do this with MS-SQL server.
    Appreciate any help or work around possibilities.
    Regards,
    SH

    SH,
    popular solutions to this issue include
    - autonomous transactions
    - recording (typically in PL/SQL package variables) the rows being processed from the row level triggers and using this information in the after statement level trigger to perform the update on the parent rows
    - use a View with an instead of trigger to re-route the DML on your table
    Which one to use depends on what exactly you are trying to achieve and how the data hangs together.
    Lucas

Maybe you are looking for