Forcing a path to create the query

Hi everybody,
here is my doubt about OBIEE: let's say I have three dimension tables and two fact tables, all joined together (DimA joined to Fact1 and Fact2, DimB joined to Fact1 and Fact2 and Dim3 also joined to Fact1 and Fact2). How can I force which way to go from one dim to another? So for example, if I select DimA and DimB and want the join through Fact1 but instead it's going through Fact2.
I have read about setting an implicit fact, but that doesn't work in my model. I guess this would work fine if my model was a truly star model, but I dont have this, not all dims are related to one same fact.
Any ideas? I'm starting to think that OBIEE has too many limitations :(

Hi.
Try with implicit fact column properties in presentation layer for that subject area.
This is written in documentation (Administration Tool):
If you set an implicit fact column this column will be added to a query when it contains columns from two or more dimension tables and no measures. The column is not visible in the results. It is used to specify a default join path between dimension tables when there are several possible alternatives.
So, everything is the documentation.
I use it for something similar.
Regards,
Goran
http://108obiee.blogspot.com

Similar Messages

  • How to create the Query and T Code for Special Reports

    Dear Freinds,
    Could any one advise the process to create the Query and the T code for some special combination of reports. Where can we find the documentation on this if that exists?
    Thanks for the help.
    Regards
    Moderator: Please, search SDN - you'll find the answers

    HI
    Go to Tools -->ABAP WorkBench -->Utilities --> SQVI QuickViewer ( Query Builder)
    Go to Tools -->ABAP WorkBench -->Utilities -->SAP Query -->SQ01,SQ02,SQ03
    first create Infosets in SQ02, Assign Infoset to UserGroups in SQ03 and create a Query in SQ01.
    Create a Transaction Code in SE93.
    regards
    Venkat

  • How to create the query with multiple node types

    Hi,
    I am having an issue in creating a query to search multiple node types.
    The requirement is to query documents/pages of the type dam:Asset and cq:Page present under a path.
    I tried the following code snippet with no luck .
    path=/content
    1_type=cq:Page
    2_type=dam:Asset
    property=jcr:content/metadata/@cq:tags
    property.1_value=<tag Name>
    I was able to write a query with single type. However i could not find any documents/ materials with multipe types as shown above.
    Thanks in advance.
    Regards
    Sudhi

    I don't think multiple type is possible. Instead use super type like nt:base that will cover both page and asset.
    Yogesh
    www.wemblog.com

  • In SSMS after creating the query Report, how to export excel the same report from SSMS

    for Beginners in SSMS after the report is created , how to export the same report to excel, I did try the option to task and export and follow the procedure, this procedure does not export the same report, the one was created, unless I am missing some steps,
    is there a way to do just like we do in SSRS go to solution explorer, and properties and add the Target Server URL or not
    in SSMS, 
    after I save the report it saves in project , can some one please guide me how to do it, and what steps I am doing wrong,
    any help will be great.  I am not technical person, just starting to learn from internet.
    thanks in advance.

    As you have said you are not a technical person try using Import Export wizard.
    Refer this link
    http://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/
    And another simplest one is to copy the result set from the query window. Right click the result and select "Copy with Headers".
    Regards, RSingh

  • How to manage Locale info in the URL path, but not the query string

    We are building an application using Struts 1.1 and Tiles, on Oracle Application Server 10.1.3.3...
    I know this is a strange question... but we have a requirement to represent the locale info in the URL string using one of the following options:
    option 1: /eng/page.do?id=2 for english.../fra/page.do?id=2
    option 2: /page-eng.do?id=2 for english.... and /page-fra.do?id=2 for french
    We need to represent the 3 letter ISO lang code either in the directory structure, or suffix the page name (in our case, the struts action name)... we cannot replicate this using a parameter in the query string. I know this is odd, but that is what we are told to implement.
    Is there any robust way of implementing either option in Struts 1.1, JSP, JSTL etc...?
    Currently, we are looking at using a servlet filter to intercept the HTTP requests, parse the URL string, and extract the ISO lang value, and set locale and forward on the request.
    This poses a few problems... adding additional action mappings (page-eng... page-fra... page) to our struts-xml.config file to handle lang permuations... but the biggest issue is all the embedded html:link action values throughout our code...
    Because all our public facing URLs must comply with the rule, we need to change the html:link action to point to a different action, based on locale.
    Very inefficent, and I'm sure not industry standard best practice... we are using Tiles, and resource bundles for all our labels etc... but fall short in meeting this rule with regards to URLs and locale.
    Any advice or tips etc.. is greatly appreciated.

    The filter option sounds like a good solution. So it can receive the urls and parse them appropriately.
    You just need to take it one step further.
    Additional actionmappings in your struts-config should not be necessary.
    Filter:
    - analyses the url and sets the appropriate locale
    - adjusts the url such that the next level of the chain does not have to know anything about the locale being encoded in the url string.
    Thus your struts classes and mappings can remain unchanged
    /eng/page.do or /fra/page.do once through the filter should just look like /page.do to struts.
    That should get rid of half of your headache.
    Next the issue of generating urls.
    There are two approaches I can see here
    1 - use the filter approach again, this time with some post processing. Gather the generated HTML in a buffer, and do a find/replace on any urls generated, to put the locale encoding into them.
    2 - Customise struts to produce urls in this format. This would involve the html:link tag, and the html:form tag at the least (maybe others?). Get the source code for struts, and grab the html:link tag code. Extend that class to generate urls as you want them to be generated. I think you would need to extend the class org.apache.struts.taglib.html.LinkTag and override the protected method calculateURL. You would then have to edit/modify the struts-html tld to point the link tag at your classes rather than the standard ones.
    Option 1 is architecturally good because it gives you a well defined layer/border between having the locale encoded in the url, and not having it there. However it involves doing a find/replace on every html going out. This would catch all urls, whether generated by html:link tag or not.
    Option 2 requires customising struts for your own requirements, which may be a bit daunting, but has the advantage of generating the urls correctly without the extra overhead involved with option 1. Of course you would have to ensure that ALL urls are generated with the html:link tag.
    On reflection, I think option 1 is preferable, as both easier and quicker to implement, and doing a better separation in the architecture.
    Cheers,
    evnafets

  • To create the Query - make simple

    Hi,
    Totally four time refered same table , How to make the simple query?. Please suggest me.
    1)
    INNER JOIN item_chr_val_t WgtVolPerUnitAct_item
    ON itemcntchr.item_id = WgtVolPerUnitAct_item.item_id
    INNER JOIN chr_val_T WgtVolPerUnitAct_chrv
    ON WgtVolPerUnitAct_item.chr_id = WgtVolPerUnitAct_chrv.chr_id
    AND WgtVolPerUnitAct_item.chr_val_id = WgtVolPerUnitAct_chrv.chr_val_id
    INNER JOIN chr_T WgtVolPerUnitAct_chr
    ON WgtVolPerUnitAct_chrv.chr_id = WgtVolPerUnitAct_chr.chr_id
    2)
    INNER JOIN item_chr_val_t NoInMulPackAct_item
    ON WgtVolPerUnitAct_item.item_id = NoInMulPackAct_item.item_id
    INNER JOIN chr_val_T NoInMulPackAct_chrv
    ON NoInMulPackAct_item.chr_id = NoInMulPackAct_chrv.chr_id
    AND NoInMulPackAct_item.chr_val_id = NoInMulPackAct_chrv.chr_val_id
    INNER JOIN chr_T NoInMulPackAct_chr
    ON NoInMulPackAct_chrv.chr_id = NoInMulPackAct_chr.chr_id
    3)
    INNER JOIN item_chr_val_t MassWeightGros_item
    ON NoInMulPackAct_item.item_id = MassWeightGros_item.item_id
    INNER JOIN chr_Val_t MassWeightGros_chrv
    ON MassWeightGros_item.chr_val_id = MassWeightGros_chrv.chr_Val_id
    AND MassWeightGros_item.chr_id = MassWeightGros_chrv.chr_id
    INNER JOIN chr_t MassWeightGros_chr
    ON MassWeightGros_chrv.chr_id = MassWeightGros_chr.chr_id
    4) Main query referered same table
    Filteration part
    AND WgtVolPerUnitAct_chr.chr_code = pa.WgtVolPerUnitAct_code
    AND WgtVolPerUnitAct_item.chr_val_id IS NOT NULL
    AND NoInMulPackAct_chr.chr_code =pa.NoInMulPackAct_code
    AND NoInMulPackAct_item.chr_val_id IS NOT NULL
    AND MassWeightGros_chr.chr_code = pa.MassWeightGros_code
    AND MassWeightGros_item.chr_val_id IS NOT NULL
    With param As
    SELECT
    (SELECT RptPrmVal.rpt_prm_val_key
    FROM rpt_prm_val_instnc_assn_t RptPrmValInstasn
    INNER JOIN rpt_prm_val_t RptPrmVal
    ON RptPrmValInstasn.rpt_prm_val_id = RptPrmVal.rpt_prm_val_id
    WHERE RptPrmValInstasn.rpt_instnc_id = 85
    AND rptprmval.rpt_prm_id = 85
    ) WgtVolPerUnitAct_code,
                        (SELECT RptPrmVal.rpt_prm_val_key
    FROM rpt_prm_val_instnc_assn_t RptPrmValInstasn
    INNER JOIN rpt_prm_val_t RptPrmVal
    ON RptPrmValInstasn.rpt_prm_val_id = RptPrmVal.rpt_prm_val_id
    WHERE RptPrmValInstasn.rpt_instnc_id = 85
    AND rptprmval.rpt_prm_id = 80
    ) NoInMulPackAct_code,                    
    (SELECT RptPrmVal.rpt_prm_val_key
    FROM rpt_prm_val_instnc_assn_t RptPrmValInstasn
    INNER JOIN rpt_prm_val_t RptPrmVal
    ON RptPrmValInstasn.rpt_prm_val_id = RptPrmVal.rpt_prm_val_id
    WHERE RptPrmValInstasn.rpt_instnc_id = 85
    AND rptprmval.rpt_prm_id = 75
    ) MassWeightGros_code,
                        pkg_grd_global.f_get_central_language() central_lang,
                        PKG_GRD_GLOBAL.f_get_main_dscr_id ('REGION',pkg_grd_global.f_get_rgn_id_by_iso('xgl')) main_dscr_id
         FROM
              DUAL
    SELECT
         DECODE (regiON, 'GLOBAL','A',regiON ) ORDER_BY_COUNTRY,
         Qry_Ret.*
    FROM
    SELECT DISTINCT      
              PKG_GRD_GLOBAL.f_get_enty_main_dscr ('RGN',itemrgn.rgn_id,pa.main_dscr_id,pa.central_lang) regiON,     
    glblhier.CTRL_CHR_VAL_NAME module,
    glblhier.PROD_GRP_NAME pg,
    glblhier.SUPER_GRP_NAME sg,
    item.item_code item_code,
    idc.item_dscr item_dscr,
    DECODE (item.is_shared_ind,'Y','SHARED','N','NOT SHARED') Item_share,
    DECODE (itemrgn.is_ffu_ind, 'Y','IS FFU','N','IS NOT FFU') Item_ffu,
    PKG_GRD_GLOBAL.f_get_enty_main_dscr ('CVAL',WgtVolPerUnitAct_item.chr_val_id,PKG_GRD_GLOBAL.f_get_main_dscr_id ('CHARACTERISTIC VALUE',WgtVolPerUnitAct_chr.rgn_id),pa.central_lang) WgtVolPerUnitAct,
    PKG_GRD_GLOBAL.f_get_enty_main_dscr ('CVAL',NoInMulPackAct_item.chr_val_id,PKG_GRD_GLOBAL.f_get_main_dscr_id ('CHARACTERISTIC VALUE',NoInMulPackAct_chr.rgn_id),pa.central_lang) NoInMulPackAct,
    PKG_GRD_GLOBAL.f_get_enty_main_dscr ('CVAL',MassWeightGros_item.chr_val_id,PKG_GRD_GLOBAL.f_get_main_dscr_id ('CHARACTERISTIC VALUE',MassWeightGros_chr.rgn_id),pa.central_lang) MassWeightGros,
    itemrgn.dstn_strt_dt item_first_received_date,
    WgtVolPerUnitAct_chrv.numrc_val WgtVolPerUnitAct_numrc_val,
    decode (upper( PKG_GRD_GLOBAL.f_get_enty_main_dscr ('UOM',WgtVolPerUnitAct_chrv.uom_id,PKG_GRD_GLOBAL.f_get_dscr_id ('UNIT',pkg_grd_global.f_get_rgn_id_by_iso('xgl'),'LONG'),pa.central_lang)),
    'MILLILITRES',1,'CENTILITRES',10,'LITRES',1000,'GRAMS',1,'MILLIGRAMS',0.001,'KILOGRAMS',1000),
    NoInMulPackAct_chrv.numrc_val NoInMulPackAct_numrc_val,
    MassWeightGros_chrv.numrc_val MassWeightGros_numrc_val,
    decode (upper( PKG_GRD_GLOBAL.f_get_enty_main_dscr ('UOM',MassWeightGros_chrv.uom_id,PKG_GRD_GLOBAL.f_get_dscr_id ('UNIT',pkg_grd_global.f_get_rgn_id_by_iso('xgl'),'LONG'),pa.central_lang)),
    'MILLILITRES',1,'CENTILITRES',10,'LITRES',1000,'GRAMS',1,'MILLIGRAMS',0.001,'KILOGRAMS',1000)
    FROM item_t item
    INNER JOIN item_rgn_assn_t itemrgn
    ON item.item_id = itemrgn.item_id
    INNER JOIN item_dscr_t idc
    ON itemrgn.item_id = idc.item_id
    INNER JOIN hdng_typ_t itemhdng
    ON idc.hdng_typ_id = itemhdng.hdng_typ_id
    INNER JOIN item_chr_val_t itemcntchr
    ON idc.item_id = itemcntchr.item_id
    INNER JOIN glbl_hier_t glblhier
    ON itemcntchr.chr_val_id = glblhier.CTRL_CHR_VAL_ID
    INNER JOIN item_chr_val_t WgtVolPerUnitAct_item
    ON itemcntchr.item_id = WgtVolPerUnitAct_item.item_id
    INNER JOIN chr_val_T WgtVolPerUnitAct_chrv
    ON WgtVolPerUnitAct_item.chr_id = WgtVolPerUnitAct_chrv.chr_id
    AND WgtVolPerUnitAct_item.chr_val_id = WgtVolPerUnitAct_chrv.chr_val_id
    INNER JOIN chr_T WgtVolPerUnitAct_chr
    ON WgtVolPerUnitAct_chrv.chr_id = WgtVolPerUnitAct_chr.chr_id
    INNER JOIN item_chr_val_t NoInMulPackAct_item
    ON WgtVolPerUnitAct_item.item_id = NoInMulPackAct_item.item_id
    INNER JOIN chr_val_T NoInMulPackAct_chrv
    ON NoInMulPackAct_item.chr_id = NoInMulPackAct_chrv.chr_id
    AND NoInMulPackAct_item.chr_val_id = NoInMulPackAct_chrv.chr_val_id
    INNER JOIN chr_T NoInMulPackAct_chr
    ON NoInMulPackAct_chrv.chr_id = NoInMulPackAct_chr.chr_id
    INNER JOIN item_chr_val_t MassWeightGros_item
    ON NoInMulPackAct_item.item_id = MassWeightGros_item.item_id
    INNER JOIN chr_Val_t MassWeightGros_chrv
    ON MassWeightGros_item.chr_val_id = MassWeightGros_chrv.chr_Val_id
    AND MassWeightGros_item.chr_id = MassWeightGros_chrv.chr_id
    INNER JOIN chr_t MassWeightGros_chr
    ON MassWeightGros_chrv.chr_id = MassWeightGros_chr.chr_id
    INNER JOIN param pa
    ON 1=1
    WHERE idc.lang_id = pa.central_lang
    AND itemhdng.online_hdng_flg = 'Y'
    AND itemrgn.actv_dstn_ind = 'Y'
    AND WgtVolPerUnitAct_chr.chr_code = pa.WgtVolPerUnitAct_code
    AND WgtVolPerUnitAct_item.chr_val_id IS NOT NULL
    AND NoInMulPackAct_chr.chr_code =pa.NoInMulPackAct_code
    AND NoInMulPackAct_item.chr_val_id IS NOT NULL
    AND MassWeightGros_chr.chr_code = pa.MassWeightGros_code
    AND MassWeightGros_item.chr_val_id IS NOT NULL
    ) Qry_Ret
    Regards,
    Sudhakar P.

    Maybe
    please consider it as a template it's paper and pencil work, Notepad actually.
    I don't have your tables and no knowledge about what your query is supposed to do, I just tried a transformation aimed to avoid the repeated use of several tables
    with
    param As
    (select WgtVolPerUnitAct_code,WgtVolPerUnitAct_code,MassWeightGros_code,
            pkg_grd_global.f_get_central_language() central_lang,
            PKG_GRD_GLOBAL.f_get_main_dscr_id('REGION',pkg_grd_global.f_get_rgn_id_by_iso('xgl')) main_dscr_id
       from (select max(decode(rptprmval.rpt_prm_id,85,RptPrmVal.rpt_prm_val_key)) WgtVolPerUnitAct_code,
                    max(decode(rptprmval.rpt_prm_id,80,RptPrmVal.rpt_prm_val_key)) WgtVolPerUnitAct_code,
                    max(decode(rptprmval.rpt_prm_id,75,RptPrmVal.rpt_prm_val_key)) MassWeightGros_code
               from rpt_prm_val_instnc_assn_t RptPrmValInstasn,
                    rpt_prm_val_t RptPrmVal
              WHERE RptPrmValInstasn.rpt_prm_val_id = RptPrmVal.rpt_prm_val_id
                AND RptPrmValInstasn.rpt_instnc_id = 85
                AND rptprmval.rpt_prm_id in (85,80,75)
    SELECT DECODE(regiON,'GLOBAL','A',regiON ) ORDER_BY_COUNTRY,
           Qry_Ret.*
      FROM (SELECT DISTINCT
                   PKG_GRD_GLOBAL.f_get_enty_main_dscr('RGN',
                                                       rgn_id,
                                                       main_dscr_id,
                                                       central_lang
                                                      ) regiON,     
                   CTRL_CHR_VAL_NAME module,
                   PROD_GRP_NAME pg,
                   SUPER_GRP_NAME sg,
                   item_code,
                   item_dscr,
                   Item_share,
                   Item_ffu,
                   case when WgtVolPerUnitActitem_chrvalid IS NOT NULL
                         and WgtVolPerUnitActchr_rgnid IS NOT NULL
                        then PKG_GRD_GLOBAL.f_get_enty_main_dscr('CVAL',
                                                                 WgtVolPerUnitActitem_chrvalid,
                                                                 PKG_GRD_GLOBAL.f_get_main_dscr_id('CHARACTERISTIC VALUE',
                                                                                                   WgtVolPerUnitActchr_rgnid
                                                                 central_lang
                                                                ) WgtVolPerUnitAct,
                   case when NoInMulPackActitem_chrvalid IS NOT NULL
                         and NoInMulPackActchr_rgnid IS NOT NULL
                        then PKG_GRD_GLOBAL.f_get_enty_main_dscr('CVAL',
                                                                 NoInMulPackActitem_chrvalid,
                                                                 PKG_GRD_GLOBAL.f_get_main_dscr_id('CHARACTERISTIC VALUE',
                                                                                                   NoInMulPackActchr_rgnid
                                                                 central_lang
                                                                ) NoInMulPackAct,
                   case when MassWeightGrositem_chrvalid IS NOT NULL
                         and MassWeightGroschr_rgnid IS NOT NULL
                        then PKG_GRD_GLOBAL.f_get_enty_main_dscr('CVAL',
                                                                 MassWeightGrositem_chrvalid,
                                                                 PKG_GRD_GLOBAL.f_get_main_dscr_id('CHARACTERISTIC VALUE',
                                                                                                   MassWeightGroschr_rgnid
                                                                 central_lang
                                                                ) MassWeightGros,
                   item_first_received_date,
                   WgtVolPerUnitAct_numrcval WgtVolPerUnitAct_numrc_val,
                   case when WgtVolPerUnitAct_uomid IS NOT NULL
                        then decode(upper(PKG_GRD_GLOBAL.f_get_enty_main_dscr('UOM',
                                                                              WgtVolPerUnitAct_uomid,
                                                                              PKG_GRD_GLOBAL.f_get_dscr_id('UNIT',
                                                                                                           pkg_grd_global.f_get_rgn_id_by_iso('xgl'),
                                                                                                           'LONG'
                                                                              central_lang
                                    'MILLILITRES',1,'CENTILITRES',10,'LITRES',1000,'GRAMS',1,'MILLIGRAMS',0.001,'KILOGRAMS',1000
                   end ,
                   NoInMulPackAct_numrcval NoInMulPackAct_numrc_val,
                   MassWeightGros_numrcval MassWeightGros_numrc_val,
                   case when MassWeightGros_uomid IS NOT NULL
                        then decode(upper(PKG_GRD_GLOBAL.f_get_enty_main_dscr('UOM',
                                                                              MassWeightGros_uomid,
                                                                              PKG_GRD_GLOBAL.f_get_dscr_id('UNIT',
                                                                                                           pkg_grd_global.f_get_rgn_id_by_iso('xgl'),
                                                                                                           'LONG'
                                                                              central_lang
                                    'MILLILITRES',1,'CENTILITRES',10,'LITRES',1000,'GRAMS',1,'MILLIGRAMS',0.001,'KILOGRAMS',1000
                   end
              FROM (SELECT itemrgn.rgn_id,
                           pa.main_dscr_id,
                           pa.central_lang,
                           glblhier.CTRL_CHR_VAL_NAME module,
                           glblhier.PROD_GRP_NAME pg,
                           glblhier.SUPER_GRP_NAME sg,
                           item.item_code item_code,
                           idc.item_dscr item_dscr,
                           DECODE(item.is_shared_ind,'Y','SHARED','N','NOT SHARED') Item_share,
                           DECODE(itemrgn.is_ffu_ind,'Y','IS FFU','N','IS NOT FFU') Item_ffu,
                           case when chrt.chr_code = pa.WgtVolPerUnitAct_code
                                then itemcntchr.chr_val_id
                           end WgtVolPerUnitActitem_chrvalid,
                           case when chrt.chr_code = pa.NoInMulPackAct_code
                                then itemcntchr.chr_val_id
                           end NoInMulPackActitem_chrvalid,
                           case when chrt.chr_code = pa.MassWeightGros_code
                                then itemcntchr.chr_val_id
                           end MassWeightGrositem_chrvalid,
                           case when chrt.chr_code = pa.WgtVolPerUnitAct_code
                                then chrt.rgn_id
                           end WgtVolPerUnitActchr_rgnid,
                           case when chrt.chr_code = pa.NoInMulPackAct_code
                                then chrt.rgn_id
                           end NoInMulPackActchr_rgnid,
                           case when chrt.chr_code = pa.MassWeightGros_code
                                then chrt.rgn_id
                           end MassWeightGroschr_rgnlid,
                           itemrgn.dstn_strt_dt item_first_received_date,
                           case when chrt.chr_code = pa.WgtVolPerUnitAct_code
                                then chrvalt.numrc_val
                           end WgtVolPerUnitAct_numrcval,
                           case when chrt.chr_code = pa.NoInMulPackAct_code
                                then chrvalt.numrc_val
                           end NoInMulPackAct_numrcval,
                           case when chrt.chr_code = pa.MassWeightGros_code
                                then chrvalt.numrc_val
                           end MassWeightGros_numrcval,
                           case when chrt.chr_code = pa.WgtVolPerUnitAct_code
                                then chrvalt.uom_id
                           end WgtVolPerUnitAct_uomid,
                           case when chrt.chr_code = pa.MassWeightGros_code
                                then chrvalt.uom_id
                           end MassWeightGros_uomid
                      FROM item_t          item,
                           item_rgn_assn_t itemrgn,
                           item_dscr_t     idc,
                           hdng_typ_t      itemhdng,
                           item_chr_val_t  itemcntchr,
                           glbl_hier_t     glblhier,
                           chr_T           chrt,
                           chr_val_T       chrvalt,
                           param           pa
                     WHERE item.item_id          = itemrgn.item_id
                       AND itemrgn.item_id       = idc.item_id
                       AND idc.hdng_typ_id       = itemhdng.hdng_typ_id
                       AND idc.item_id           = itemcntchr.item_id
                       AND idc.lang_id           = pa.central_lang
                       AND itemcntchr.chr_id     = chrvalt.chr_id
                       AND itemcntchr.chr_val_id = glblhier.CTRL_CHR_VAL_ID
                       AND itemcntchr.chr_val_id = chrvalt.chr_val_id
                       AND chrt.chr_id           = chrvalt.chr_id
                       AND chrt.chr_code in (pa.WgtVolPerUnitAct_code,pa.NoInMulPackAct_code,pa.MassWeightGros_code)
                       AND itemcntchr.chr_val_id IS NOT NULL
                       AND itemhdng.online_hdng_flg = 'Y'
                       AND itemrgn.actv_dstn_ind    = 'Y'
           ) Qry_RetRegards
    Etbin

  • Please help create the query

    I have table which has 4 columns (A,B,C,D)
    Table t1
    A B C D
    1 - - -
    - 2 - -
    - - 3 -
    - - - 4
    5 - - -
    - 6 - -
    - - 7 -
    - - - 8
    the required output is
    Table T2
    A B C D
    1 2 3 4
    5 6 7 8
    How can i come up with this output

    like this
    with t
    as
    select 1 c1, null c2, null c3, null c4 from dual union all
    select null, 2, null, null from dual union all
    select null, null, 3, null from dual union all
    select null, null, null, 4 from dual union all
    select 5, null, null, null from dual union all
    select null, 6, null, null from dual union all
    select null, null, 7, null from dual union all
    select null, null, null, 8 from dual
    select max(c1), max(c2), max(c3), max(c4)
      from (
             select t.*,
                    last_value(c1 ignore nulls) over(order by nvl(c1,0)+nvl(c2,0)+nvl(c3,0)+nvl(c4,0)) gval
               from t
    group by gval

  • Creating the WAD template on query

    HI,
       we had a requirement to create the 2 pie charts in the wad,1 pie chart contains data of customer and price and other chart contain data on customer and quantity.
    1.for creating the 2 charts did i need to create 2 queries each having only the required fields like for creating the chart1 i has to create the query with only customer and price in the columns and rows area respectively.
    2.is there any way of selecting the columns and rows from the query for creating the chat in the wad.
    please suggest.

    Hi Venkata,
    Usually in other Chart types, you have the option of making unwanted Series (corr. to KFs in your Query) as hidden. Thus, it is possible to have a single underlying Query that serves as a DP for multiple Charts. But in a  Pie Chart, since the Pie is built on a single KF & Category, the Series option is not available for Visibility editing. In case you want to avail of other Chart types such as Column, you can do with a single Query.
    --Priya

  • Creating a query in a collection - SCCM 2012

    Hi Everyone,
    I've got a weird issue and was hoping you techies could shed a light.
    I'm trying to create a script that makes a query into a collection with input from a CSV file. (this is a part of a bigger script, but this is what I'm having trouble with at the moment).
    #Import CSV
    $source = Import-Csv -Path C:\temp\source.csv -Delimiter ","
    foreach ($row in $source) {
    #Variables
    $ApplicationName = $row.ApplicationName
    $Customer = $row.Customer
    $ApplicationDL = $row.ApplicationDL
    $QueryPath = "$Customer\$ApplicationDL"
    $ApplicationDescription = $row.ApplicationDescription
    #Creates a Query Rule in the Collection
    Add-CMDeviceCollectionQueryMembershipRule -CollectionName $ApplicationName -QueryExpression "select * from SMS_R_System where SMS_R_System.SystemGroupName = '$QueryPath'" -RuleName $ApplicationName
    This is a multi-tenant environment so each customer has their own child domain. For example lets say that my root domain is contoso.com and my childdomain is test (and thus test.contoso.com).
    That is why I've created $QueryPath, which results in: test\groupname (The same as when I do it manually) 
    However the problem is when I execute this script it simply does not create the query.
    I don't get an error or what so ever.
    When I change $QueryPath to $ApplicationDL (resulting in just 'groupname' without the domain prefix) it actually does create the query but at that point it is not functional because it needs the domain prefix of the child-domain.
    Any help is much appreciated.
    Thanks in advance :)

    Sorry - chnage this line:
    $QueryPath='{}\{}'
    -f $row.Customer,$row.ApplicationDL
    To this:
    $QueryPath='{0}\{1}'
    -f $row.Customer,$row.ApplicationDL
    ¯\_(ツ)_/¯

  • Need to create report query to get latest open and last closed period for given application

    Hi All,
    I need to create a report query to get below result displayed in report output.
    1)   -   Application name
    2)   -    Ledger name
    -o/  -Operating Unit
    3)   -  Last Closed Period
    4)   -  Current Open Period
    5)   -  Date Closed – Last Closed Period
    6)   -  Date Open – Current Open Period
    I tr I tried to create the query below is the same. Please let me know if it looks fine.
    SELECT *
      FROM (SELECT fav.application_name ,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status ='C'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc )WHERE ROWNUM = 1 
    UNION ALL
    SELECT *
      FROM (SELECT fav.application_name Application_Name,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status = 'O'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc)
             WHERE ROWNUM = 1

    It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
    I'm just having a hard time pointing the link in the search results report to the document in the blob column.
    The information on that page is great if you're trying to create a link to the document on the initial report.
    But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
    When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
    Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    If you can help me with this I'd really appreciate it.
    Thanks again.
    Greg
    Edited by: gjones77 on Dec 2, 2008 8:14 AM

  • Error shown after creating a query in BI analyzer

    "A critical program error occurred. The program has to close. Please refer to the trace for further information."
    This error is shown while i try to execute the query after i have created a query using the BI contents that i activated. However, i am not sure if there is an error while creating the query or not. I just started learning BI analyzer and SAP logon. Any help will be useful =)

    Hi Low Soon Wee,
    Plz refer to the below threads which may solve ur issue:
    Critical Error when launch Analyzer
    Problem in Starting Business Analyzer  (NetWeaver 2004s) in Excel
    Hope this helps u...
    Regards,
    KK.

  • Error when excute the query in web

    Hi ,All ,
       I created the query in BI analyzer, when i excute the query in excel ,it run ok .but wehn i excute it by web ,it go to dump , the error message is as follow :
    program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION .
    system error in program :CL_RSR_RRKO_ATTR_C and form_CHECK_ALVL_01(see long text) .
    can anybody help me ,thanks very much .
    Jialiang.Qiu

    can u run other queries in web or not..
    what i intend tos ay is
    if u cannot run other queries thru web then there can be possibility that the Web server is not integrated correctly with the bi analyzer or so....
    or the integration of servers exists from query designer to Web portal but not between analyzer and web etc.
    try to contact basis and see if this is the issue or not
    try to run some other queries thru analyzer to web
    try to run queries thru query designer to web

  • Can't able to edit the query in query designner

    Hello every one,
                           Please help me in below issue. It is really important.
    Actually i have create the query in the BI- Development and that i pass to the production.
    Now. I tried to again edit the same query in the development , and for that i have create a new request . after creating the requesting i again logged in to the BEx query designner , but still i can not able to edit the query..
    i have create the request in the correct manner. So, what will i do now? Please help me in this.

    HI Gaurav,
                   Again i create a request by below steps
    ->open the ADW by RSA1
    ->go to Transport connection
    ->go to query element - > select my query -> select all necessary query element -> and then click on the truck symbol (i have not create BEx request)
    and then i create the request
    then i open the query in the designer and again i can not able to edit the query
    error is same
    -> BEx transport request is not available or not suitable
    -> choose an existing request
    Now,tell me what can i do? this is really an issue for me and help me to solve..Please all other can also give there comments
    one more thing i want to add is , i have also check the object changabilty , there the query element and all related to query are  "not changable". Is this an issue.
    Edited by: james macwan on Oct 16, 2008 8:39 AM

  • Query should fetch all the query details in the system.

    Hi All
    We  are looking for a query which will fetch all the query details in the system along with the user names either who has created the query or who has run it atleast once.
    If any of the queries are not used for a long time then we  can delete it with the user's/owner's approval.
    Is there anyway we can desing such query .
    Thanks
    Asim

    Hi,
    Thanks for the reply.
    My requirement is that we want to create a new query which should fetch the details information of already existing queries.
    Like who has created that query, how frequently the use it etc...
    Whenever we run the new query it should give information of all other existing queries.
    Thanks and Regards
    Asim

  • Transport Required when Creating New Query

    I am attempting to create a new query on an InfoProvider which has several existing queries written on it.  After I have created the query in development when I attempt to save the query I receive an error saying the "query could not be saved due to a problem in transport.  BEx transport request '' is not available or suitable".
    It appears that the system is looking for a BEx transport to be assigned via RSA1 but since this is a new report I believe I should be able to save the report to TMP and assign a transport at a later time.
    Am I correct in my assumption and, if so, any thoughts why I'm receiving this error?

    Hi Jonathan,
    Unfortunately, you do need a transport request if you are using already transported objects in yur new query definition. Even if you assign a request in RSA1 > transport connection, you will need to log out and logback into BEx before you can save your query. As an option and to save part of your development effort, you can remove these objects from your definition and save it. Then log out, assign a request and log back into BEx and then add the other objects to your query.
    About the points: There seems to be something wrong with it for the past couple of days and I assume SDN is working to fix it. May be you can check back later and see if it is available...

Maybe you are looking for