Creation of Structure for charactersics in Query

Hi,
Anybody tell how to create structure in Query.....
While creating structure in designer in ROWS it will show error structure not definition is incorrect...
Can anybody plz tell the steps....
Thanks,
Debasish

Hi D,
It sounds to me as if you have created a structure in your rows, but dragged and dropped a characteristic under the structure and therefore the structure remains empty. Right-click on your structure and choose 'New Selection' or 'New Formula' and enter the elements of your structure in there.
By dragging and dropping a characteristic under your structure, this will sit outwith your structure.
Regards
Scott

Similar Messages

  • Creation of Structure for charactersics in BEX

    Hi,
    Anybody has clue to create structure for characterstics in Bex.
    Thanks,
    Debasish

    Hi Panda,
    You can create a structure for Characteristics but u cant use them directly.
    right click ->create structure.   select the structure and select new selection then choose ur char ...Finally u have to use cell references to get the relation between KFs and this structure..
    Assign points if it helps...
    Regards,
    ARK

  • Creation of Structure for charactersics

    Hi,
    While creating structure for characterstics the assigned characterstics does not come under the structure folder and act a separate enetity.
    Any clue on that...
    Thanks,
    Debasish

    Hi D,
    Is this the same question as before? If so, then it sounds to me as if you have created a structure in your rows, but dragged and dropped a characteristic under the structure and therefore the structure remains empty. Right-click on your structure and choose 'New Selection' or 'New Formula' and enter the elements of your structure in there. You need to choose 'New Selection' to add certain characteristics and 'New Formula' to create a calculation eg. Variance.
    By dragging and dropping a characteristic under your structure, this will sit outwith your structure.
    Regards
    Scott

  • More than 2 structures in a BEx query

    Hi guys,
      Is it possible to define more than 2 local/global STRUCTURE for a particular query ?

    Eugene mate,
       Okay, so now I understood that I need one Structure just for Key Figure
       Now, my precise question is this !
       I need Profit Centre to be on my Row.
       Here, I need to make 'Selections' where I make restrictions based on my Hierarchy such as Business Units, Function Units, Subsidiaries.
       I also need Cost Elements to be on my Column.
       Here, I need to make 'Selections' where I make restrictions based on my Hierarchy such as Taxation, Depreciation and so on.
      Hence, how can contain this selections when I am left with only 1 Structure ?
      Kindly advice what would your goodself suggest ?

  • Where to get BW Metadata: owner, creation date, change date of a query / WS

    Hello,
    I need a report over the existing queries / worksheets and the owner, creation date, change date of a query etc.
    You see some of the information when you go over query properties in the query designer. But you see only the information of one (the opened) query. And you have to do this for every query ...
    My idea is to go over BW Metadata in the technical content.
    Here is the cube BW Metadata 0BWTC_C08
    (The InfoCube BW Statistics u2013 Metadata contains metadata from the Metadata Repository.)
    Is this the way to do it? Or any other suggestions u2026
    Can I get infos about used structures , etc over this way
    Thanks Markus

    I had to work on an other subject:
    But now the source of information is clear:
    RSRREPDIR - index of all queries
    RSZELTDIR -  index of all queries-components
    RSRWORKBOOK - Verwendungsnachweis für Berichte in Workbooks
    RSRWBINDEX - List of binary large objects (Excel workbooks)
    RSRWBINDEXT - Titles of binary objects (Excel workbooks) in InfoCatalog
    The tables are to join over
    RSRREPDIR.COMPUID  = RSZELTDIR.ELTUID
    RSZELTDIR.TEXTLG  contains the description
    RSRWORKBOOK.GENUID  = RSRREPDIR.GENUID
    RSRWBINDEXT and RSRWBINDEX are connected over WORKBOOKID
    I'd like to put the information of all of this tables in a cube and define a query on it.
    I have to define new datasource, infosource to get the data in the cube.
    Right?
    Now i see some existing datasource objects in the technical content.
    0TCTQUERID, 0TCTQUERID_TEXT, 0TCTQUERY, 0TCTQUERY_TEXT
    I can't open them to look in. But they might be helpfull. Anybody used them?
    Markus

  • Build XML for Custom Nested Accordian (like Tree View Structure) for SharePoint List Data

    Expected output in Xml:
    <?xml version="1.0" encoding="utf-8" ?>
    - <TopRoot>
    - <Root id="1" Name="Department">
    - <Type id="2" Name="IT">
    - <SubType id="3" Name="Technology">
      <SubSubType id="4" Name="Sharepoint" />
      <SubSubType id="5" Name="ASP.NET" />
      <SubSubType id="6" Name="HTML 5" />
      </SubType>
      </Type>
    </Root>
    </TopRoot>
    List Details:
    list details for storing category / sub category data and code to build tree structure for the same.
    1.Create Custom List named “CategoryDetails”:
    2.Create Column “Category Name” of type single line of text. Make it as required field and check Yes for Enforce Unique values.
    3.Create column “Parent Category” of type lookup. under Additional Column Settings.
    Get information dropdown, select “CategoryDetails”.
    4.Choice column ["SRTypeName"] 1.Root,2.SRTYPE,3.SubSRTYPE, 4.SUBSUBSRTYPE
    In this column dropdown, select “Category Name”:  
    Referance:
    http://www.codeproject.com/Tips/627580/Build-Tree-View-Structure-for-SharePoint-List-Data    -fine but don't want tree view just generate xml string
    i just follwed above link it work perferfectly fine for building tree view but i don't want server control.
    Expected Result:
    My ultimate goal is to generate xml string like above format without building tree view.
    I want to generate xml using web service and using xml i could convert into nested Tree View Accordian in html.
    I developed some code but its not working to generate xml /string.
    My modified Code:
    public const string DYNAMIC_CAML_QUERY =
            "<Where><IsNull><FieldRef Name='{0}' /></IsNull></Where>";
            public const string DYNAMIC_CAML_QUERY_GET_CHILD_NODE =
            "<Where><Eq><FieldRef Name='{0}' /><Value Type='LookupMulti'>{1}</Value></Eq></Where>";
            protected void Page_Load(object sender, EventArgs e)
                if (!Page.IsPostBack)
                 string TreeViewStr= BuildTree();
                 Literal1.Text = TreeViewStr;
            StringBuilder sbRoot= new StringBuilder();
            protected string BuildTree()
                SPList TasksList;
                SPQuery objSPQuery;
                StringBuilder Query = new StringBuilder();
                SPListItemCollection objItems;
                string DisplayColumn = string.Empty;
                string Title = string.Empty;
                string[] valueArray = null;
                try
                    using (SPSite site = new SPSite(SPContext.Current.Web.Url))
                        using (SPWeb web = site.OpenWeb())
                            TasksList = SPContext.Current.Web.Lists["Service"];
                            if (TasksList != null)
                                objSPQuery = new SPQuery();
                                Query.Append(String.Format(DYNAMIC_CAML_QUERY, "Parent_x0020_Service_x0020_Id"));
                                objSPQuery.Query = Query.ToString();
                                objItems = TasksList.GetItems(objSPQuery);
                                if (objItems != null && objItems.Count > 0)
                                    foreach (SPListItem objItem in objItems)
                                        DisplayColumn = Convert.ToString(objItem["Title"]);
                                        Title = Convert.ToString(objItem["Title"]);
                                        int rootId=objItem["ID"].ToString();
                                        sbRoot.Append("<Root id="+rootId+"
    Name="+Title+">");
                                        string SRAndSUBSRTpe = CreateTree(Title, valueArray,
    null, DisplayColumn, objItem["ID"].ToString());
                                        sbRoot.Append(SRAndSUBSRTpe);
                                        SRType.Clear();//make SRType Empty
                                        strhtml.Clear();
                                    SRType.Append("</Root>");
                catch (Exception ex)
                    throw ex;
                return SRType.ToString();
             StringBuilder strhtml = new StringBuilder();
            private string CreateTree(string RootNode, string[] valueArray,
          List<SPListItem> objNodeCollection, string DisplayValue, string KeyValue)
                try
                    strhtml.Appends(GetSRType(KeyValue, valueArray, objNodeCollection);
                catch (Exception ex)
                    throw ex;
                return strhtml;
            StringBuilder SRType = new StringBuilder();
            private string GetSRType(string RootNode,
            string[] valueArray, List<SPListItem> objListItemColn)
                SPQuery objSPQuery;
                SPListItemCollection objItems = null;
                List<SPListItem> objNodeListItems = new List<SPListItem>();
                objSPQuery = new SPQuery();
                string objNodeTitle = string.Empty;
                string objLookupColumn = string.Empty;
                StringBuilder Query = new StringBuilder();
                SPList objTaskList;
                SPField spField;
                string objKeyColumn;
                string SrTypeCategory;
                try
                    objTaskList = SPContext.Current.Web.Lists["Service"];
                    objLookupColumn = "Parent_x0020_Service_x0020_Id";//objTreeViewControlField.ParentLookup;
                    Query.Append(String.Format
                    (DYNAMIC_CAML_QUERY_GET_CHILD_NODE, objLookupColumn, RootNode));
                    objSPQuery.Query = Query.ToString();
                    objItems = objTaskList.GetItems(objSPQuery);
                    foreach (SPListItem objItem in objItems)
                        objNodeListItems.Add(objItem);
                    if (objNodeListItems != null && objNodeListItems.Count > 0)
                        foreach (SPListItem objItem in objNodeListItems)
                            RootNode = Convert.ToString(objItem["Title"]);
                            objKeyColumn = Convert.ToString(objItem["ID"]);
                            objNodeTitle = Convert.ToString(objItem["Title"]);
                            SrTypeCategory= Convert.ToString(objItem["SRTypeName"]);
                           if(SrTypeCategory =="SRtYpe")
                              SRType.Append("<Type  id="+objKeyColumn+" Name="+RootNode+ ">");
                             if (!String.IsNullOrEmpty(objNodeTitle))
                              SRType.Append(GetSRType(objKeyColumn, valueArray, objListItemColn));
                          if(SrTypeCategory =="SRSubTYpe")
                              SRType.Append("<SRSubType  id="+objKeyColumn+" Name="+RootNode+
    ">");  
                             if (!String.IsNullOrEmpty(objNodeTitle))
                              SRType.Append(GetSRType(objKeyColumn, valueArray, objListItemColn));
                          if(SrTypeCategory =="SubSubTYpe")
                              SRType.Append("<SubSubType  id="+objKeyColumn+" Name="+RootNode +"
    ></SubSubType");  
                        SRType.Append("</SubType>");
                        SRType.Append("</Type>");
                catch (Exception ex)
                    throw ex;
                return SRType.ToString();
                // Call method again (recursion) to get the child items

    Hi,
    According to your post, my understanding is that you want to custom action for context menu in "Site Content and Structure" in SharePoint 2010.
    In "SiteManager.aspx", SharePoint use MenuItemTemplate class which represent a control that creates an item in a drop-down menu.
    For example, to create or delete the ECB menu for a list item in
    "Site Content and Structure", we can follow the steps below:
    To add the “My Like” menu, we can add the code below:      
    <SharePoint:MenuItemTemplate
    UseShortId=false
    id="OLListItemLike"
    runat="server"
    Text="My Like"
    ImageUrl="/_layouts/images/DelItem.gif"
    ClientOnClickNavigateUrl="https://www.google.com.hk/"
    />
    To remove the “Delete” menu, we can comment the code below:
    <SharePoint:MenuItemTemplate
    UseShortId=false
    id="OLListItemDelete"
    runat="server"
    Text="<%$Resources:cms,SmtDelete%>"
    ImageUrl="/_layouts/images/DelItem.gif"
    ClientOnClickScript="%SmtObjectDeleteScript%"
    />            
    The result is as below:
    More information:
    MenuItemTemplate Class (Microsoft.SharePoint.WebControls)
    MenuItemTemplate.ClientOnClickScript property (Microsoft.SharePoint.WebControls)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Can we use global structure while designing a query on  a multiprovider

    hai friends,
                     If i build a multiprovider on cubes for which the query design  on those cubes contains global sturctures ,
    Can i use those global structures while designing a query on a multiprovider (which contains those cubes)

    Hi Vamsi,
    The structure from the base cubes will not automatically be available for the queries created on the multiprovider. The only way to get the structure there is to copy a query from the base cube to the multiprovider. You can use transaction RSZC to do this.
    Hope this helps...

  • How to create a simple File structure for a large project?

    Hi to all,
    I've own and operated my own website design/development (a 1 woman office, plus many sub-contractors) over the period of 8 years. I started hand-coding HTML sites in 1997, before the creation DW (though I think the first ver was for Mac in '97). Over the recent years I've udated my skills to include CSS and enough Java/PHP to customize and/or troubleshoot current projects (learn as I go).
    The majority of my clients have been other 1-10 person entrepreneur companies. I've recently won a bid to redesign a government site which consist of 30 departments, including their main site.
    The purpose of this thread is to get some ideas on creating a file management/structure. Creating file management setup for smaller companies was a piece of cake, using a simple file mgmt structure within DW. Their current file structure is all over the place. I've read about a very good, simple file struture in a DW CS4 manual and wanted to get feedback on different methods that have worked, and have not worked, or your client:
    Here's my thinking:
    1. within the root dir place home.htm and perhaps a few .htm related only to home
        2. create the following folders off the root, "docs, imgs/global, CSS, FLA, Departments"
                - sub folders within docs for each dept
                - site wide css's placed into CSS
                - site wide FLAs into the FLA
                - sub-folders created within 'imgs' for each dept, including a 'global folder' for sitewide images and menu imgs (if needed)
    - OR -
    1. create same file structure for each dept folder, such as 'imgs/CSS/FLA/Docs'
    Open for suggestions....
    Ciao

    It is a problem I have thought over at length and still feel what I use could be better. You are doing it the right way around researching before you start, as moving files once things are underway can course real problems. One issue is the use of similar assets across site(s), and version control if you have multiple versions of the same asset.
    Can not say I have built a site(s) of that size but would recommend putting together a flow chart to help visualise the structure and find out better ways organising (works for me). Good luck, post back with your solution.

  • What is package structure for Client ABAP Proxy?

    1.     What is the package structure need to be  followed for creating abap client proxy.
    2.     I read some where in the form, it need to be 4 levels. Why is it?
    Thank you
    Ganges Leaves

    Hi
    U hav to create a 4 level package structure for client ABAP proxy.
    U can create ur on packages
    1st level-structure package.
    2nd level-main package.
    3rd and 4th level-sub packages.
    To the 4th level only u hav to create proxy.
    The classes and code wil be automatically generated at the time of proxy creation.
    I think the 4 level structure bcz while in r/3 everythin in integration builder like software component version and all wil be takin as different levels.
    Also u can go through the weblogs in the above replies u got.
    Regards
    Victoria.

  • Generation of program code for the ABAP Query

    Dear all,
    In the creation of the ABAP query, in the final step of SQ01, Query- more functions- generate program is made.
    Why the program code is generated for the ABAP query? please  give the logical explaination for the same.
    Thanks and Regards,
    Prash

    Prash,
    a) Do you mean Program code does not have significance in query creation?
    No it does not mean this.  All queries run based on an ABAP program.  In the standard query editing process, when you save and execute the query, you will automatically re-build the existing ABAP program as necessary.  You do not need, though, to execute the menu steps you outlined in order to build, maintain, or execute the query.  It is only there for special purposes, as outlined above by Jürgen
    b) Can we see the program code generated in any transaction?
    From any screen, System > Status.  Place your cursor on the field in "Program (screen)".  Double click.
    Rgds,
    DB49

  • How to replace the structure in the BI Query

    Hi Guys
    We have a query and we have a structure in the ROWS section. We want to replace this structure with another one which is aviable in the query.
    For some reason i am able to remove the structure from the ROWS section but i am unable to drag a new structure in the ROWS section. Any idea what i am doing wrong. We are on BI 7.0 version.

    Hi Pravender,
    Thanks for the quick response. I have tried that option and it does not work.
    I am able to remove the existing structure from the ROWS section of the query and able to save the query. When i go back and try to drag and drop the new structure it does not allow me to drag and drop the new structure availble in the query.
    apologies for my ignorance. I am new to BI so i might be doing something wrong. Does the structure needs to have any specific properties to be able to drag and drop? I have more than 10 structures availble in the query but i am unable to drag and drop anyone in the ROWS section.

  • Question about Sender and Receiver Structure for JDBC

    Dear All,
    I want to know why there is a fixed format for sender and receiver structure for JDBC. why cant we use the structure like what we want? explain me in detail.
    Thanks

    Good Question:
    We have to create our data structure based on the existing database table structure. While reading or writing , JDBC adapter convert our data type structure in to SQL Query Statements that matches Table structure.

  • Organization structure for Inventory management

    Hi All,
    I am looking for organization structure specific to inventory management and also data flow architecture.
    If there is any standard org structure is available please share with me.
    Regards
    Vijay

    I am looking for organization structure specific to inventory management and also data flow architecture.
    > If there is any standard org structure is available please share with me.
    Hi Vijay,
    Standard Org Structure for IM starts with Plants and ends with Storage Locations. You can create required no of storage locations under your plants, where plants are assigned to company codes. Its always better to copy from master plant 1000/0001 while creating the plants where you can make changes during creation where required (factory calendar etc).
    All the material movements within the plant happen between storage locations, material-material, special stocks-unrestricted stocks with no accounting effect.
    Movements between the plants can be planned wrt your needs such as STO with no financial postings unless you have plant wise PCA
    You can follow the standard avaiable structure for your IM org structure.
    Regards
    Shiva

  • Restriction data entry for input ready query

    Dear All,
    I have an input ready query with two structures for rows and columns.
    However, I have set one of columns' structure's member as "data can be changed with planning functions", i'm able to enter data for that column. When i execute save function, entered valus are being disapperaed.(not benig written to the cube)
    But i want to restrict data entrance for that column. (Like display functionality in BPS)
    I know i can protect fields with excel functionality, but we are using web environment.
    How can i resolve mentioned issue?
    Thanks
    Alkan

    Hi Bindu,
    Thanks for your quich answer.
    In web environment, i think i need to use WEB API.
    Do i need to write java script? Or is there any particular class to manage the properties of the cells?
    BR
    Alkan

  • Expected output  for my sql query

    Hi can you please tell me how to get the my expected output from the table work_invoice_hold_t
    where i need to compare company code , tot_cust_no,sto_no,sales_date and trans_type='HOLD'
    for example below i am comparing comp_code 1801 ,tot_cust_no,sto_no and sales_date.... when i compare them i need to get sales date record like
    1801     1504522002      601     120618     1     142          HOLD      Y
    COMP_CODE   TOT_CUST_NO     STO_NO   SALES_DATE   CASH_NO    RECEIPT_NO   TRANS_TYPE  PROCESSED
    2300                  0062090790                121     120306                  3              132                       HOLD                 Y
    1801                  1504522002                601     120306            1              142                        HOLD                 Y
    1801                  1504522002                601     120306            1              142               UNHOLD        3
    1801                  1504522002                 601     120618            1              142                       HOLD           Y
    EXPECTED OUTPUT:
    2300                  0062090790                121     120306                  3              132                       HOLD                 Y
    1801                  1504522002                 601     120618            1              142                       HOLD           Y

    Hi Thank you for providing the necessary help.
    Here is another requirement for my query.
    First query should be merged into second query. In the second query we are using one more table like "I_INVOICE_INFO_T_LOG_V"
    that is when we put both first and second queries together i need to get the output like below:
    601     STO     1504522002     120618     142     1     1801     HOLD
    121     STO     0062090790     120306     132     3     2300     HOLD
    table structure is:
    CREATE TABLE RIMS.I_INVOICE_INFO_T_LOG_V
    REG_DATE VARCHAR2(6 BYTE),
    STO_NO VARCHAR2(3 BYTE),
    SALES_DATE VARCHAR2(6 BYTE),
    CASH_NO NUMBER(5),
    RECEIPT_NO NUMBER(10),
    ORDER_NO NUMBER(10),
    TOT_CUST_NO VARCHAR2(13 BYTE),
    CONTROL_NO NUMBER(10),
    INV_ADM_COST_FR VARCHAR2(1 BYTE),
    VAT_OBLIGED VARCHAR2(1 BYTE),
    ART_NO VARCHAR2(8 BYTE),
    SOLD_QTY NUMBER(10),
    SOLD_AMOUNT NUMBER(10),
    CUR_CODE VARCHAR2(3 BYTE),
    ORIG_INVO VARCHAR2(10 BYTE),
    CUSDEL_NO NUMBER(2),
    SEQ_NO_SORT NUMBER(10),
    GROUP_ID_PROD NUMBER(10),
    GROUP_ID_TXT NUMBER(10),
    CUSDEL_TYPE VARCHAR2(2 BYTE),
    VAT_CODE VARCHAR2(10 BYTE),
    VAT_RATE NUMBER(6,2),
    TIMESTAMP DATE,
    INV_TYPE VARCHAR2(1 BYTE),
    INS_USER VARCHAR2(30 BYTE),
    MACHINE VARCHAR2(64 BYTE),
    SEQ NUMBER(22) NOT NULL
    sample data :
    SET DEFINE OFF;
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, CUSDEL_TYPE, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('120306', '121', '120306', 3, 132,
    0, ' 0062090790', 0, '0', '1',
    '40043234', 8, 20800, 'DKK',
    0, 0, 0, '01',
    '0', 2500, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916052);
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, CUSDEL_TYPE, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('120306', '601', '120306', 1, 142,
    0, ' 1504522002', 0, '0', '1',
    '40047760', 2, 200, 'GBP',
    0, 0, 0, '01',
    '0', 1750, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916053);
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, CUSDEL_TYPE, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('120618', '601', '120618', 1, 142,
    0, ' 1504522002', 0, '0', '1',
    '20057057', 2, 400, 'GBP',
    0, 0, 0, '01',
    '0', 1500, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916054);
    Insert into RIMS.I_INVOICE_INFO_T_LOG_V
    (REG_DATE, STO_NO, SALES_DATE, CASH_NO, RECEIPT_NO, ORDER_NO, TOT_CUST_NO, CONTROL_NO, INV_ADM_COST_FR, VAT_OBLIGED, ART_NO, SOLD_QTY, SOLD_AMOUNT, CUR_CODE, CUSDEL_NO, SEQ_NO_SORT, GROUP_ID_PROD, VAT_CODE, VAT_RATE, TIMESTAMP, SEQ)
    Values
    ('051020', '262', '051020', 11, 16,
    0, ' 1555792009', 0, '0', '1',
    '50043993', 3, 4800, 'GBP',
    0, 0, 0,
    '0', 1750, TO_DATE('10/21/2005 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 916055);
    for example:
    Second query
    SELECT DISTINCT workhold.sto_no AS bu_code,
    'STO' AS Bu_Type,
    AND workhold.processed='Y'...
    and ( first query condition)
    First query.
    WITH  got_cnt        AS
        SELECT  w.*    -- or list columns you want
        ,    COUNT (CASE WHEN trans_type = 'HOLD' THEN 1 END)
                OVER (PARTITION BY  comp_code, tot_cust_no, sales_date)
                    AS  hold_cnt
        ,    COUNT (CASE WHEN trans_type = 'UNHOLD' THEN 1 END)
                OVER (PARTITION BY  comp_code, tot_cust_no, sales_date)
                    AS  unhold_cnt
        FROM    work_invoice_hold_t  w
    SELECT sto_no as bu_code,'STO' as bu_type,tot_cust_no as cust_no,sales_date,receipt_no,cash_no as till_no,comp_code,trans_type-- or list columns you want
    FROM    got_cnt
    WHERE    hold_cnt    = 0
    OR    unhold_cnt    = 0
    First query output:
    601     STO     1504522002     120618     142     1     1801     HOLD
    121     STO     0062090790     120306     132     3     2300     HOLD
    Second Query:
    SELECT DISTINCT workhold.sto_no AS bu_code,
                               'STO' AS Bu_Type,
                               workhold.Tot_Cust_No AS Cust_No,
                               workhold.Sales_Date AS Sales_Date,
                               workhold.Receipt_No,
                               workHOLD.Cash_No AS Till_No,
                               workhold.Comp_Code,
                               workhold.Trans_Type AS on_hold_flag
                 FROM WORK_INVOICE_HOLD_V workhold,
                           I_INVOICE_INFO_T_LOG_V invlog
                WHERE
                TRIM (workhold.Tot_Cust_No) = TRIM (invlog.Tot_Cust_No)
                      AND TRIM (workhold.Cash_No) = TRIM (invlog.Cash_No)
                      AND TRIM (workhold.sales_date) = TRIM (invlog.sales_date)
                      AND TRIM (workhold.Receipt_No) = TRIM (invlog.Receipt_No)
                      AND TRIM (workhold.Sto_No) = TRIM (invlog.Sto_No)
                      AND workhold.processed='Y'
    output for second query:
    601     STO     1504522002     120618     142     1     1801     HOLD
    601     STO     1504522002     120306     142     1     1801     HOLD
    121     STO     0062090790     120306     132     3     2300     HOLD
    expected output:
    after checking the conditions for both 1 and 2 queries i need to get the output like below.
    601 STO 1504522002 120618 142 1 1801 HOLD
    121 STO 0062090790 120306 132 3 2300 HOLDEdited by: 891933 on Oct 2, 2012 1:18 AM

Maybe you are looking for