2012/4/12, Richard Hipp <d...@sqlite.org>:

> On Thu, Apr 12, 2012 at 2:06 PM, Zbigniew <zbigniew2...@gmail.com> wrote:
>
>> At the attempt to get a non-existing value, for example:
>>
>> set x [dbcomm eval {SELECT max(somecolumn) FROM sometable}]
>>
>
> The correct way to do this would be one or other other of the following:
>
>    set x [lindex [dbcomm eval {SELECT max(somecolumn) FROM sometable}]
>
>    set x [dbcomm onecolumn eval {SELECT max(somecolumn) FROM sometable}]
>
> In the second example, it is traditional to abbreviate "onecolumn" to
> simply "one".

Thanks, "onecolumn" work for me. Do you mean, that "eval" will always
return a list, although my SELECT clause wants just single value?
-- 
regards,
Zbigniew
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to