If x is numeric length(x) returns the length of x expressed as a string. 
So the value of length(10000 ) is 5, not 2.

-Scott

sqlite-users-boun...@sqlite.org wrote on 11/03/2010 06:35:52 PM:

> Couldn't you do something like:
> 
> select length(FieldName) from TableName where Condition=True
> 
> ?
> 
> The result would be the size.  Otherwise, the only thing I can think of 
is
> just doing a select to get the results you want, then just keep a 
running
> tally on what would need to be transmitted, then do your packet math.
> 
> On Wed, Nov 3, 2010 at 6:24 PM, Scott A Mintz 
<sami...@ra.rockwell.com>wrote:
> 
> > Is it possible to construct a query that will tell me the total size 
in
> > bytes of the result set?  Specifically, in a messaging protocol that
> > returns data we need to fragment the reply and it would be nice to 
know
> > how much data or how many packets will be required to send the 
response.
> >
> > Thanks,
> > Scott
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to