[Kexi] LIMIT 1 in Select Clause

Sharan Rao sharanrao at gmail.com
Wed Dec 12 23:26:33 CET 2007


On Tuesday 04 Dec 2007 7:17:42 pm Jarosław Staniek wrote:
> Sharan Rao said the following, On 2007-12-01 21:17:
> >  I was facing problems with the function Connection::querySingleString()
> > in Sybase, as the " LIMIT " clause is not supported.
>

Hmm, new thing I noticed in the Limit 1 clause. ( I should have noticed it 
before, but I tested the clause only in commandline tsql , and not Kexi, 
before committing :( ),

Sybase gives a warning ( in Sybase Central ) if I execute a query of the type
 "Select Top 1 fooColumn from fooTable where fooClause"

Warning: "The result returned is non-deterministic"
Of course, that's because there's no specific ordering specified. Now, 
unfortunately, this is returned as an error in freetds/dblib !!

Now, we do have a columnNumber being passed to Connection::querySingleString() 
as a param, but would an "Order by " clause on that column be right in the
case if there are multiple rows ? I guess querySingleString() is not intended 
to be used where multiple row/multiple column results are returned :) ( as 
the documentation suggests )

Any hints ?

Cheers!
 Sharan Rao










More information about the Kexi mailing list