S�rgio Oliveira wrote:
> 
> Hello All, 
> 
> I'm using SAPDB 7.4.3 in a Windows machine, accessed by JDBC driver. 
> 
> If I create a table like this: 
> 
> CREATE TABLE test ( 
>     name varchar( 255 )
>     attrib varchar( 255 )
> )
> 
> Suppose that the table is filled with the following data:
> 
> -------------------
> | name   | attrib |
> -------------------
> | N1     |   A1   |
> | N1     |   A1   |
> | N1     |   A2   |
> | N1     |   A2   |
> -------------------
> 
> If I execute the following code
> 
> prepStat = con.prepareStatement( 
>      "SELECT DISTINCT attrib FROM test WHERE name = ? ORDER BY attrib"
> );
> 
> prepStat.setString( 1, "N1" );
> rs = prepStat.executeQuery();
> 
> while( rs.next() )
> { 
>    System.out.println( rs.getString( 1 ) );
> }
> 
> 
> 
> I've got the following erroneous results: 
> A1
> A1
> A2
> A2
> 
> 
> In SAPDB 7.3, with the same code, the code works OK.
> 
> Does anybody have some clue about this? 
> 

We could reproduce that problem only if an index on
attrib, name was created, too.
If this index did not exist, everything was ok.

The bug will be fixed within the next versions.
A workaround may be, not to have an index
which includes all columns which are part of
the select - statement, either in the select_list or
in the where-clause.

Thank you for reporting

Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to