• Apology,pls consider this and suggest me.

    I need some design help here.

    This is my source input data which i need to select based on condition which is given by business.

    create table partners(

    parter_id varchar(10),

    start_date datetime,

    end_date datetime,

    competency_name varcgar(50))

    insert into partners ( 'P1','1/14/2013','2/5/2014','Gold Cloud Productivity')

    insert into partners ( 'P1','5/10/2013','2/6/2014','Gold Small and MidMarket Cloud Solutions ')

    insert into partners ( 'P1','7/14/2013','9/19/2014','Silver Small and MidMarket Cloud Solutions')

    insert into partners ( 'P2','9/14/2013','10/15/2014','Gold Cloud Productivity')

    and i have config table (not sure how it will be but initial my thought of design ) i will have this information from business which are the competency should exist to select particular partner and they specify the condition to select meaning( if partner should be more than one or 2 competency to be eligible for payment)

    create table mastercompetency

    (program varchar(10),

    SKUgroup varchar(10),

    competencyname varchar(50))

    insert into mastercompetency values('DIRECT','SKG1','Gold Cloud Productivity ')

    insert into mastercompetency values('DIRECT','SKG1','Silver Cloud Productivity ')

    insert into mastercompetency values('EA','SKG2','Gold Small and MidMarket Cloud Solutions ')

    insert into mastercompetency values('EA','SKG1','Silver Small and MidMarket Cloud Solutions ')

    Now i need to select the Data from source which should match criteria from business to select eligible partner, how to design this.

    If input data matches (Gold Cloud Productivity and Gold Small and MidMarket Cloud Solutions) OR

    (Silver Small and MidMarket Cloud Solutions ) that partner need be selected from input source data for payment

    The condition i said is one example, it may have any combinations of competencies to be consider as eligible partner.

    Hope its clear now.

    Thanks for all your help till now.