Concatenating

I have a table (test3) with 77 columns and I want to do a count of not null values for each column, to something like:
select count(*), upper(a4) "caller type", (select a11 from test3 where id = 1) "transaction name" from (
select a4 from test3 where a11 is not null and id <> 1)
group by upper(a4)
Because I dont want to change the above query and run it 77 times for each column, I created the following loop:
BEGIN
FOR loop_count IN 11 .. 77
LOOP
     INSERT INTO request2 (count, caller_type, trans_name)
select count(*) "count", upper(a4) "caller_type" ,(select 'a' || loop_count from test3 where id = 1) "trans_name" from (
select a4 from test3 where 'a' || loop_count is not null and id <> 1)
group by upper(a4);
     end loop;
END;
But when I run this query, I get "A" invalid identifier error. Can somebody help?

This maybe:
BEGIN
   FOR c IN
      (SELECT    'INSERT INTO request2 (count, caller_type, trans_name)
SELECT   COUNT (*),
         UPPER (a4) "caller type",
         (SELECT a'
              || ROWNUM
              || '
            FROM test3
           WHERE ID = 1) "transaction name"
    FROM (SELECT a4
            FROM test3
           WHERE a'
              || ROWNUM
              || ' IS NOT NULL AND ID <> 1)
GROUP BY UPPER (a4);' x
         FROM user_objects
        WHERE ROWNUM <= 77)
   LOOP
      EXECUTE IMMEDIATE c.x;
   END LOOP;
END;
SELECT *
  FROM request2;

Similar Messages

  • Concatenating values in one row

    I need to write a function that will give me a concatenated list of all the records where gurmail_matl_code_mod like '8%'
    This query is giving me those results:
    GURMAIL_PIDM     CODE1     CODE2
    1135711          
    1135711          8IBD
    1135711     8IBW     
    I want something like this 1135711 8IBW 8IBD in one row.
    select
    gurmail_pidm,
    max(decode(rn,1,gurmail_matl_code_mod )) code1,
    max(decode(rn,2,gurmail_matl_code_mod )) code2
    from (select gurmail_pidm,
                  gurmail_matl_code_mod,
                  row_number() over (partition by gurmail_pidm order by gurmail_matl_code_mod desc) rn
                  from
                      (select  gurmail_pidm,gurmail_matl_code_mod
                               from saturn.spriden,
                                    general.gurmail
                                    where spriden_pidm = gurmail_pidm
                                    and spriden_change_ind is null
                                    and gurmail_matl_code_mod  like '8%'
                                    and gurmail_pidm = 1135711
                                    and GURMAIL_DATE_PRINTED is null
                                    and gurmail_matl_code_mod is not null))
                                    group by gurmail_pidm, gurmail_matl_code_mod   How I can modify this query or let me know if you have other ideas..
    Thank you

    Hello
    try this,
    SQL>  with tab as(Select 1135711 GURMAIL_PIDM, Null CODE1 from dual Union All
      2               Select 1135711 GURMAIL_PIDM, '8IBD' CODE1 from dual Union All
      3               Select 1135711 GURMAIL_PIDM, '8IBW' CODE1 from dual)
      4  SELECT GURMAIL_PIDM || sys_connect_by_path(CODE1,' ') Result
      5    FROM (SELECT GURMAIL_PIDM
      6                ,code1
      7                ,row_number() over(Partition BY GURMAIL_PIDM Order BY GURMAIL_PIDM) rn
      8            FROM tab)
      9   WHERE connect_by_isleaf = 1
    10   Start With rn = 1
    11  Connect BY Prior rn = rn - 1;
    RESULT
    1135711  8IBW 8IBDHope this helps
    Christian Balz

  • Docno generation in cv01n with concatenation of 3 fields in addtiaonal tab

    I am struck in my program . I got a requirement for doc number generation automatically when user gives input in cv01n. there is a standard program mcdokznr which i copied and modified as per requirement . but in t-code cv01n second screen ,second tab we have additional details (characteristic values) functional consultant created 3 fields i need to concatenate these 3 fields along with docno . how should i acheieve .
    i also tried badi coiped standard badi DOCUMENT_NUMBER01 into ZDOCUMENT_NUMBER0 . in method i wrote
    method IF_EX_DOCUMENT_NUMBER01~DOCNUMBER_CHECK.
    DATA : tdwa TYPE tdwa.
    DATA: subrc TYPE inri-returncode,
    number LIKE draw-doknr,
    number1 LIKE draw-doknr,
    new_number LIKE draw-doknr,
    new_num TYPE string,
    lv_docnum1 TYPE string.
    CHECK sy-uname = 'MSRO'.
    CHECK tcode = 'CV01'.
    CHECK draw-doknr = 'TRD' OR draw-doknr = 'TST'.
    CALL FUNCTION 'CV200_DB_TDWA_SELECT'
    EXPORTING
    pf_dokar = draw-dokar
    IMPORTING
    psx_tdwa = tdwa
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    Implement suitable error handling here
    ELSE.
    if draw-dokar EQ 'TRD'.
    CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
    nr_range_nr = tdwa-inumnr
    object = 'DOKUMENT'
    IMPORTING
    number = number
    returncode = subrc
    EXCEPTIONS
    interval_not_found = 4
    number_range_not_intern = 8
    object_not_found = 12
    quantity_is_0 = 16.
    CONCATENATE 'ABC' '-' number INTO new_num. " IN THIS LINE HOW I NEED TO CONCATENATE THOSE 3 CHARACTERIC VALUES CREATED IN cvo1n additional data?
    WRITE new_num TO number.
    CONDENSE number NO-GAPS.
    ENDIF.
    *endif.
    ENDMETHOD.

    dear ppl of otn!!
    i need to make this concatenation because i have more tables except the subdivisions i have got each subdiv_indicator table and i have made the relationship of those indicators with the subdivisions and to recognize them properly i have chosen to concatenate charachters .just for the ease of making thing recognizable plus plz also tell me that how to refressh a sequence baecause when we delete a record form a table the sequence gets disturbed and last number still remains thatof the deleted record . how to solve this problem plz suggest.
    as we know already that in min_subdiv table we have got
    SUBDIV-ID           SUBDIV_NAME min_id
    E001               EXP ON UNIVERSITIES 0001
    E002               EXP ON PRIMARY SCHOOLS     0001     
    E003               EXP ON SECONDARY SCHOOLS 0001
    here is small picture of the data of min_subdiv_indicators for education subdivisions
    subdiv_id indicator_id inidcator_name
    E001 EI01 No. of primary education inst.
    E002 EI02 No.of sec.edu inst.
    E003 EI03 No.of professional college
    E003 EI04 Literacy Rate

  • Execution plan with Concatenation

    Hi All,
    Could anyone help in finding why concatenation is being used by optimizer and how can i avoid it.
    Oracle Version : 10.2.0.4
    select * from
                               select distinct EntityType, EntityID, DateModified, DateCreated, IsDeleted
                               from ife.EntityIDs i
                               join (select orgid from equifaxnormalize.org_relationships where orgid is not null and related_orgid is not null
                                  and ((Date_Modified >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and Date_Modified < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                                        OR (Date_Created >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and Date_Created < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                     ) r on(r.orgid= i.entityid)
                               where EntityType = 1
                and ((DateModified >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and DateModified < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                                              OR (DateCreated >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and DateCreated < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                               and ( IsDeleted = 0)
                               and IsDistributable = 1
                               and EntityID >= 0
                               order by EntityID
                               --order by NLSSORT(EntityID,'NLS_SORT=BINARY')
                             where rownum <= 10;
    Execution Plan
    Plan hash value: 227906424
    | Id  | Operation                                 | Name                          | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                          |                               |    10 |   570 |    39   (6)| 00:00:01 |       |       |
    |*  1 |  COUNT STOPKEY                            |                               |       |       |            |          |       |       |
    |   2 |   VIEW                                    |                               |    56 |  3192 |    39   (6)| 00:00:01 |       |       |
    |*  3 |    SORT ORDER BY STOPKEY                  |                               |    56 |  3416 |    39   (6)| 00:00:01 |       |       |
    |   4 |     HASH UNIQUE                           |                               |    56 |  3416 |    38   (3)| 00:00:01 |       |       |
    |   5 |      CONCATENATION                        |                               |       |       |            |          |       |       |
    |*  6 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    29 |     1   (0)| 00:00:01 |       |       |
    |   7 |        NESTED LOOPS                       |                               |    27 |  1647 |    17   (0)| 00:00:01 |       |       |
    |   8 |         TABLE ACCESS BY GLOBAL INDEX ROWID| ENTITYIDS                     |    27 |   864 |     4   (0)| 00:00:01 | ROWID | ROWID |
    |*  9 |          INDEX RANGE SCAN                 | UX_TYPE_MOD_DIST_DEL_ENTITYID |    27 |       |     2   (0)| 00:00:01 |       |       |
    |* 10 |         INDEX RANGE SCAN                  | IX_EFX_ORGRELATION_ORGID      |     1 |       |     1   (0)| 00:00:01 |       |       |
    |* 11 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    29 |     1   (0)| 00:00:01 |       |       |
    |  12 |        NESTED LOOPS                       |                               |    29 |  1769 |    20   (0)| 00:00:01 |       |       |
    |  13 |         PARTITION RANGE ALL               |                               |    29 |   928 |     5   (0)| 00:00:01 |     1 |     3 |
    |* 14 |          TABLE ACCESS BY LOCAL INDEX ROWID| ENTITYIDS                     |    29 |   928 |     5   (0)| 00:00:01 |     1 |     3 |
    |* 15 |           INDEX RANGE SCAN                | IDX_ENTITYIDS_ETYPE_DC        |    29 |       |     4   (0)| 00:00:01 |     1 |     3 |
    |* 16 |         INDEX RANGE SCAN                  | IX_EFX_ORGRELATION_ORGID      |     1 |       |     1   (0)| 00:00:01 |       |       |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=10)
       3 - filter(ROWNUM<=10)
       6 - filter(("DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13
                  14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')) AND "RELATED_ORGID" IS NOT NULL)
       9 - access("I"."ENTITYTYPE"=1 AND "I"."DATEMODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0 AND "I"."DATEMODIFIED"<=TO_DATE(' 2011-06-13 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
           filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0)
      10 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)
      11 - filter(("DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13
                  14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')) AND "RELATED_ORGID" IS NOT NULL)
      14 - filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND (LNNVL("I"."DATEMODIFIED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("I"."DATEMODIFIED"<=TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
                  "I"."ENTITYID">=0)
      15 - access("I"."ENTITYTYPE"=1 AND "I"."DATECREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."DATECREATED"<=TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      16 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)ife.entityids table has been range - partitioned on data_provider column.
    Is there any better way to rewrite this sql OR is there any way to eliminate concatenation ?
    Thanks

    We cant use data_provider in the given query. We need to pull data irrespective of data_provider and it should be based on ENTITYID.
    Yes table has only three partitions...
    Not sure issue is due to concatenation....but we are in process to create desired indexes which will help for this sql.
    In development we have created multicolumn index and below is the execution plan.....Also in development it takes just 4-5 seconds to execute. But in production it takes more than 8-9 minutes.
    Below is the execution plan from Dev which seems to perform fast:
    Execution Plan
    Plan hash value: 3121857971
    | Id  | Operation                                 | Name                          | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                          |                               |     1 |    57 |   353   (1)| 00:00:05 |       |       |
    |*  1 |  COUNT STOPKEY                            |                               |       |       |            |          |       |       |
    |   2 |   VIEW                                    |                               |     1 |    57 |   353   (1)| 00:00:05 |       |       |
    |*  3 |    SORT ORDER BY STOPKEY                  |                               |     1 |    58 |   353   (1)| 00:00:05 |       |       |
    |   4 |     HASH UNIQUE                           |                               |     1 |    58 |   352   (1)| 00:00:05 |       |       |
    |   5 |      CONCATENATION                        |                               |       |       |            |          |       |       |
    |*  6 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    26 |     3   (0)| 00:00:01 |       |       |
    |   7 |        NESTED LOOPS                       |                               |     1 |    58 |   170   (1)| 00:00:03 |       |       |
    |   8 |         PARTITION RANGE ALL               |                               |    56 |  1792 |    16   (0)| 00:00:01 |     1 |     3 |
    |*  9 |          TABLE ACCESS BY LOCAL INDEX ROWID| ENTITYIDS                     |    56 |  1792 |    16   (0)| 00:00:01 |     1 |     3 |
    |* 10 |           INDEX RANGE SCAN                | IDX_ENTITYIDS_ETYPE_DC        |    56 |       |     7   (0)| 00:00:01 |     1 |     3 |
    |* 11 |         INDEX RANGE SCAN                  | EFX_ORGID                     |     2 |       |     2   (0)| 00:00:01 |       |       |
    |* 12 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    26 |     3   (0)| 00:00:01 |       |       |
    |  13 |        NESTED LOOPS                       |                               |     1 |    58 |   181   (0)| 00:00:03 |       |       |
    |  14 |         PARTITION RANGE ALL               |                               |    57 |  1824 |    10   (0)| 00:00:01 |     1 |     3 |
    |* 15 |          INDEX RANGE SCAN                 | UX_TYPE_MOD_DIST_DEL_ENTITYID |    57 |  1824 |    10   (0)| 00:00:01 |     1 |     3 |
    |* 16 |         INDEX RANGE SCAN                  | EFX_ORGID                     |     2 |       |     2   (0)| 00:00:01 |       |       |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=10)
       3 - filter(ROWNUM<=10)
       6 - filter("RELATED_ORGID" IS NOT NULL AND ("DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')))
       9 - filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0)
      10 - access("I"."ENTITYTYPE"=1 AND "I"."DATECREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."DATECREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      11 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)
      12 - filter("RELATED_ORGID" IS NOT NULL AND ("DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')))
      15 - access("I"."ENTITYTYPE"=1 AND "I"."DATEMODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0 AND "I"."DATEMODIFIED"<TO_DATE(' 2011-06-13 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
           filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND (LNNVL("I"."DATECREATED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("I"."DATECREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
                  "I"."ENTITYID">=0)
      16 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)Thanks

  • Concatenating into a single text field multiple choices from a dialog window

    I present a user with a form which contans a list from where to chose a few items.
    I need to take what he puts in there, and convert it into a string to pass it to a query... They click to select, and click to deselect, and I have to show in the underlying form's parameter list the items he has chosen in this form:
    joe,frank,rizzo
    if he clicks again on rizzo, the list (and he can see it) would show:
    joe,frank
    Thats the first part. Now, I have to pass three or more of these strings to a library procedure to do 'recheck' or validation, against the same tables, etc,). I don't want to put the loop in the library... but if I have to, I can only bring a single variable text string into it. Which means, I have to move each of the various strings of choices into the variable which goes to the library procedure.
    Complex enough?
    I have about three days to figure it out.
    Summary: 1. Concatenating the choices.
    2. sending different values into the library procedure, using the same variable in the library procedure.
    Thanks in advance!
    Nick
    null

    Try something like:
    // Get field values
    var first_name = getField("FirstName").value;
    var middle_name = getField("MiddleName").value;
    var last_name = getField("LastName").value;
    // Build full_name string
    var full_name = "Mr. " + last_name + ", " + first_name + middle_name;
    // Set this field's value equal to full_name
    event.value = full_name;
    This is intended to be the custom calculation script fot the "FullName" field.
    Refinements might be to have the user specify the title (Mr, Mrs, Dr., etc.) and handle missing values properly, but this should get you started.
    If you will be doing much scripting, you should get the Acrobat JavaScript Reference.
    George

  • Bursting using a Concatenated Data Source

    Greetings,
    I am trying to burst a report using a concatenated data source. I have a bursting SQL query set up that works fine, but I am unsure how to handle the "Split By" option. I have a data model that pulls data from multiple queries, like this:
    DETAILS_A
    select * from table_a
    where payee_id in (:p_payee_id)
    DETAILS_B
    select * from table_b
    where payee_id in (:p_payee_id)
    So, if I choose to "Split By" Details_A_Row/Payee_ID, then the data from Details_A is split appropriately, but the reports I generate don't split the information from Details_B properly. I end up with reports where one payee has information for another payee from the Details_B data source. How can I specify that the report should also split/filter the info from Details_B?
    To put it another way, what I'd really like to do is go through a list of parameters (payee IDs in this example) and generate a report for each parameter. Is Bursting the most effective way to do this?
    From searching the forums, it seems like I might be able to accomplish this using Data Templates as my Data Model instead of SQL Queries. Am I on the right track with that? If so, you guys have any helpful links on how to create Data Templates?
    I am using BI Publisher version 10.1.3.4
    Any help is appreciated!
    Martin

    For data template samples, check the following out and then download the zip file (you may not be able to run the reports, but you can view the code)
    http://blogs.oracle.com/xmlpublisher/2009/06/data_template_progression.html
    Thanks,
    BIPuser

  • OBIEE Group By on 2 facts and concatenated columns from different dimensions

    Hi
    I have a different kind of problem involving 2 fact tables with different dimensional attributes.
    Fact 1 has Dim Attributes ( Cust,Facility )
    Measure - Gross Amount
    Fact2 has Dim attributes (Cust,Facility and Risk Group )
    Measure : Exposure Amount
    Since we have 2 facts with different dimensions,
    to exclude the 'Risk Group' dimension column from the group by for the Fact1,
    we set the 'Gross Amount' measure to total level (Risk Group Dimension ) in contents tab.
    So the values from both the fact tables appears in the same report correctly.
    But in the same report we have another requirement where the rating column from the customer dimension has to be concatenated with the ratings column in the facility dimension.
    We have to concatenate customer.rating with the facility.rating and display it in the report.
    when we just pull the individual columns from the dimensions into the report it works fine.
    But when we try to concatenate the 2 columns and show it in the report,
    the concatenated column does not appear in the select or the group by in the SQL Fact2.( Generated by OBIEE )
    The other fact1 has the concatenated column in the select as well as the group by clause ( Generated by OBIEE )
    As a result the report shows the concatenated values only for the results from the Fact1. But the results from Fact2 does not have the concatenated column values.
    The report should look like the below:
    Custor.Name,     Customer.Id,     Facility.Name,     Facility.Id,     Customer.Rating/Facility.Rating,     Risk Group,     Gross Amount,     Exposure Amount
    ===========    =========      ===========     =========   ========================      =========     ===========     ===============
    JPMC                123                    GROSS               123               08/10                                                  LNL                    45,000               25,000
    CLAIRE               456                    NET                    456               07/10                                                  RNK                    50,000               30,000
    Thanks,
    Chandra

    As suggested you really want to move your none-aggregated fact attributes to a logical dimension (using the same physical table as the logical fact). Map this in the BMM layer as a snowflake, Place a hierarchy on this dimension with (at minimum) Total -> Detail levels, then on the other fact table you want to include in the report, set the content level on your other fact measures to the 'Total' level for your new logical Dim and it will allow them to be present in the same report.

  • Data Concatenation - Looking to have result in the Group header

    Dear all,
    Few months ago, I try to concatenate cells under a Group,
    I succeed using the formula gave by Raghavendra 
    Initialize:
    whileprintingrecords;
    stringvar i:="";
    Place the above formula in group header and suppress group header section.
    evaluate:
    whileprintingrecords;
    stringvar i;
    i:=i", "name field;
    Place the above formula in detail section and suppress the details section.
    display:
    whileprintingrecords;
    stringvar i;
    country field" - "i;
    Place the above formula in group footer and right click go to format field and check the option "can grow" in common tab.
    My today issues is that I'm still looking for concatenation but I need it in the Header of the Group, not in the footer
    As far as I understood
      - Crystal Report is reading line by Line, so I can't retrieve the value in the Header before the value are calculate.
      - Moreover I've issue on initialize the value
    I thougth an GlobalVar Array can work, but I can't find the way to do it
    My request is, I've have this DataSet
    Paris | Louvre
    Paris | Eiffel
    Sydney | Opéra
    I'm looking Group on City to have in the Header, the value concatened
    Paris | Louvre, Eiffel
    Sydney | Opéra
    Thanks in advance
    Edited by: Alexandre VANNIER on Dec 2, 2008 2:09 PM

    if i have manual running totals that need to display in the header i do the following
    i create the group - ie- jobid
    i either insert a sub group below or create a 2nd group with the same field
    then i create a 3rd group with the same field
    i place my reset in the 1st group
    calc in 2nd
    display in 3rd

  • Error about using a concatenated calculated column in a SSAS Tabular model

    Hi,
    in a my tabular model I've added in a dimension table a calculated column concatenating a code and a description. The code is used to create a relation between a fact table and this dimension table.
    When I try to use the tabular model inside Excel and select the concatenated column as a filter I've this error message:
    I've tried to recalculate some times the tabular database after the deployment of the model changes and I've tried to run a full process of the entire database but any results.
    Any suggests to me in order to solve this issue, please?
    Thanks

    Hi, I've solved. The concatenate formula was with "+" operator and not "&".
    But during the column creation I've any errors also if the model in SSDT was empty.
    Bye

  • Error while create aggmap for concatenated dimension ???

    How can I create aggmap for concatenated dimension ??
    I created dimensions named awprod_lvl0 ,awprod_lvl1,awprod_lvl2,awprod_lvl3,awprod_lvl4 and concatenated with a dimension awproducts. Then I created a parent relation awproducts.parents and mapped into the relational tables using sql fetch procedure .Iam able to see values in the olap work sheet .When i tried to create aggmap for different aggregation , it is throwing an error??It is telling that awproducts and awpro_lvl4_id cannot appear because they share same base level dimension...
    can anyone help in resolving this problem?????

    Jithesh, could you provide the exact definitions for the aggmaps, dimensions and relations that you're using?

  • Getting error while concatenating in reports 6i

    Hi I build one report and in one of the formula column i am concatenating 2 field based on some condition example is below
    there are 5 fields all of them are varchar2
    Ship_to_customer_name
    ship_address1
    ship_address2
    ship_address3
    ship_address4
    and I have declared a variable in the function
    V_VARIABLE varchar2(2000);
    now if the ship_address1 is not null then
    V_VARIABLE := substr(:Ship_to_customer_name,1,40) || '*' || substr(:ship_address1,1,40);
    then else part is there
    PROBLEM : I am getting error as below
    " REP -1401 'formuale_name' :fatal Pl/SQL error occured
    ORA - 06502 pl/sql : numric or value error
    If I remove the concatenate and simply use below
    V_VARIABLE := substr(:Ship_to_customer_name,1,40)
    then it is fine .
    I am working on reports 6i and data base is 10g
    Thanks in advance

    check the data type and size of the formula column('formuale_name). It's the error related to data type and size. If it's less than the variable value then it will throw that error

  • GL Account Key displays Chart of accounts concatenated with GL Account

    Hi,
    When we pull the GL Account Key object into a WEBI report, the Chart of Account value is concatenating with the GL Account number like ABDA/253616. In Bex Query, choosing the Chart of accounts and GL Account in the Analyser gives only the number value of the GL Account 253616.
    How do we resolve this issue.
    Thanks,
    Anu

    Hi,
    We had a similar problem, and we fixed it by using a variable.
    Create a variable (e.g. GL Account) with the following formula:
    =tonumber(replace([L01_GL_ACC_Key];"ABDA/";""))
    where,
    [L01_GL_ACC_Key] = Original Account key with the Chart of Accounts
    "ABDA/" The piece of the account that you want removed
    The formula will convert your account number to a number by replacing the "ABDA/" with a blank (the "" in the formula)
    Note: There is no space between the two quotation marks
    You can now use the variable in your report instead of the original account key.
    Regards,
    Sias

  • How do I break up a concatenated disk set?

    After spending the better part of a week trying to shoehorn in two 500Gb SATA drives into my G4, I coming around to the conclusion that the Sonnet Tech PCI to SATA (TSATA) controller firmware, is not up to the challenge of concatenated drives. The OS and all the files loaded on just fine, but the system simply doesn't want to boot from that volume.
    In the short term: I want to separate the drives, to make sure the controller is fully functional i.e. can boot from a single drive.
    Long term: send the (new) drives back to the vender while I am still within the grace period, and buy one large drive.
    The question now is: has anyone separated a raid back into it's constitute pieces before?
    Do I just pull the plug on one and try an erase?

    Tom,
    Yeah, I read that too. I have the model TSATA, 2 port, 1.5Gb/sec, internal.
    I was able to pull one drive and erase it, put a minimal OS on it and boot.
    Now I am trying to find a compatible 750Gb SATA drive, I was going to buy the Seagate until I read there is a problem with the firmware, something about 32mb cache not being recognized and it running dog-slow, also something about nor being able to flash the firmware form a MAC?

  • How do I repair a damaged controller for concatenated RAID

    Hi all-- Bit of an emergency. My iMac has been crashing a lot lately and finally it's hard drive just up and failed. I have been doing hourly Time Machine backups to a concatenated RAID set (2 USB drives of 1 TB each). However, I think the iMac crashed while backing up and hosed the RAID controller.
    I've since plugged the two disks of the RAID into my MacBook Pro to see if I can repair them. I can see the individual disks of the RAID in Disk Utility. I can even verify and repair them. But i can't do that with the RAID in the sidebar, and it won't mount on the desktop. When I try to eject it from the DIsk Utility file menu, it says disks are in use.
    I'm pretty sure my data on the two disks is intact, but I can't seem to get the RAID to mount as the single concatenated set on a desktop, which makes it inaccessble. Is there a way to repair the JBOD RAID without losing all my data, so I can then restore from the latest backup to my hosed iMac?
    thanks!
    Chris

    I'd just like to add some screen shots so you can see what's going on:
    This is what's happening in Disk Utility. As you can see, all the slices are being seen, it says it's online, etc., but it's grayed out in the side bar and I can't seem to actually do anything with them.
    And here's what diskutil in Terminal says. As you can see, it's finding it, and I can even "mount" Backup, but it doesn't actually mount it. What does the "rebuild: manual" mean?
    Any advice on fixing this would be GREATLY appreciated. Thanks so much.
    Chris

  • Concatenated field required in the DME format

    Dear All,
    I am using DMEE tree for the format required by the bank. In the format I need to change the field value after concatenating it.
    For Eg.
    If the Payment Method of the transaction is 'N' then the value in the output file will be 'N06'.
    For this first I want to know which is the field available in the DME tree for the payment method.
    Second how i can implement the concatenation of the field.
    Thanks & Regards
    Edited by: Vinda bailwar on May 3, 2011 5:48 AM

    Hi,
    If you want to concatenate than you need to create atoms for passing value.
    Please follow the below steps:-
    For Element
    At attributes tab select: mapping procedure as Own Mapping(atoms) and Atom handling: 01
    For payment method atom
    At attributes tab select : mapping procedure as Structure Field.
    At Source tab provide
    Structure: FPAYH
    Field name:RZAWE
    For Constant '06' atom
    At attributes tab select: mapping procedure as Constant.
    At Source tab provide: 06
    Regards,
    Anand Raichura

  • Function - Return More than One Value in a Concatenated String

    Hi,
    Is it possible for a function to return a concatenated string(combining more than one number). I am trying to return the PO number by inputting and invoice_id and code number but an invoice_id can have more than one PO with the same code number. I would like to concatenate the PO numbers with commas e.g.
    10124, 10090, 10987
    At the moment the function returns null for these cases that have more than one PO number.
    Thanks

    Also is is possible to create another function that can be called in the same script using the PO number as an IN parameter in SQL. See SQL below:
    select cck.concatenated_segments as "Segment" ,
    cc.code_combination_id,
    NVL ( src . user_je_source_name , '**********' ) AS "Source" ,
    NVL ( cat . user_je_category_name , '**********' ) AS "Category" ,
    jel . period_name as "Period Name" ,
    i.invoice_id as "Invoice ID",
    s.vendor_name as "Vendor Name",
    s.segment1 as "Supplier No",
    jeb . name as "Batch Name" ,
    func_get_po(i.invoice_id, cc.code_combination_id) "PO No",
    jeh . name AS "Header Name" ,
    jel . description AS "Description" ,
    jel.accounted_dr AS "Debit" ,
    jel.accounted_cr AS "Credit" ,
    NVL(jel.accounted_dr, 0) - NVL(jel.accounted_cr, 0) AS "Net Amount"
    FROM apps.gl_code_combinations cc ,
    apps.gl_code_combinations_kfv cck,
    apps.gl_je_lines jel ,
    apps.gl_je_headers jeh ,
    apps.gl_je_batches jeb ,
    apps.gl_je_categories cat ,
    apps.gl_je_sources src,
    apps.gl_import_references r,
    apps.xla_ae_lines al,
    apps.xla_ae_headers ah,
    apps.xla_events e,
    xla.xla_transaction_entities te,
    apps.ap_invoices_all i,
    apps.ap_suppliers s
    WHERE ( cck.concatenated_segments BETWEEN '23.83545.141.000.00.23.000.000' AND '23.83545.141.000.00.23.000.000'
    AND cc.CHART_OF_ACCOUNTS_ID = 50328
    AND jeh.LEDGER_ID IN
    (select acc.ledger_id
    FROM apps.gl_access_set_ledgers acc
    WHERE acc.access_set_id = 1000
    AND jel.code_combination_id = cc.code_combination_id
    AND cck.code_combination_id = cc.code_combination_id
    AND jel.status
    || '' = 'P'
    AND ( jel.accounted_dr != 0
    OR jel.accounted_cr != 0 )
    AND jeh.je_header_id = jel.je_header_id
    AND jeh.actual_flag = 'A'
    AND 1 = 1
    AND jeh.currency_code != 'STAT'
    AND jeb.je_batch_id = jeh.je_batch_id
    AND jeb.average_journal_flag = 'N'
    and src.je_source_name = jeh.je_source
    and cat.je_category_name = jeh.je_category
    and r.je_header_id(+) = jel.je_header_id
    and r.je_line_num(+) = jel.je_line_num)
    AND ( :period_name = jel.period_name
    and al.gl_sl_link_id(+) = r.gl_sl_link_id
    and al.ae_header_id = ah.ae_header_id(+)
    and al.application_id = ah.application_id(+)
    and ah.application_id = e.application_id(+)
    and ah.event_id = e.event_id(+)
    and e.application_id = te.application_id(+)
    and e.entity_id = te.entity_id(+)
    and nvl(te.source_id_int_1,-99) = i.invoice_id(+)
    and i.vendor_id = s.vendor_id(+) )
    AND ( jel.ledger_id = 2041)
    ORDER BY src.user_je_source_name ,
    cat.user_je_category_name ,
    jeb.name ,
    jeh.name ,
    cck.concatenated_segments ,
    jel.je_line_num
    I am using func_get_po(i.invoice_id, cc.code_combination_id), I would like to call another function in this script that uses the PO number as an IN parameter.
    For example func_get_po_requester(i.invoice_id, cc.code_combination_id, func_get_po(i.invoice_id, cc.code_combination_id))
    Would this work?
    Thanks

Maybe you are looking for

  • Upgrading sun identity manager 7.1.1 to 8.1

    hi all, I am Upgrading sun identity manager 7.1.1 to 8.1 and ran the DB script upgradeto81from71.oracle. It takes a long time and eventually hangs on this statement: CREATE INDEX repo1.userobj_repomod ON repo1.userobj(repomod); We have large number o

  • Obiee 11g . problem with set default as columnname in interaction tab

    Hi Obiee gurus , I have small problem with set default option in interaction tab in column properties. actually my problem is , i changed one column bold save as set default option bold and how to revert back to my column option. when i create new an

  • Deletion of Data Mart Request taking more time

    Hi all, One of the Data Mart process(ODS to Infocube) has failed. Im not able to delete the request in Infocube. When delete option executed, its taking more time while im monitoring that job in SM37 and its not getting completed. The details seen in

  • Seperate PO forms for ammendment & cancellation

    Dear Experts, We have a requirement to have seperate PO forms for cancelled PO ( all items deleted ) & ammended PO ( Changes ). please let me know what configurations need to be done from MM side. Do we have to create new output types & please let me

  • How to "unauthorize or deactivate" computer from CC when in repair service?

    How to unauthorize this computer from my CC account temporarily while being serviced for repairs? I am taking my iMac in for servicing...from which it may never return...but it might...so I just want to "unauthorize" my Creative Cloud installed appli