Multiple Field field search with multiple resultset

I have 10 controls in a form and when a control is selected the rest of controls are re-populated
Here's my table structure
Field1
Field2
Field3
Field4
Field5
Field6
Field7
Field8
Field9
Field10
Bus
Tyre
Steering
Engine
Gear
Fuel
MultiSeat
Bus
Door
Steering
Engine
Gear
Fuel
MultiSeat
Car
Tyre
Steering
Engine
Gear
Fuel
2 Row Seat
Car
Door
Steering
Engine
Gear
Fuel
2 Row Seat
Bike
Tyre
Handbar
Engine
Gear
Fuel
Single Seat
Pillion
Cycle
Tyre
Handbar
Pedalling
Single Seat
Carrier
Each field is dependent on other field. By default DISTINCT rows in each field is returned as a result set as below:
select distinct(field1) from table
select distinct(field2) from table
Upon selecting any of the item from the dropdown rest of the dropdowns are bound.
Is there any simplistic approach available?

Hi
Try this
Create a
datraview for above table in .net
Then use
ToTable() method of datagridview  which return datatable
to get distinct value pass true in
toTable() method which return distinct row set for column specified in toTable method
Mark as answer if you find it useful
Shridhar J Joshi Thanks a lot

Similar Messages

  • How can I create a multi field search with wildcard option

    I've been working on a project which has a MySQL database
    that the user can search by choosing to enter some or all of three
    fields in a form on a PHP page, which then, obviously, relate to
    specific variables and fields in the database.
    Previously I had the default values of the variables as '-1'
    which meant that the results page simply ignored any of the
    variables that hadn't been filled in. However, now that the 8.0.2
    update to Dreamweaver has forced the Type of each variable, it no
    longer ignores those values and so returns no results. In order to
    get a correct result I have to fill in all three, I can't just fill
    in one of the fields.
    What do I have to do to regain the functionality of the
    results page simply ignoring any field that isn't filled in
    (effectively giving a 'any' value)?

    When building SQL statement, leave out the WHERE
    xyzfield=SearchString.
    "Podsnap" <[email protected]> wrote in
    message
    news:e7o8o0$jpo$[email protected]..
    >I need to create a search page that give all results if
    nothing is input
    >into
    > the field.
    >
    > Ultimately I want to have several fields on the page and
    the user will be
    > able
    > to enter as much or as little into the fields.
    >
    > So while the first field it likely to be a keyword
    search I might also
    > have a
    > field for say, 'city' and if nothing is chosen then it
    will give results
    > for
    > all cities but, obviously, if London is chosen then it
    will give results
    > for
    > just London. (And obviously if something is put into the
    keyword field as
    > well,
    > then that will filter the results further).
    >
    > Any ideas how I go about this? Or can you point me to a
    good tutorial? Or
    > even
    > an extension?
    >
    > Thanks.
    >
    > PS: I'm not, by any means, a code warrior, so speak
    slowly ;)
    >

  • How to search with multiple constraints in the new java API?

    I'm having a problem using the new MDM API to do searches with multiple constraints.  Here are the classes I'm trying to use, and the scenario I'm trying to implement:
    Classes:
    SearchItem: Interface
    SearchGroup: implements SearchItem, empty constructor,
                 addSearchItem (requires SearchDimension and SearchConstraint, or just a SearchItem),
                 setComparisonOperator
    SearchParameter: implements SearchItem, constructor requires SearchDimension and SearchConstraint objects
    Search: extends SearchGroup, constructor requires TableId object
    RetrieveLimitedRecordsCommand: setSearch method requires Search object
    FieldDimension: constructor requires FieldId object or FieldIds[] fieldPath
    TextSearchConstraint: constructor requires string value and int comparisonOperator(enum)
    BooleanSearchConstraint: constructor requires boolean value
    Scenario:
    Okay, so say we have a main table, Products.  We want to search the table for the following:
    field IsActive = true
    field ProductColor = red or blue or green
    So the question is how to build this search with the above classes?  Everything I've tried so far results in the following error:
    Exception in thread "main" java.lang.UnsupportedOperationException: Search group nesting is currently not supported.
         at com.sap.mdm.search.SearchGroup.addSearchItem(Unknown Source)
    I can do just the ProductColor search like this:
    Search mySearch = new Search(<Products TableId>);
    mySearch.setComparisonOperator(Search.OR_OPERATOR);
    FieldDimension myColorFieldDim = new FieldDimension(<ProductColor FieldId>);
    TextSearchConstraint myTextConRed = new TextSearchConstraint("red",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConBlue = new TextSearchConstraint("blue",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConGreen = new TextSearchConstraint("green",TextSearchConstraint.EQUALS);
    mySearch.addSearchItem(myColorFieldDim,myTextConRed);
    mySearch.addSearchItem(myColorFieldDim,myTextConBlue);
    mySearch.addSearchItem(myColorFieldDim,myTextConGreen);
    the question is how do I add the AND of the BooleanSearchConstraint?
    FieldDimension myActiveFieldDim = new FieldDimension(<IsActive FieldId>);
    BooleanSearchConstraint myBoolCon = new BooleanSearchConstraint(true);
    I can't just add it to mySearch because mySearch is using OR operator, so it would return ALL of the Products records that match IsActive = true.  I tried creating a higher level Search object like this:
    Search topSearch = new Search(<Products TableId>);
    topSearch.setComparisonOperator(Search.AND_OPERATOR);
    topSearch.addSearchItem(mySearch);
    topSearch.addSearchItem(myActiveFieldDim,myBoolCon);
    But when I do this I get the above "Search group nesting is currently not supported" error.  Does that mean this kind of search cannot be done with the new MDM API?

    I'm actually testing a pre-release of SP05 right now, and it still is not functional.  The best that can be done is to use a PickListSearchConstraint to act as an OR within a field.  But PickList is limited to lookup Id values, text attribute values, numeric attribute values and coupled attribute values.  It works for me in some cases where I have lookup Id values, but not in other cases where the users want to search on multiple text values within a single field.

  • How to enhance the standard search with custom field?

    Hi all,
    I would like to know the general optimal procedure to enhance the standard searches like Opportunity search or Lead search.
    I've gone through some of the threads here. Some suggest, to add the new field using AET and copy the IMPL class of the search and then code the custom logic. Some say, append the new field to the structure of the search object and then implement the BADI.
    I'm actually a bit confused to understand the correct procedure.
    Can someone please help me with a generic procedure to enhance the standard search with a custom field?
    Thanks in advance.

    Hi Maren,
    Once I have got the same development. I have followed the below steps, please check with this. Let me know for further inputs.
      Add new field using Append structure of type ‘XXX’ in search
      Create BADI implementation for Enhancement spot ‘ES_CRM_RF_Q1O_SEARCH’ and include filter ‘BTQOPP’
      Put your logic in BADI implementation – SEARCH method
      Add it in WebUI configuration
      Remove the operator if required
    Regards,
    Swadini Sujanaranjan

  • Is it possible to enhance the dynamic search with Option field with custom

    Hi All,
    is it possible to enhance dynamic search with OPTION parameter like Equals to , Between etc, instead of these are we able to add our own? If yes, then which are steps need to perform.
    Thanking you.
    Regards,
    VjMHyd

    Just to test is this possible i wrote a sample program
    data: lr_dquery type REF TO cl_crm_bol_dquery_service.
    data: lv_status TYPE CRMT_PROCESS_DESCRIPTION.
    data: mv_bol_core type REF TO cl_crm_bol_core,
            lr_result_obj type ref to if_bol_bo_col,
            lv_opp_id type string,
            lr_entity type ref to cl_crm_bol_entity.
    MV_BOL_CORE = CL_CRM_BOL_CORE=>GET_INSTANCE( ).
    MV_BOL_CORE->START_UP( 'BT' ).
    *data: lv_opp_id type string.
    lr_dquery = cl_crm_bol_dquery_service=>GET_INSTANCE( 'BTQOpp'  ).
    if lr_dquery is bound.
    *   prepare the selection paramters
      lr_dquery->add_selection_param(
        exporting
          iv_attr_name =  'OBJECT_ID'   " Component name
          iv_sign      =   'I'  " Inclusion/exclusion criterion SIGN for range tables
          iv_option    =   'PI'  " Selection operator OPTION for range tables
          iv_low       =   lv_opp_id
    *   Get the dynamic result object and read the opportunity status from there
      lr_result_obj ?= lr_dquery->get_query_result( ).
      lr_entity ?= lr_result_obj->get_first( ).
      if lr_entity is bound.
        lr_entity->get_property_as_value( exporting iv_attr_name = 'STATUS'
                                    importing ev_result = lv_status ).
      endif.
    endif.
    BREAK-POINT.
    No syntax error but junk values returned as I had not written the logic for retrieval based on this operator. This means that if you add the selection_param to the dynamic query and then handle that same thing in the GENIL class for the component then you would be able to retrieve the values based on this.
    On the UI , you would be retrieving all the operators for the parameters. There for that particular field you have to add the new operator for your case. And this would be send to the Dquery class and added as a selection param. When the query is executed, if the genil class has been updated to handle this parameter, you should be able to retrieve the results.
    Regards
    Kavindra
    Edited by: joshi_kavindra on Jan 19, 2012 2:45 PM
    Edited by: joshi_kavindra on Jan 19, 2012 2:53 PM

  • Multiple ResultSets with Oracle Thin Driver.

    Hi,
    I am using Oracle Thin Driver to Connect to the Oracle Database (8.1.7). I wanted to take advantage
    of the multiple Resultsets Scenario for fetching Data from the DB. Please have a look at the code
    fragment below.
    String sql = "select * from TAB1; select * from TAB2";
    Connection conn = getConnection();
    PreparedStatement stmnt = conn.prepareStatement(sql);
    stmnt.execute();
    However , I am getting the following Error.
    java.sql.SQLException: ORA-00911: invalid character
    Could anyone give me the possible reason/corrected syntax for the SQL.
    Thanks for any help in advance.

    It's unclear what your problem is...
    However...
    Oracle will only execute one SQL statement at a time in a Statement or PreparedStatement; therefore these can only return a single ResultSet.
    However, an Oracle stored procedure can be written to return multiple results; it can therefore be run from a CallableStatement and getMoreResults() is then used to get the additional ResultSet data.
    An example of doing this is here:
    http://edocs.beasys.com/wls/docs81/jdbc_drivers/oracle.html
    scroll towards the bottom and look for Listing 5-3

  • Calling stored procedure and returning multiple resultsets

    Hello,
    Is it possible to create a procedure that return multiple result sets?
    e.g.
    procedure GetDataFromTables() is
    begin
    select * from table_one;
    select * from table_two;
    end GetDataFromTables;
    And I want to call this procedure that returns multiple resultsets (one for table_one and another for table_two)
    I have referred to the OCCI sample occiproc.cpp, but I am not sure how to handle multiple resultsets.
    Your help is highly appreciated.

    Thank You,
    Got the REF cursor in storedproc.cpp.
    But as it is documented, getCursor() gets the REF CURSOR value of an OUT parameter as a ResultSet.
    So, is it true that if I have to write a procedure that selects * from 50 tables (50 SQL statements) , I have to set 50 OUT parameters to get the result sets.?
    Is there any better way of doing this?
    e.g. in DB2, we can open multiple cursors in the procedure body and then get the result set one after another.
    CREATE PROCEDURE get_staging_data ()
    RESULT SETS 1 <no. of result sets>
    LANGUAGE SQL
    BEGIN ATOMIC
    DECLARE L_SQL varchar(5000);
    DECLARE c CURSOR WITH RETURN TO CLIENT FOR L_STMT;
    SET L_SQL = '';
    SET L_SQL = 'SELECT * FROM ';
    SET L_SQL = L_SQL || IN_Tab_Name ;
    SET L_SQL = L_SQL || ' WHERE VERIFY_FLAG=''S'' FOR READ ONLY OPTIMIZE FOR 2000 ROWS' ;
    PREPARE L_STMT FROM L_SQL;
    OPEN c; < can open multiple cursors in the prodedure body>
    END

  • Custom Field Searches in Acrobat possible?

    Hello,
    We have been given 2 projects to undertake.
    Project 1: Scan a number of annually published printed books to searchable (ocr) pdf format.  This isn't a problem.
    Project 2: The above annually published printed books are now required to be published electronically on CD.  We have the electronic content of the next book in Microsoft Excel format. The data is primarily made up of titles & headers and then a hundreds of names (surname, forename).  We are comfortable that we can dynamically create and format the PDF book from the Excel file.  However, our client has asked if it is possible to perform exact field searches on the data fields that we have imported from Excel.  So (rather than do an open freetext search) have the ability to search like:  surname = smith; forename = john.  The visitor would then see the results in a similar way as to how the index catalog output looks (ie. you see the matching page results on the left).
    Question: Is this possible using Adobe Acrobat 9 Pro?
    Question: If not, is there another product that could be used?
    Really appreciate your help with this.
    Thank you,
    Paul

    This can be done. In fact, it is kind of part of the PDFFolio system I developed some years ago. This system was, for example, used in the IRS Tax Products CDs for a few years.
    Feel free to contact me in private for further conversations in order to provide a quote.
    Hope this can help.
    Max Wyss
    PRODOK Engineering
    max at prodok dot com

  • JDBC Adapter - Multiple Resultsets

    Hello,
    Does anyone know if the JDBC adapter can return multiple resultsets?
    So something like the following JDBC Code:
    CallableStatement cstmt;
    ResultSet rs;
    int i;
    String s;
    cstmt.execute();       //Call the stored procedure      
    rs = cstmt.getResultSet(); //Get the first resultset
    while (rs.next()) {
    i = rs.getInt(1);                          System.out.println("Value from first set = " + i); 
    cstmt.getMoreResults();//Point to the second resultset  rs = cstmt.getResultSet();// Get the second resultset
    while (rs.next()) {
    s = rs.getString(1);                 
    System.out.println("Value from second resultset = " + s);
    Greetings,
    Bart

    Hi Bart,
    sure you can select more than one table either with Stored Procedue or with Query Statement for example (also if you concate more than one SQL statement) like:
    update table1 set STATUS = 4 where STATUS = 3 select *
    from table1 bk inner join table2 on (KEY = BZ_KEY) where KEY = 449070
    - or you create an View onb DB side that makes all of your Data selection:
    select * from view where status = 4
    - but you also can use stored procedure - in my opinion the most powerfuel tool...
    If their is something left -keep asking
    Regards Matt

  • For what is the field SVER with type RSRSVER in structure RSDRI_S_SELNODE ?

    Does anyone know what does the field SVER with type RSRSVER in structure RSDRI_S_SELNODE mean ??
    Thx....

    If this indicator is set, the material is costed using costing with a quantity structure (BOM and routing).
    The system searches for any existing cost estimates with quantity structure for the individual materials; it ignores existing cost estimates without quantity structure. If the system does not find any valid costing data for the materials, it costs the material or accesses the price in the material master.
    If this indicator is not set, the planned costs for the material are calculated using the cost estimate without quantity structure. In this case, you use unit costing to create the quantity structure manually by entering costing items for materials and activity types, for example.
    The system now searches for any existing cost estimates without quantity structure. If a cost estimate without quantity structure exists for a material, the results of this cost estimate are included in a cost estimate with quantity structure. If there is no cost estimate without quantity structure, the cost estimate with quantity structure accesses the price in the material master record. The planned costs for this material then go into the cost estimate with quantity structure as raw material costs.
    This does not apply if the indicator Ignore prod cost est w/o qty structure is set in the costing variant.

  • Not render any field search criteria initially in Advanced Search Panel

    Hi Everyone!
    It's possible to hide or remove all field search criterias initially in Advanced search panel. We need that initially doesn't exist any field search and the user use the 'Add another' option when him need add search criterias.
    Thanks,
    Carlos C.

    Your solution to the indexing issue with the LIKE operator is taking a small issue and making a big issue out of it.
    Why not just fix the initial problem with basic tuning techniques ... for example a hint would force index usage.
    So might having accurate statistics. So might tuning one or more optimizer parameters a small amount.
    You have chosen the wrong solution for a very small problem thus you are where you are.

  • Having multiple resultsets open at the same time

    Hi,
    I have the following piece of code to populate multiple resultsets returned by a call to a stored procedure in Sybase.
    int l_noOfResultSetsReturned = 0;
    int l_nextResultSetToPopulate = 1;
    boolean l_isResultSet = l_CallableStatement.execute();
            while( l_isResultSet )
                switch ( l_nextResultSetToPopulate )
                    case 1:
                        l_reportListResultSet =  l_CallableStatement.getResultSet();
                        break;
                    case 2:
                        l_inputSetterResultSet = l_CallableStatement.getResultSet();
                        break;
                    case 3:
                        l_outputGetterResultSet = l_CallableStatement.getResultSet();
                        break;
                    case 4:
                        l_outputColumnHeaderResultSet = l_CallableStatement.getResultSet();
                        break;                     
                    default:
                        //throw new CubeInvalidNumberOfResultSetsException();
                        System.out.println(" More than 4 RS returned");
                l_noOfResultSetsReturned++;
                l_nextResultSetToPopulate++;
                l_isResultSet = l_CallableStatement.getMoreResults(PreparedStatement.KEEP_CURRENT_RESULT);
            }The problem is that when I try to run this, I get the following error:
    java.lang.AbstractMethodError: com.sybase.jdbc.SybCallableStatement.getMoreResults(I)Z
    I am using NetBeans 3.6 as the IDE with the java version 1.4.2_06. I got this error when I tried using jconnect45.jar for the driver part. I also tried the same with jconn2.jar. It also gave me the same error.
    I need someway to ensure that the four resultsets are open for further down the line processing. Any help would be most welcome.
    Thanks and regards,
    Ganesh

    I think the AbstractMethod Error is caused by calling a method which is not available on your JDBC Driver. This means you are using a JDBC 3 method on a JDBC 2 driver (or JDBC 2 on JDBC 1 driver). Check the JDBC version of your driver and use only the methods allowed for the JDBC driver version you have (or get a newer one).
    Good Luck!

  • List of characters not supported for a field search of type char

    Hi,
    I have a field of type char.
    When we create entries for that field in a table we use special characters like &, etc. When searched it is not supported and not displayed in results.
    I suppose it might be because SAP can support for characters of specific ASCII codes.
    If you have any list of the ASCII codes supported in search, kindly let me know.
    Thanks and Regards,
    Jaisish

    Hi Jaisish,
    as far as I know, there are two "special" characters that act as jokers in a field search
    +: standing for one character
    *: standing for zero or more characters
    You can search for these characters into the content of a field, if you "escape" them. The symbol for escaping is "#" (before the special character + or *).
    For example, if you search for "#*", this will search all entries with an asterisk in its content.
    I hope this helps. Kind regards,
    Alvaro

  • How to return Multiple ResultSets Using Callable Statement

    hi everybody,
    while i was working with callable statements i came across a problem of how to fetch Multiple Resultsets by means of Stored Procedures written for tables in Oracle.
    If any one can help me, pls do help me with a detailed explanation, and if possible do get me a example source code too.
    khumaar

    I have a similar problem with oracle and jdbc:
    I want to send a sql query like:
    sqlQuery = "select n1, n2 from table1; select n1, n2
    from table2"
    I used a prepared statement, but when I call
    .execute(sqlQuery)
    oracle doesn't like this,
    can someone help on this?Try putting a begin/end around it. Play with the syntax first in sqlplus.
    You do realize that you MUST extract using the syntax for extracting multiple result sets correct? It will NOT work as one result set.

  • Field Search in Folio Indesign DPS

    Hi, i use Indesign cc, i would like know if is possible to insert search field folio?
    I need created book with many queues, is necessary to insert field search for surf.
    Is possible)
    thank you very much
    p.bortolotti

    Hi, i use Indesign cc, i would like know if is possible to insert search field folio?
    I need created book with many queues, is necessary to insert field search for surf.
    Is possible)
    thank you very much
    p.bortolotti

Maybe you are looking for

  • HT1349 iTunes 11.03.42 problem burning disks Error 4251 with Windows  Vista Service Pack 2

    I am having problems burning a playlist to CD - type Maxell CD-R 80XL. I have been using these successfully for a while. iTunes 11.03.42 updated today Error 4251 and wastes a CD I have run windows registry cleaner I have tested CD drive with diagnost

  • Fingerprin​t lock is not working!!!

    Hlw guys! fingerprint sensor is not working on my probook 450 g2. Validity Fingerprint Sensor  Driver has been already installed but it's not working. plz let me know how i will solve this problem. need your very important expert advise. thank you...

  • How to retrive only data related to specific business group efficiently?

    We have sql queries which were written for an instance assuming that there will be only one Business Group. Now, we want to reuse those queries for another instance which is based on multi business groups. I understand, using fnd_profile.value('PER_B

  • Dynamic Query for 'Select IN' -- URGENT!!!

    I've got the following Select statement - SELECT Employee_Name, SSN FROM Company WHERE EMPLOYEE_NAME IN (c_Employee_Name) ; Here c_Employee_Name is a Returned RefCursor from another function. It gives error as Type mismatch. Is there anyway I can run

  • Dynamic Columns Generation in Bex

    Hi Gurus, I have a requirement to create a BEX report where user will enter a starting month/fiscal period and number of months/periods on a variable screen and the Bex will generate columns dynamically. If the user does not enter anything on the var