Subject Re: [Firebird-Java] STARTING WITH '' (empty String) on an indexed field
Author Jim Starkey
Christian Danner wrote:

> Hello Roman,
>
> the code below as expected returns all rows if no indexes are set.
> With an index on any of the (VARCHAR-)fields in the where clause I get
> an empty ResultSet.
>
> String sql = "select id, name_i, name_l, name_f"
> + " from cust"
> + " where (name_i starting with ?)"
> + " and (name_l starting with ?)"
> + " and (name_f starting with ?)"
> + " order by name_i";
> PreparedStatement smt = con.prepareStatement( sql);
> smt.setString( 1, "");
> smt.setString( 2, "");
> smt.setString( 3, "");
> ResultSet rss = smt.executeQuery();
>
Sounds like an engine bug to me. Submit it.

--

Jim Starkey
Netfrastructure, Inc.
978 526-1376