Incorrect result set with using isnull() function  in IQ 16

Hi team,
We have IQ 16 on HP UX.
When we use isnull() function in where clause we get incorrect result set if we do not use column name in the result set.
In first select we get result with one row but in second one we get an empty result set.
select ID, dat_start, dat_end, dat_stop
from table_test
where ID=1105935925
and isnull(dat_stop,dat_start) <> dat_end
select ID
from table_test
where ID=1105935925
and isnull(dat_stop,dat_start) <> dat_end
It depends on number of row or volume of data in table, It is possible to use option Revert_To_V15_Optimizer to get the correct result.
Do you have any different idea how to solve it?
Thanks Milos.

We have tested two versions:
Sybase IQ/16.0.0.653/131122/P/sp03/ITANIUM/HP-UXi 11.31/64bit/2013-11-22 01:49:18
SAP IQ/16.0.0.807/140507/P/sp08/ITANIUM/HP-UXi 11.31/64bit/2014-05-07 21:11:45
Both versions have given same mistake.
We have not opened any support case for this issue because it is data depended issue. It is not easy to simulate it as an example.
Do you think we should open a support case for it?
Miloš

Similar Messages

  • Result Sets with the Microsoft ODBC Driver for Oracle

    Howdy all.
    I have an Oracle database that I have migrated from MSSQL2K. My front end is mostly VB, and I have many (hundreds) DLL's that use ADO to access the database and execute stored procedures in the database. I cannot seem to get result sets from the Oracle procedures. I have tried passing a SYS_REFCURSOR as an IN OUT parameter, and I have tried returning a SYS_REFCURSOR in a function. The Microsoft ODBC Driver for Oracle does not seem to handle the ref cursors. If I use the Oracle ODBC driver, then ref cursors are handled sort of magically. Just like the result sets are in MSSQL with the SQL Server ODBC Driver.
    The question that I would like to pose to anybody willing to answer is this: Is there any way to use the Microsoft ODBC Driver for Oracle without changing the way I do the database access (using ADO connection/command/recordset objects)? I need the same DLL's to work on top of both MSSQL and Oracle.
    I know that what I want to do is possible using the Oracle ODBC driver, but this will take some major changes to some of my DB components. I am trying to stay away from this, but it looks like I am going to have to go that route - that is unless somebody wows me with a good answer to this post.
    wally

    As you are using Microsoft driver which works in XP and does not on Win 2003 you should post this on microsoft forum.

  • Af:inputListOfValues sets value of first item in result set when using enter key or tab and component set to autosubmit=true

    I'm using JDev 11.1.1.6 and when I type a value into an af:inputListOfValues component and hit either the enter key or the tab key it will replace the value I entered with the first item in the LOV result set. If enter a value and just click out of the af:inputListOfValues component it works correctly. If I use the popup and search for a value it works correctly as well. I have a programmatic view object which contains a single transient attribute (this is the view object which is used to create the list of value component from) and then I have another entity based view object which defines one of its attributes as a list of value attribute. I tried using an entity based view object to create the LOV from and everything works as expected so I'm not sure if this is a bug when using programmatic view objects or if I need more code in the VOImpl. Also, it seems that after the first time of the value being replaced by the first value in the result set that it will work correctly as well. Below are some of the important code snippets.
    Also, it looks like it only doesn't work if the text entered in the af:inputListOfValues component would only have a single match returned in the result set. For instance given the result set in the code: Brad, Adam, Aaron, Fred, Charles, Charlie, Jimmy
    If we enter Cha, the component works as expected
    If we enter A, the component works as expected
    If we enter Jimmy, the component does not work as expected and returns the first value of the result set ie. Brad
    If we enter Fred, the component does not work as expected and returns the first value of the result set ie. Brad
    I also verified that I get the same behavior in JDev 11.1.1.7
    UsersVOImpl (Programmatic View Object with 1 transient attribute)
    import java.sql.ResultSet;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.jbo.JboException;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Wed Sep 18 15:59:44 CDT 2013
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class UsersVOImpl extends ViewObjectImpl {
        private static ADFLogger LOGGER = ADFLogger.createADFLogger(UsersVOImpl.class);
        private long hitCount = 0;
         * This is the default constructor (do not remove).
        public UsersVOImpl () {
         * executeQueryForCollection - overridden for custom java data source support.
        protected void executeQueryForCollection (Object qc, Object[] params, int noUserParams) {
             List<String> usersList = new ArrayList<String>();
             usersList.add("Brad");
             usersList.add("Adam");
             usersList.add("Aaron");
             usersList.add("Fred");
             usersList.add("Charles");
             usersList.add("Charlie");
             usersList.add("Jimmy");
             Iterator usersIterator = usersList.iterator();
             setUserDataForCollection(qc, usersIterator);
             hitCount = usersList.size();
             super.executeQueryForCollection(qc, params, noUserParams);
        } // end executeQueryForCollection
         * hasNextForCollection - overridden for custom java data source support.
        protected boolean hasNextForCollection (Object qc) {
             Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
             if (usersListIterator.hasNext()) {
                 return true;
             } else {
                 setFetchCompleteForCollection(qc, true);
                 return false;
             } // end if
        } // end hasNextForCollection
         * createRowFromResultSet - overridden for custom java data source support.
        protected ViewRowImpl createRowFromResultSet (Object qc, ResultSet resultSet) {
             Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
             String user = (String)usersListIterator.next();
             ViewRowImpl viewRowImpl = createNewRowForCollection(qc);
             try {
                 populateAttributeForRow(viewRowImpl, 0, user.toString());
             } catch (Exception e) {
                 LOGGER.severe("Error Initializing Data", e);
                 throw new JboException(e);
             } // end try/catch
             return viewRowImpl;
        } // end createRowFromResultSet
         * getQueryHitCount - overridden for custom java data source support.
        public long getQueryHitCount (ViewRowSetImpl viewRowSet) {
             return hitCount;
        } // end getQueryHitCount
        @Override
        protected void create () {
             getViewDef().setQuery(null);
             getViewDef().setSelectClause(null);
             setQuery(null);
        } // end create
        @Override
        protected void releaseUserDataForCollection (Object qc, Object rs) {
             Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
             usersListIterator = null;
             super.releaseUserDataForCollection(qc, rs);
        } // end releaseUserDataForCollection
    } // end class
    <af:inputListOfValues id="userName" popupTitle="Search and Select: #{bindings.UserName.hints.label}" value="#{bindings.UserName.inputValue}"
                                                  label="#{bindings.UserName.hints.label}" model="#{bindings.UserName.listOfValuesModel}" required="#{bindings.UserName.hints.mandatory}"
                                                  columns="#{bindings.UserName.hints.displayWidth}" shortDesc="#{bindings.UserName.hints.tooltip}" autoSubmit="true"
                                                  searchDesc="#{bindings.UserName.hints.tooltip}"                                          
                                                  simple="true">
                              <f:validator binding="#{bindings.UserName.validator}"/>                      
    </af:inputListOfValues>

    I have found a solution to this issue. It seems that when using a programmatic view object which has a transient attribute as its primary key you need to override more methods in the ViewObjectImpl so that it knows how to locate the row related to the primary key when the view object records aren't in the cache. This is why it would work correctly sometimes but not all the time. Below are the additional methods you need to override. The logic you use in retrieveByKey would be on a view object by view object basis and would be different if you had a primary key which consisted of more than one attribute.
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i) {
        return retrieveByKey(viewRowSetImpl, null, key, i, false);
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, String string, Key key, int i, boolean b) {
        RowSetIterator usersRowSetIterator = this.createRowSet(null);
        Row[] userRows = usersRowSetIterator.getFilteredRows("UserId", key.getAttribute(this.getAttributeIndexOf("UserId")));
        usersRowSetIterator.closeRowSetIterator();
        return userRows;
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i, boolean b) {
        return retrieveByKey(viewRowSetImpl, null, key, i, b);

  • Updateable scrollable result sets with join statement

    I am writing a generic GUI fronend for any database that has a JDBC2.0 driver available.
    I have been using scrollable updateable result sets. These work well for individual tables but as soon as two tables are linked either implicitly or explicitly with a join statement the result set meta data isDefinitelyWriteable is set to false thus preventing the result set from being updated.
    Assuming I am using the JDBC-ODBC driver with java sdk1.4.0 and MS Access (although I have used other databases and JDBCs I assume that the one mentioned will be a common combination and needs to work) is there any way of getting linked tables to be updateable with scollable result sets.
    I am using scrollable result sets since this prevents the necessity of putting the data in a secondary data store.
    I am able to link tables programmatically by requerying the linked table with a new where clause each time the cursor moves in the linked table but this seems rather wasteful. This method is not vey satisfactory when attempting to display data from more than one table which have more than one linked level (i.e. cascaded links).
    Is there a simple solution to this problem or do I have to do a rewrite using an update statement instead of having an updateable result set. I assume this method would also require the result set to be reloaded after the update.
    Any suggestions much appreciated.

    I am trying to make the GUI as flexible as possible by constructing "views" which if necessary link tables on one field in each table. This is fine for two tables but when linking to several tables the information thats produced cannot be read easily because as it stands the information from each table is displayed on a separate tabbed page. This mechanism allows me to keep each record set for each table separate and updateable.
    Since I could see that this was not very user friendly in the way that it displayed the data I decided to try and introduce a join on two or more tables and hence the introduction of the current problem.
    I mentioned that the objective was to be flexible and therefore I also allow queries to be written by the user to facilitate for any shortfalls of the automatic query construction produced by using the "views" mechanism.
    So the answer to your question is yes I do control the SQL selections with one mechanism but ultimately no I do not because I provide a fail safe which allows the user to enter arbitary SQL.
    I only really want a solution for the controlled SQL construction mechanism where I create the link between two or more tables. As mentioned earlier these are linked on one field only but I wish to provide the option of displaying the result in a single table (tabbed page) rather than spread across multiple tabbed pages.

  • Result set without using cursor in Oracle

    Hi,
    I am very much new to oracle. we have a JDBC code and SQL Server procedure and which works fine. Now that we want to implement the same in Oracle also.we deceided not to change the JDBC but to change Stored Procedure and schema.
    Assume for Eg there is a stored procedure in SQL Server that return a simple query from table
    say
    creat procedure Test
    as
    begin
    select * from Accounts
    return
    end
    This procedure returns all the rows in the Accounts table and corresponding java code the fetch all the rows from ResultSet.
    CallableStatement cStmt = con.prepareCall("{ call test ? }" );
    cStmt.setInt( 1 , id_ );
    ResultSet rs = cStmt.executeQuery();
    while( rs.next() )
    // get all the rows
    will give all the rows from the table account.
    Now that we want to implement the same in Oracle.
    I just want to know, does Oracle provides any way to write a pl/sql or Procedure that returns resultset not as a cursor, but i should work with existing code.
    I don't want to declare like the below code
    CallableStatement cStmt = con.prepareCall("{? = call BrowseAccount.getRefCursor }");
    cStmt.registerOutParameter(1, OracleTypes.CURSOR);
    cStmt.execute();
    ResultSet rs = null;
    rs = (ResultSet)cStmt.getObject(1);
    while (rs.next() )
    // get the resultset
    If anybody have any suggestion or sample code will be really appreciated
    thanks
    vijay

    This is from the Oracle JDBC FAQ at http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#_51_ :
    How do the JDBC drivers support Oracle REFCURSOR datatypes?
    The Oracle JDBC driver supports bind variables of type REFCURSOR. A REFCURSOR is represented by a JDBC ResultSet. Use the getCursor method of the CallableStatement to convert a REFCURSOR value returned by a PL/SQL block into a ResultSet. JDBC lets you call a stored procedure that executes a query and returns a results set. Cast the corresponding CallableStatement to oracle.jdbc.driver.OracleCallableStatement to use the getCursor method.
    Importing classes from the oracle.jdbc.driver package makes programs more readable. Here is a simple example. The samples subdirectory of the distribution has additional examples.
    import oracle.jdbc.driver.*;
    CallableStatement cstmt;
    ResultSet cursor;
    // Use a PL/SQL block to open the cursor
    cstmt = conn.prepareCall
    ("begin open ? for select ename from emp; end;");
    cstmt.registerOutParameter (1, OracleTypes.CURSOR);
    cstmt.execute ();
    cursor = ((OracleCallableStatement)cstmt).getCursor (1);
    // Use the cursor like a normal ResultSet
    while (cursor.next ())
    {System.out.println (cursor.getString (1));}

  • GUI_UPLOAD, is there any authority need to be set to use this function ?

    hi all,
    GUI_UPLOAD, using this function, some of the users can't execute it,  is there any authority need to be set  for this function ?
    thanks.

    Hi,
    This fn module has an authorization Object S_GUI.
    With this object, you can, for example, assign authorization to save lists in local files (download lists).
    The object has a single field 'Activity'.
    Possible values:
    60: Upload; This authorizes you to load data into the system using ws_upload or gui_upload. You cannot select the data to be uploaded.
    Regards,
    Gayathri

  • Not able to access the result set from one member function to another

    Im new to jdbc
    I have declared a connection object , a result set object and statement object in one member function and i am not able to access these in another member function. But both are in the same class
    Kindly help
    Thanks
    Shasi

    Kindly refrain from double-posting:
    http://forum.java.sun.com/thread.jspa?threadID=700659&tstart=0
    - Saish

  • Read data from MCU with bluetooth with using labview function ?

    Hi.
    I send data from MCU to labview. I do this work with usb to serial pl2303TA and it work well.
    recently I decide to use bluetooth for communicate between MCU and LV. MCU use a bluetooth module like HC-05 or BC-04. 
    with using VISA read functions we just use a VISA configured serial and read functions. 
    in bluetooth we must use which functions for receive data ? and where we can use them ?  
    I use bluetooth discover function and it show my phone or module ID. what are other steps for reading data ?
    Thanks.

    As Dennis_Knuttson pointed out, if you associate a COM port to your bluetooth adapter on your LV PC, you can just use very simple VISA functions.
    Maybe this example can help you how to do this (this one is an Android<-PC serial comm via bluetooth):
    https://decibel.ni.com/content/docs/DOC-39917

  • Issue with use of Function Module GUI_UPLOAD

    Hi Experts,
    I have an issue in using the Function Module GUI_UPLOAD for uploading the contents of an Excel file on the Presentation Server to an internal table in an ABAP Program.
    My file consists of around 300 records but the FM succeeds in uploading only the first 6 lines to the Internal Table specified while calling the FM.
    I dont have any idea why this happens. Any pointers in this direction will be helpful.
    Thanks in advance.
    Regards,
    Keerthi

    Hi,
    Kindly go through this link below:
    https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=60655105
    Hope it helps you
    Regards
    Mansi

  • Problem with using SPrintf function in a cpp file

    SPrintf can be used with .c extension, but when it's used in a .cpp then you get the following:
    Error C2664: 'SPrintf' : cannot convert parameter 1 from 'char [10]' to 'unsigned char *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    Error executing cl.exe.
    But it does compile with .c extension, however this time the rest of the code doesn't work.
    Any ideas?
    Thanks,
    Sacit

    Kevin,
    Here is a piece from the code:
    CIN MgErr CINRun(LStrHandle ParameterFilePath, LStrHandle DataFilePath, LStrHandle OutputFilePath, int32 replace, int32 ver, int16 calrange, int16 istof, LStrHandle OutputString)
    int i, StartCh, ChannelNum;
    double Density, a, b, sigmachn, sigmawin, sigmascattp, EInit, angle, ns, es,
    concentration, totalweight, conversion, Dsample, Count[2048], NetCnts;
    char temp[15], Z1Name[2], Z2Name[10][2];
    char parafilename;
    //char *datafilename = "";
    //char *outfilename = "";
    //char *cMessageText;
    // Make necessary conversions.
    LStrLen (*OutputString) = LStrLen(*ParameterFilePath);
    //MoveBlock(LStrBuf(*ParameterFilePath), LStrB
    uf(*OutputString), LStrLen(*ParameterFilePath));
    MoveBlock(LStrBuf(*ParameterFilePath), & parafilename, LStrLen(*ParameterFilePath));
    MoveBlock(& parafilename, LStrBuf(*OutputString), LStrLen(*ParameterFilePath));
    ifstream parafile, infile;
    ofstream outfile;
    Ion_Target mIon_Target;
    mIon_Target.Z2 = new int(10);
    mIon_Target.M2 = new double(10);
    mIon_Target.F = new double(10);
    // Open parameter file...
    parafile.open((char *)parafilename, ios::in|ios::nocreate);
    if(parafile == NULL)
    //cMessageText = "Couldn't Open Parameter File. Maybe it doesn't exist";
    // return -1;
    return fIOErr;
    parafile.close();
    The problem is I have to use ifstream method, because the rest of the code depends on it, and I don't want to deal with the conversion. Otherwise, I would have used FMOpen/FMClose utilities.
    So the problem is obvious as you see, all I need is to convert LStrHandle to a char.
    When I run the code from LabVIEW, "The instruction at "0x77f83e91" referenced at "0x555c3a44". The memory could not be "read"." error message appears.
    I'd appreciate your help.
    Sacit
    Attachments:
    sc.cpp ‏15 KB

  • Performance issue with using MAX function in pl/sql

    Hello All,
    We are having a performance issue with the below logic wherein MAX is being used in order to get the latest instance/record for a given input variable ( p_in_header_id).. the item_key is having the format as :
    p_in_header_id - <number generated from a sequence>
    This query to fetch even 1 record takes around 1 minutes 30 sec..could someone please help if there is a better way to form this logic & to improve performance in this case.
    We want to get the latest record for the item_key ( this we are getting using MAX (begin_date)) for a given p_in_header_id value.
    Query 1 :
    SELECT item_key FROM wf_items WHERE item_type = 'xxxxzzzz'
    AND SUBSTR (item_key, 1, INSTR (item_key, '-') - 1) =p_in_header_id
    AND root_activity ='START_REQUESTS'
    AND begin_date =
    (SELECT MAX (begin_date) FROM wf_items WHERE item_type = 'xxxxzzzz'
    AND root_activity ='START_REQUESTS'
    AND SUBSTR (item_key, 1, INSTR (item_key, '-') - 1) =p_in_header_id);
    Could someone please help us with this performance issue..we are really stuck because of this
    regards

    First of all Thanks to all gentlemen who replied ..many thanks ...
    Tried the ROW_NUMBER() option but still it is taking time...have given output for the query and tkprof results as well. Even when it doesn't fetch any record ( this is a valid cased because the input header id doesn't have any workflow request submitted & hence no entry in the wf_items table)..then also see the time it has taken.
    Looked at the RANK & DENSE_RANK options which were suggested..but it is still taking time..
    Any further suggestions or ideas as to how this could be resolved..
    SELECT 'Y', 'Y', ITEM_KEY
    FROM
    ( SELECT ITEM_KEY, ROW_NUMBER() OVER(ORDER BY BEGIN_DATE DESC) RN FROM
    WF_ITEMS WHERE ITEM_TYPE = 'xxxxzzzz' AND ROOT_ACTIVITY = 'START_REQUESTS'
    AND SUBSTR(ITEM_KEY,1,INSTR(ITEM_KEY,'-') - 1) = :B1
    ) T WHERE RN <= 1
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 0.00 1.57 0 0 0 0
    Fetch 1 8700.00 544968.73 8180 8185 0 0
    total 2 8700.00 544970.30 8180 8185 0 0
    many thanks

  • Stored procedure call returns null result set when using temp table in sp!

    Here's a really odd problem...
    SQL Server stored procedure called sp_Test takes 1 input INT. Here is the code I call it with
    cStmt = connection.prepareCall("{call sp_Test(?)}");
    cStmt.setInt(1, 44);
    cStmt.execute();
    rs = cStmt.getResultSet();When the body of the stored proc is
    CREATE PROCEDURE sp_Test(@i_NodeID INT)
    AS
    BEGIN
      SELECT node_id FROM tbl_NavTree
    END
    GOthe query works and I get all node_id back in rs
    BUT when the body of the stored proc is
    CREATE PROCEDURE sp_Test(@i_NodeID INT)
    AS
    BEGIN
      CREATE TABLE #Descendants(
        descendant_id INT
      SELECT node_id FROM tbl_NavTree
      DROP TABLE #Descendants
    END
    GOThe rs comes back as NULL. Really really weird if you ask me. I also tried removing the DROP TABLE line just in case the SELECT had to be the last statement but still NULL.
    Final note is that BOTH the above stored proc bodies work when executed within SQL Server query analyser.
    Must be JDBC .. what can it be!??

    DROP TABLE #DescendantsMS SQL Server - right?
    Then don't drop the table.
    From the MS docs for "create table"
    Local temporary tables are visible only in the current session;
    A local temporary table created in a stored procedure is dropped automatically when the stored procedure completes. The table can be referenced by any nested stored procedures executed by the stored procedure that created the table. The table cannot be referenced by the process which called the stored procedure that created the table.

  • Different Ordered Result-Sets With Same Query.

    I am executing a very simple query which returns a name and an id. It is order by name preaty simple.
    BUT. returs different if the framework is english or french.
    <?xml version="1.0" standalone="yes"?>
    <NewDataSet>
    <Table>
    <DATAUNITID>11920</DATAUNITID>
    <NAME>(FR) Atlantis</NAME>
    </Table>
    <Table>
    <DATAUNITID>11922</DATAUNITID>
    <NAME>(FR) Beaumont</NAME>
    </Table>...
    ========================================================
    <?xml version="1.0" standalone="yes"?>
    <NewDataSet>
    <Table>
    <DATAUNITID>12006</DATAUNITID>
    <NAME>AVRANCHES</NAME>
    </Table>
    <Table>
    <DATAUNITID>12005</DATAUNITID>
    <NAME>CARENTAN</NAME>
    </Table>
    Any thoughts?
    Thanks in advance,
    Frank

    Hi Satria,
    You can detach the query in Bex analyser.
    Once you open the workbook, right click context menu,
    has the option to delete the query from work book.
    The query can be reinserted again.
    However a better solution would be to make the format changes in the workbook properties and save the changes.
    Regards,
    Nitin

  • How to return two XML result sets using the function

    Hi Experts,
    Thanks.

    So that I want to return two XML result sets if the query returns more than 50,000 records.
    One XML result set with 50,000 and another XML result set with remaining records.
    How to incorporate this in my function.
    Have the function return a collection of CLOB then.
    DBMS_XMLGEN can handle pagination so it's easy to adapt your existing code.
    Here's an example fetching data in batches of max. 3 rows each, using a pipelined function :
    SQL> create or replace type clob_array is table of clob;
      2  /
    Type created
    SQL>
    SQL> create or replace function genXmlRowset (p_deptno in number) return clob_array pipelined
      2  is
      3    ctx    dbms_xmlgen.ctxHandle;
      4    doc    clob;
      5  begin
      6 
      7    ctx := dbms_xmlgen.newContext('SELECT empno, ename FROM scott.emp WHERE deptno = :1');
      8    dbms_xmlgen.setBindValue(ctx, '1', p_deptno);
      9    dbms_xmlgen.setMaxRows(ctx, 3);
    10 
    11    loop
    12 
    13      doc := dbms_xmlgen.getXML(ctx);
    14      exit when dbms_xmlgen.getNumRowsProcessed(ctx) = 0;
    15      pipe row (doc);
    16 
    17    end loop;
    18 
    19    dbms_xmlgen.closeContext(ctx);
    20 
    21    return;
    22 
    23  end;
    24  /
    Function created
    SQL> set long 5000
    SQL> select * from table(genXmlRowset(30));
    COLUMN_VALUE
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <EMPNO>7499</EMPNO>
      <ENAME>ALLEN</ENAME>
    </ROW>
    <ROW>
      <EMPNO>7521</EMPNO>
      <ENAME>WARD</ENAME>
    </ROW>
    <ROW>
      <EMPNO>7654</EMPNO>
      <ENAME>MARTIN</ENAME>
    </ROW>
    </ROWSET>
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <EMPNO>7698</EMPNO>
      <ENAME>BLAKE</ENAME>
    </ROW>
    <ROW>
      <EMPNO>7844</EMPNO>
      <ENAME>TURNER</ENAME>
    </ROW>
    <ROW>
      <EMPNO>7900</EMPNO>
      <ENAME>JAMES</ENAME>
    </ROW>
    </ROWSET>
    SQL>
    (and don't forget to use bind variables in your query)

  • How should i use the two results sets in one single report data region?

    Hi frnz,
     I have to create a report using the below condition...
    Here my given data  set query gives you the two result sets ,so how should i use that two result sets information in single report....when i accessing that data set query it will take the values off the first result set not for the second result set.
    without using sub report and look up functionality..... if possible
    is there any way to achieve this.....Please let me know..
    Thanks!

    You cant get both resultsets in SSRS. SSRS dataset will only take the first resultset
    you need to either create them as separate queries or merge them into a single resultset and return with ad additional hardcoded field which indicates resultset (ie resultset1,resultset2 etc)
    Then inside SSRS report you can filter on the field to fetch individual resultsets at required places. While merging you need to make sure metadata of two resultsets are made consistent ie number of columns and correcponding column data types should be same.
    In absence of required number of columns just put some placeholders using NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for