Query to fetch one combination

Hi Gurus,
create table combi (col1 varchar2(10), col2 varchar2(10));
insert into combi values ('A', 'B');
insert into combi values ('A', 'C');
insert into combi values ('B', 'A');
insert into combi values ('B', 'C');
insert into combi values ('C', 'A');
insert into combi values ('C', 'B');
insert into combi values ('D', 'A');
commit;
select * from combi;
COL1     COL2
A     B
A     C
B     A
B     C
C     A
C     B
D     A
Now I need to getch the output as
COL1     COL2
A     B
A     C
B     C
D     A
I mean, A - B combibnation is fetched, I should not fetch B - A combination.
Thanks in advance!!
Santosh

I'm working on 9i data base and I'm unable to execute the query you provided.9i could very well execute the statement provided:
SQL> select * from v$version where rownum = 1
BANNER                                                                                         
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production                               
1 row selected.
SQL> select * from combi
COL1            COL2          
A               B             
A               C             
B               A             
B               C             
C               A             
C               B             
D               A             
7 rows selected.
SQL> with tmp
     as (select col1,
                col2,
                row_number () over (partition by least (col1, col2), greatest (col1, col2) order by col1, col2) rn
           from combi)
select *
  from tmp
where rn = 1
COL1            COL2                    RN
A               B                        1
A               C                        1
D               A                        1
B               C                        1
4 rows selected.

Similar Messages

  • Select query on QALS table taking around 4 secs to fetch one record

    Hi,
    I have one select query that takes around 4 secs to fetch one record. I would like to know if there are any ways to reduce the time taken for this select.
    SELECT
         b~prueflos
         b~matnr
         b~lagortchrg
         a~vdatum
         a~kzart
         a~zaehler
         a~vcode
         a~vezeiterf
         FROM qals AS b LEFT OUTER JOIN qave AS a ON
         bprueflos = aprueflos
         INTO TABLE t_qals1
         FOR ALL ENTRIES IN t_lgorts
          WHERE  matnr = t_lgorts-matnr
          AND    werk = t_lgorts-werks
          AND    lagortchrg = t_lgorts-lgort
          AND    stat35 = c_x
          AND    art IN (c_01,c_08).
    When I took the SQL trace, here I found other details :
    Column          No.Of Distinct Records
    MANDANT                                      2
    MATNR                                      2.954
    WERK                                          30
    STAT34                                         2
    HERKUNFT                                   5
    Analyze Method                    Sample 114.654 Rows
    Levels of B-Tree                                 2
    Number of leaf blocks                         1.126
    Number of distinct keys                      16.224
    Average leaf blocks per key                1
    Average data blocks per key               3
    Clustering factor                                  61.610
    Also note, This select query is using INDEX RANGE SCAN QALS~D.
    All the suggestions are welcome
    Regards,
    Vijaya

    Hi Rob,
    Its strange but, the table t_lgorts  has only ONE record
    MATNR  =  000000000500003463
    WERK = D133
    LAGORTCHRG   = 0001                                            
    I have also seen that for the above criteria the table QALS has 2266 records that satisfy this condition.
    I am not sure..but if we write the above query as subquery instead of Outer join..will it improve the performance?
    Will check it from my side too..
    Regards,
    Vijaya

  • Sql query to fetch data based on date conditons

    Hi All,
    We have to schedule a script that runs at 1:00 AM from Monday to Friday.
    The script will run a  sql query  ,that will fetch the data from sql database 2008 based on the below conditions.
    Case 1: If date = current Date then retrieve the data of the previous Date.
    Case 2: If date = Monday then retrieve the entries of Friday ,Saturday and Sunday.
    Please help us on how we can achieve this.
    Thanks

    Hi,
    Are you asking about Patrick's
    solution?
    If so I highly recommend NOT to use this solution. PLease read LMU92's
    and
    Visakh16's responses.
    Why not to use it?
    1. This solution is not deterministic!
    A deterministic algorithm is an algorithm which, given a particular input, will always produce the same output. This solution give different values for different setting! It is depending for example on "SET LANGUAGE" value
    As mentioned above if you try to use any other languge then English then this query will not work since you will never get the value "Sunday"
    2. Moreover! Even if you are using "SET LANGUAGE 'English'" then this
    solution depend on "SET DATEFIRST" and only take into consideration that the value can be 1 or 7, using any other value you will get that @weekendDateMod is null!
    What can you use?
    let's test some value first to get the solution yourself. We know that we don't care about "SET LANGUAGE" since I will not use any language dependency but we need to examine "SET DATEFIRST". Try to change the value from 1 to 7 and check
    the value of this query
    SET DATEFIRST 1 -- Change this value from 1 to 7!
    DECLARE @Sunday DATE = '2014-08-03' -- This is Sunday
    DECLARE @Munday DATE = '2014-08-04' -- This is Munday
    SELECT DATEPART(DW,@Sunday),DATEPART(DW,@Munday), @@DATEFIRST
    Can you see the behavior ?
    The results are hidden here (select the text and you will see them)
    DATEFIRST___Sunday_______Monday
    1___________7___________1
    2___________6___________7
    3___________5___________6
    4___________4___________5
    5___________3___________4
    6___________2___________3
    7___________1___________2
    assuming you did the exercise above yourself, then  you can now think now what is the filter that you need...
    You can use a filter on those two parameters together using "where DATEPART... and @@DATEFIRST...) or using one combine check. Can you think how?
    Notice that this value is always 2 on Monday! Regarding our setting
    (DATEPART(DW,@CurrentDate) + @@DATEFIRST) % 7
    Please Don't Go Down Before YOu Understand!
    Now we can go to the solution
    * I really hope that you read all and did the small exercise yourself! You can not become a developer by copy answers, and this is the reason that from the start I only gave you tha way and not the final query!
    DECLARE @CurrentDate DATE = '2007-08-20' -- This is only for testing since you should use the function GETDATE() instead
    DECLARE @MinDateToFilter DATE
    SET @MinDateToFilter = CASE
    WHEN ((DATEPART(DW,@CurrentDate) + @@DATEFIRST) % 7) = 2 THEN DATEADD(DAY,-4,@CurrentDate)
    ELSE DATEADD(DAY,-1,@CurrentDate)
    END
    SELECT *
    FROM sales.salesOrderHeader
    WHERE orderDate > @MinDateToFilter
    I hope this was useful :-)
    [Personal Site] [Blog] [Facebook]

  • Problem facing in performance of the query which calls one function

    Hello Team,
    Actually am facing performance issue for the following query.Even though for columns in where condition indexes are there.Also I used the hints but no use.Pls suggest me how can I increase the performance.Currently it's taking around 5 mins to execute the select statement.
    SELECT crf_id, crf_code,crf_nme,
    DECODE(UPPER( fn_hrc_refs( crf_id)),'Y','Yes','No') ua_ind,
    creation_date, datetime_stamp, user_id
    FROM BC_FBCTOR
    ORDER BY crf_nme DESC;
    FUNCTION fn_hrc_refs (pi_crf_id IN NUMBER)
    RETURN VARCHAR2
    IS
    childref VARCHAR2 (1) := 'N';
    cnt NUMBER := 0;
    BEGIN
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_CALIB
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_CALIB_DET
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_MPG_DTL
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_CNTRY_DTL
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_COR
         WHERE x_axis_crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_RESI_COR
         WHERE y_axis_crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM BC_PRIME
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM DR_FBCT
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM DR_RISK
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM EC_DTL
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM EC_RESULT
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM EC_LOSS
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM EC_CRITERIA
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM EC_CORR
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
         SELECT NVL (COUNT (*), 0)
         INTO cnt
         FROM EC_PORT
         WHERE crf_id = pi_crf_id;
         IF cnt<> 0
         THEN
         childref := 'Y';
         RETURN childref;
         END IF;
    RETURN childref;
    EXCEPTION
    WHEN OTHERS
    THEN
    childref := 'N';
    RETURN childref;
    END;
    Regards,
    Ashis

    You are checking for the existence of detail records. What is the purpose of this. Most applications I know rely on normal foreign key constraint to ensure parent-child relationsships.
    The select is slow for two reasons.
    reason one) You count all details records when you only need to know if one detail records exists or not.
    reason two) Multiple context switches between sql and pl/sql for each row of your parent table
    SELECT NVL (COUNT (*), 0)
    INTO cnt
    FROM BC_CALIB
    WHERE crf_id = pi_crf_id;
    IF cnt 0
    THEN
    childref := 'Y';
    RETURN childref;
    END IF;This could be replaced by
    begin
       SELECT 'Y'
       INTO childref
       FROM BC_CALIB
       WHERE crf_id = pi_crf_id
       and rownum = 1; /* only fetch one row */
    execption
       when no_data_found then
         /* continue with the next select */
    end;
    return childref;but this would still do a lot of context switches, especially for parents without a detail records.
    Also consider this option:
    SELECT crf_id, crf_code,crf_nme,
          case when exists (SELECT null FROM BC_CALIB t WHERE t.crf_id = BC_FBCTOR.crf_id)
                 then 'Yes'
                 when exists (SELECT null FROM BC_CALIB_DET t WHERE t.crf_id = BC_FBCTOR.crf_id)
                 then 'Yes'
          else
              'No'
          end ua_ind,
    creation_date, datetime_stamp, user_id
    FROM BC_FBCTOR
    ORDER BY crf_nme DESC;It should also be possible to use a UNION ALL select instead of different single case lines. But i choose this way since it resembles your original selection a bit better. And you could change the 'Yes' to something different like 'Childs in Table abc'.
    Edited by: Sven W. on Sep 5, 2008 2:29 PM

  • Query to get a combination of values

    I have 4 tables, say T1,T2,T3,T4.
    I want to select 4 columns from this 4 tables respectively.
    How can I write a query to fetch all possible combinations of these 4 columns.

    The only way to combine columns is to write a SQL statement where you written possible combinations of these columns.
    You can develop something to combine the values but you can't manipulate columns very easily.
    SQL> SELECT ENUMERATIONS.PERMUTA(STRING_TABLE('A','B','C'))
      2  FROM DUAL
      3  /
    ENUMERATIONS.PERMUTA(STRING_TABLE('A','B','C'))
    STRING_TABLE('ABC', 'ACB', 'BAC', 'BCA', 'CAB', 'CBA')
    SQL>To do it I use the following package.
    CREATE OR REPLACE
    TYPE string_table as table of varchar2(4000)
    CREATE OR REPLACE
    PACKAGE enumerations is
         type bool_tab is table of boolean index by binary_integer;
         flags bool_tab;
         solutions string_table;
         function permuta (
              strings in string_table
         ) return string_table;
    end enumerations;
    CREATE OR REPLACE
    PACKAGE BODY enumerations is
         procedure permutations (
              i in pls_integer,
              strings in string_table,
              current_string in varchar2
         is
              n pls_integer;
              j pls_integer;
         begin
              n := cardinality(strings);
              if ( i <= n ) then
                   for j in 1..n loop
                        if ( not flags(j) ) then
                             flags(j) := true;
                             permutations(i+1,strings,current_string||strings(j));
                             flags(j) := false;
                        end if;
                   end loop;
              else
                   solutions.extend();
                   solutions(solutions.last) := current_string;
              end if;
         end;
         function permuta (
              strings in string_table
         ) return string_table
         is
         begin
              for i in 1..cardinality(strings) loop
                   flags(i) := false;
              end loop;
              solutions := string_table();
              permutations(1,strings,'');
              return solutions;
         end;
    end enumerations;
    /Bye Alessandro

  • How will write SQL query to fetch data from  each Sub-partition..

    Hi All,
    Anyone does have any idea about How to write SQL query to fetch data from Sub-partition.
    Actually i have one table having composite paritition(Range+list)
    Now if i want to fetch data from main partition(Range) the query will be
    SELECT * FROM emp PARTITION(q1_2005);
    Now i want to fetch data at sub-partition level(List) .But i am not able to get any SQL query for that.
    Pls help me to sort out.
    Thanks in Advance.
    Anwar

    SELECT * FROM emp SUBPARTITION(sp1);

  • Query Regarding Fetching of Maintenance View

    Hi Experts
    I have one query regarding fetching of Maintenance View.
    My Maintenance View is consisting of only one table.
    so i am unable to fetch the data using inner join.i also found
    one FM VIEW_GET_DATA  which fetches entire table with out
    any condition it may lead to performance issue. kindly suggest
    how do i fetch the data from such Maintenance View.
    Thanks
    Nishita G

    Hi,
    You can Direct Use the DML operations on the Underlying Database Table.( example 'SELECT' Statement and use 'WHERE' Condition for required output ).
    Regards
    Pavan Kumar

  • Error:APP-FND-00906: You can only query existing flexfield code combination

    Hi,
    when i am querying the particluar account combination under Budget Journals (Navigation: GL responsibility> Budgets > Enter > Journals) window the following message is displaying by the system
    APP-FND-00906: You can only query existing flexfield code combinations. You entered query criteria in your flexfield that does not identify an existing code combination. Therefore, your query will not return any rows.
    Enter a valid code combination, or enter only the flexfield segment values you know, or do not enter any values in the flexfield.
    Note: We are using the 11.5.10.2 version.
    Can any one why this error message is displaying by the system.
    Regards,
    Kevin.

    Kevin,
    Review the following documents, and see if it helps.
    Note: 365406.1 - GLXIQACC Account Inquiry Is Failing With APP-FND-00906 Can Only Query Existing Flexfield Code Combination
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=365406.1
    Note: 272773.1 - APP-FND-00906 - You Can Query Only Existing Flexfield Combinations on the Enter Budgets form
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=272773.1
    Note: 199674.1 - 11i - GLXIQBUD - Unable To Inquire Budget Account In The Budget Inquiry Form
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=199674.1
    Regards,
    Hussein

  • Query creation using one db table

    Hi All,
    For creating a query for fetching data from a single table  i'm creating an INFOSET ( SAP 6.0) , when trying to GENERATE this INFOSET it is showing a errors ,
    1) Only one table specified .
    2)Defenition of the table join.
    3)Table join
    Please help me on this.
    Thanks & Regards ,
    Sabu.

    when u create infoset, choose the second option while selecting datasource. ie Direct read o table.
    Regards
    Sathar

  • Query help - Fetch employees working on two consecutive weekends(SAT/SUN)

    Hello Gurus,
    I have the following requirement and i need your help on this.
    We have a table with all employees effort logged in for the days they have worked. a sample data is given below
    TD_date     Emp_id     Effort     Archive_month
    2-Mar-13     123     8     Mar-13
    9-Mar-13     123     8     Mar-13
    2-Mar-13     213     4     Mar-13
    3-Mar-13     213     4     Mar-13
    24-Mar-13     213     8     Mar-13
    9-Mar-13     312     4     Mar-13
    10-Mar-13     312     4     Mar-13
    16-Mar-13     312     8     Mar-13
    In the above sample data, we have employee 123 who worked on consecutive SATURDAY and 312 who worked on consecutive weekends (9th, 10th and 16th March) but the employee 213 worked on 1st weekend and 4th weekend of the month(Archive_month). So the output should return the employees who worked on two consecutive weekends as below.
    Emp_id
    123
    312
    I have written a query to fetch all employees who worked only on a SAT or SUN which is given below, but i am not able to return the employees who worked on consecutive weekends and i need your help.
    select emp_id, count(*)
    from timesheet_archive
    where archive_month = '03/2013'
    and trim(to_char(td_date,'DAY')) in ('SATURDAY','SUNDAY')
    group by emp_id having count(*) > 1
    order by td_date desc
    Please help me with an approach in SQL or PL/SQL to generate a report of employees who worked on two consecutive weekends.
    Thanks,
    Edited by: 999145 on Apr 9, 2013 11:08 PM
    Edited by: 999145 on Apr 9, 2013 11:10 PM

    hi Manik,
    thanks for your response!!
    Please find the below create and insert scripts for your testing.
    I am also validating the output with my requirement. Thanks for your help!
    create table timesheet_archive as
    (TD_date date,
    Emp_id number(19,0),
    Effort Float,
    Archive_month varchar2);
    insert into timesheet_archive values (to_date('2-MAR-2013','dd-MON-yyyy'), 123,8,'03/2013');
    insert into timesheet_archive values (to_date('9-MAR-2013','dd-MON-yyyy'), 123,8,'03/2013');
    insert into timesheet_archive values (to_date('2-MAR-2013','dd-MON-yyyy'), 213,4,'03/2013');
    insert into timesheet_archive values (to_date('3-MAR-2013','dd-MON-yyyy'), 213,4,'03/2013');
    insert into timesheet_archive values (to_date('24-MAR-2013','dd-MON-yyyy'), 213,8,'03/2013');
    insert into timesheet_archive values (to_date('9-MAR-2013','dd-MON-yyyy'), 321,4,'03/2013');
    insert into timesheet_archive values (to_date('10-MAR-2013','dd-MON-yyyy'), 321,4,'03/2013');
    insert into timesheet_archive values (to_date('16-MAR-2013','dd-MON-yyyy'), 321,8,'03/2013');
    insert into timesheet_archive values (to_date('2-MAR-2013','dd-MON-yyyy'), 124,8,'03/2013');
    insert into timesheet_archive values (to_date('9-MAR-2013','dd-MON-yyyy'), 124,8,'03/2013');
    insert into timesheet_archive values (to_date('16-MAR-2013','dd-MON-yyyy'), 124,4,'03/2013');
    insert into timesheet_archive values (to_date('23-MAR-2013','dd-MON-yyyy'), 124,4,'03/2013');
    insert into timesheet_archive values (to_date('16-MAR-2013','dd-MON-yyyy'), 241,8,'03/2013');
    insert into timesheet_archive values (to_date('23-MAR-2013','dd-MON-yyyy'), 241,4,'03/2013');
    insert into timesheet_archive values (to_date('24-MAR-2013','dd-MON-yyyy'), 241,4,'03/2013');
    insert into timesheet_archive values (to_date('2-MAR-2013','dd-MON-yyyy'), 412,8,'03/2013');
    insert into timesheet_archive values (to_date('3-MAR-2013','dd-MON-yyyy'), 412,8,'03/2013');
    insert into timesheet_archive values (to_date('30-MAR-2013','dd-MON-yyyy'), 412,8,'03/2013');
    insert into timesheet_archive values (to_date('31-MAR-2013','dd-MON-yyyy'), 412,8,'03/2013');

  • Move a query to from one user group to another user group

    Hi,
    it's possible to move a query (SQ01) from one user group to another user group ??
    Thank you.

    Hi,
    You can copy queries only if you have the authorization to make changes. Within your current user group, you can copy all queries. However, queries of other user groups can only be copied if the InfoSet used to define the query is assigned to both user groups.
    To copy a query, proceed as follows:
    1. Choose the name of the query you want to copy on the initial screen.
    If you do not know the name, use the directory functions to display the query directories and then choose a query to copy from there.
    2. Choose Copy.
    3. Enter the name and the user group of the query that you want to copy in the dialog box. Furthermore, you must enter a name for the copied query. The system proposes values for this.
    4. Choose Continue.
    This takes you to the initial screen. The query is added and appears in the query directory. You can now continue.
    Regards,
    Amit

  • Can we query more than one class in a call to .tmib

    Hi,
    i am creating a utility to monitor the applications at run time using mib.any
    body have an idea if we can query more than one class in one call to .tmib.
    thanks
    roopesh

    That would be an interesting enhancement, perhaps using Embedded FML to
    pack multiple MIB requests into one buffer.
    Product Management makes all decisions about major enhancements, and it
    is based on customer need, so that's where the requests should go.
         Scott Orshan
    roopesh wrote:
    >
    yes.
    i am trying to devlop a utility which can monitor
    applications at runtime.i wanted to make as less the
    no of calls to tmib as possible but one class does
    not give all the information so i need to query
    more than one.
    anyways thanks for the reply.
    "MS" <[email protected]> wrote:
    Hi,
    Are you trying to write a Tuxedo app health-check monitor utility.
    A tuxedo client can make different calls to .TMIB service for different
    classes.
    I don't think we can query more than one class in a single call.
    Are you looking for something else??/
    HTH
    regards
    MS

  • Query to find unique combinations in a record set

    I need to build a SQL to identify unique combinations
    I have the following data structure -
    I have a table to capture characteristics. Each characteristic can be associated with one or more attributes. Each attribute can be assigned one or more values
    Characteristics are grouped under Characteristic set. A Family set is the highest level of grouping and is a group of characteristic sets.
    I need to find the unique combinations within each family set
    Ex.
    Family Set - F1
    contains Characteristic Set - S1 and S2
    S1 contains characteristics - C1, C2.
    S2 contains characteristics C3
    C1 contains 1 attribute a1 which can have two values v1 and v2
    C2 has 2 attributes a2 and a3 each of which can have one value say v2 and v3 respectively
    c3 has 1 attribute a4 which can take 4 values say v4, v5, v6, v7
    There is no pattern in terms of the number of values that can be assigned to an attribute, number of attributes for a characteristic, no of characteristics present in a set and number of set that can be associated with a family.
    Need to know the max no of unique combinations in a family. One combination for the above ex would be F1S1C1A1V1+F1S1C2A2V2+F1S1C2A3V3+F1S2C3A4V4
    Appreciate your help.
    Thanks
    Gopal

    Hi David,
    Thanks for you analysis
    But these are not the combinations I am looking for. The details below may explain my requirement -
    I am trying to build out a repository of flows supported by a product application.
    Characteristics are features in the application. Each feature can have one or more input parameters or attributes. Each parameter can support multiple values
    For ex. one characteristic could be
    Define Item
    Input parameters/attributes for item could be item class, item type etc. These attributes can take different values.
    Item Source could support values like Manufactured, Procured etc
    Item Type could support values like Raw Component, Finished Goods, Intermediates etc
    Characteristics are stored in a table with ID and name ; Attributes stored in attributes table with ID and named joined with characteristics id .. Values are stored in values table with value id and value and joined with the attribute id
    Based on the above ex., some of the supported combinations are Manufactured Component, Procured Component, Manufactured FG, Procured FG etc
    Characteristic set is a group of related characteristics or features.
    To take the above example further .. we can group Define Item + Define Product Structure as a characteristic set - Define Product
    Define product structure say has one attribute stucture type which takes two values complex and simple
    Characteristic set is stored in a set table with columns setid, setname, stepno, characteristic_id
    Now the combinations become - Manufactured Component with Complex Structure, Manufactured Component with Simple Structure, Manufactured FG with Complex Structure etc ...
    Family set are the supported flows in the application which groups the features to be executed.
    For ex. a Product Definition flow will comprise of
    Step 10 - Define Product (characteristic set)
    Step 20 - Cost the Product (another characteristic set with say one characteristic - cost method which supports value standard and average)
    Family set is stored in a family set table with column familyid, familyname, stepno, chstepid
    Based on the above ex, the product definition flow will have several combinations such as
    Combination 1 -
    Step 10 - Define Mfg Component with Complex Structure
    Step 20 - Cost the Component with Standard Costing
    Combination 2 -
    Step 10 - Define Mfg Component with Complex Structure
    Step 20 - Cost the Component with Average Costing
    and so on ...
    I need to derive the total number of unique combinations for each family set / flow
    Family Set > Step No > Characteristic Set (one characteristic set per step) > Step No > Characteristics (one characteristic per step) > Attributes (many attributes per characteristic) > Attribute value (many values per attribute)
    The complexity is quite large as the product supports several flows which can be executed through many combinations. We need to build out the combinations as a product footprint and I am trying to have it mapped through an apex application.
    Appreciate any help to map this information out.
    Thanks
    Gopal

  • Select query for fetching from 3 tables.

    Can we have a single Select query for fetching same fields (kappl,kschl,vkorg,vtweg,spart,kunwe,datbi,knuma,datab,knumh)
    from 3 tables >> KOTE707,KOTE708 and KOTE709 into an internal table for a particular KUNNR?
    Regards,
    Shashank.

    Hi,
    If you have kunnr field in all the 3 tables then it is possible. use inner join as below
    PARAMETERS: p_cityfr TYPE spfli-cityfrom,
                p_cityto TYPE spfli-cityto.
    DATA: BEGIN OF wa,
             fldate TYPE sflight-fldate,
             carrname TYPE scarr-carrname,
             connid   TYPE spfli-connid,
           END OF wa.
    DATA itab LIKE SORTED TABLE OF wa
                   WITH UNIQUE KEY fldate carrname connid.
    SELECT c~carrname p~connid f~fldate
           INTO CORRESPONDING FIELDS OF TABLE itab
           FROM ( ( scarr AS c
             INNER JOIN spfli AS p ON p~carrid   = c~carrid
                                  AND p~cityfrom = p_cityfr
                                  AND p~cityto   = p_cityto )
             INNER JOIN sflight AS f ON f~carrid = p~carrid
                                    AND f~connid = p~connid ).
    LOOP AT itab INTO wa.
      WRITE: / wa-fldate, wa-carrname, wa-connid.
    ENDLOOP.
    <b>Reward Points if this helps,</b>
    Satish

  • How do i query a sun one server for a member of a  group

    Hi Folks
    I would like to know if any one know how to query a sun one directory server to list all members of the group.
    currenty i have this
    LDAP://SERVERNAME.test.com:5221/ou=people,dc=testrelsec,dc=com>;(&(objectclass = person)& adsPath;subTree"
    this query gives me all users in the directory ,
    Now I have created a static group called GROUPONE using sunone console GUI and made 2 people member of that group
    I need the ldap query which can list the members of GROUPONE
    thanks
    g4hbk
    thanks in advance
    g4hbk

    https://www.redhat.com/archives/fedora-directory-users/2005-September/msg00010.html
    Useful script to extract LDAP based user posixGroup memberships information
    ===
    Assuming you are using posixGroup objectclass and memberUid attribute to
    store your membership information, you may find my shell script useful
    and handy.
    It works on Solaris LDAP Client with "ldapaddent" and "ldaplist"
    commands, and works against FDS, SUN DS or OpenLDAP.
    ===
    Gary

Maybe you are looking for

  • Is there a way to flip the pages of a document instead of scrolling?

    I have got my documents into pages but was hoping instead of scrolling from page to page I could somehow change a setting or preference to be able to flip pages like in iBook. Hope someone else has had this concern or request so that I can make this

  • My imac G4 Display LCD slowly moved to down always...

    Hi! I have imac G4 17 LCD model but the LCD screen can't stay still and it always moved to down slowly. I try to find some screws but no luck. anyone know how can tighten the screen? cheers

  • Firefox kde4 file type association

    All I see is an empty list for applications in firefox preferences. How can i populate it , I am on kdemod4 http://bayimg.com/bAkeBaabD Last edited by venky80 (2008-08-13 07:19:38)

  • Deleted Account in AAD

    I'm using Azure AD Connect Preview to sync our local AD to Azure AD.  I was trying to fix an issue I was having and I deleted an account that was in AAD.  I thought when Azure AD Connect would sync again it would create the account again in AAD, but

  • Execution Results Not Showing...

    Hi, I am using Oracle Ware house Builder 10 g. In this tool in control Center Manager When i execute any maps i am able to see all the execution details. But Now i dont able to see the execution & Job Details For a Particular map..what to do???? Is t