I am thinking about writing some Android applications. I would like to
share data between the phone (or tablet) and de desktop. What is the best
way to do this? In a way that would also be convenient for other people.
--
Cecil Westerhof
___
sqlite-users
I have the following query:
SELECT *
,abs(random()) / (250 * 1000 * 1000 * 1000 * 1000 * 1000) + 1 AS
randomiser
FROM stock
ORDER BY randomiser + julianday("Last Used")
LIMIT
I prefer to use something I never used or long ago. That is why I use the
random. Randomiser gives a valu
Try 250E15. Just 1 constant instead of 6 constants and 5 multiplication
operations (for each and every row).
-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im
Auftrag von Cecil Westerhof
Gesendet: Dienstag, 05. September 2017 13:49
An: S
Have a std_call compiled dll (sqlite3 3.20.1) that works perfectly fine on
a Win 7 machine.
On 2 different Win 10 machines I get a crash though when using the dll.
This happens already when I run sqlite3_initialize. When I omit that step
it will crash on the next first call to the dll, which is sql
2017-09-05 13:55 GMT+02:00 Hick Gunter :
> Try 250E15. Just 1 constant instead of 6 constants and 5 multiplication
> operations (for each and every row).
>
Strange: I thought I did something like that, but maybe I did something
wrong.
Is quit a while back, so I do not know what I did exactly.
I
From https://sqlite.org/lang_expr.html
" If a numeric literal has a decimal point or an exponentiation clause or if
its magnitude is less than -9223372036854775808 or greater than
9223372036854775807, then it is a floating point literal."
-Ursprüngliche Nachricht-
Von: sqlite-users [mai
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
*/
SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int
*pnLog, int *pnCkpt){
The comment should be
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART or
TRUNCATE.
__
The docs are a little unclear =>
https://sqlite.org/pragma.html#pragma_journal_size_limit
I need to disable autocheckpoint@close (for other reasons) so I'm looking for
ways to fence the -wal file. If I want to bound a database's -wal file to <=1MB
when I'm not in a transaction is it just PRAGMA
It is not very important, but I am just curious. I need to know how many
records are not yet used. I do that with:
SELECT COUNT(*) - COUNT("Last Used") AS "Not Used"
FROM teaInStock
Is that the correct way, or is there a better way?
--
Cecil Westerhof
__
Untested (Obviously as I don't have your schema)
select max(WheverYourIDFieldIs)-count(WhateverYourIDFieldIs) as "Not Used"
from teaInStock group by WhateverYouIDFieldIs
On Tue, Sep 5, 2017 at 3:45 PM, Cecil Westerhof
wrote:
> It is not very important, but I am just curious. I need to know how
On 9/5/2017 3:45 PM, Cecil Westerhof wrote:
It is not very important, but I am just curious. I need to know how many
records are not yet used. I do that with:
SELECT COUNT(*) - COUNT("Last Used") AS "Not Used"
FROM teaInStock
Is that the correct way, or is there a better way?
Why not be expl
On behalf of Cecil, the fault in that logic is that count(*) returns the
number of rows in that table, not whether there is a hole "somewhere: Your
query will either return 1, or, 0.
On Tue, Sep 5, 2017 at 3:55 PM, Igor Tandetnik wrote:
> On 9/5/2017 3:45 PM, Cecil Westerhof wrote:
>
>> It is
On 9/5/2017 4:00 PM, Stephen Chrzanowski wrote:
select count(*) from teaInStock where "Last Used" IS NULL;
On behalf of Cecil, the fault in that logic is that count(*) returns the
number of rows in that table, not whether there is a hole "somewhere: Your
query will either return 1, or, 0.
Wh
2017-09-05 21:55 GMT+02:00 Igor Tandetnik :
> On 9/5/2017 3:45 PM, Cecil Westerhof wrote:
>
>> It is not very important, but I am just curious. I need to know how many
>> records are not yet used. I do that with:
>> SELECT COUNT(*) - COUNT("Last Used") AS "Not Used"
>> FROM teaInStock
>>
>> Is t
As I understand the requirements, he wants to find out how many entries
(Not which entries) don't exist between the first ID (Assumed 1) and max ID
value. So if he's got 3 rows, but max ID is 5, the result should be 2.
But I also suspect you're better in tune with the requirements, since I
suspec
On 2017/09/05 10:00 PM, Stephen Chrzanowski wrote:
On behalf of Cecil, the fault in that logic is that count(*) returns the
number of rows in that table, not whether there is a hole "somewhere: Your
query will either return 1, or, 0.
Perhaps this is the opportune moment to learn. Test the theo
On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski
wrote:
> On behalf of Cecil, the fault in that logic is that count(*) returns the
> number of rows in that table, not whether there is a hole "somewhere: Your
> query will either return 1, or, 0.
>
>
I either don't understand you, or I am doin
On 9/5/2017 4:05 PM, Igor Tandetnik wrote:
On 9/5/2017 4:00 PM, Stephen Chrzanowski wrote:
select count(*) from teaInStock where "Last Used" IS NULL;
On behalf of Cecil, the fault in that logic is that count(*) returns the
number of rows in that table, not whether there is a hole "somewhere:
I want to know the number of teas I have in stock. For this I use:
SELECT COUNT(Tea)
FROM teaInStock
Tea cannot be NULL, so this is the same as:
SELECT COUNT(*)
FROM teaInStock
But I find the first more clear.
I almost always see the second variant. Is this because it is more
efficient, or a
2017-09-05 22:09 GMT+02:00 Igor Tandetnik :
> It's possible I misunderstand what it is the OP is trying to do. But in
> any case, the query I show is equivalent to the query the OP has shown
> (which, apparently, does what they want), except formulated in a less
> roundabout way.
Yes, your quer
On 2017/09/05 10:21 PM, Cecil Westerhof wrote:
I want to know the number of teas I have in stock. For this I use:
SELECT COUNT(Tea)
FROM teaInStock
Tea cannot be NULL, so this is the same as:
SELECT COUNT(*)
FROM teaInStock
But I find the first more clear.
I almost always see the second va
On Tue, Sep 5, 2017 at 3:21 PM, Cecil Westerhof
wrote:
> I want to know the number of teas I have in stock. For this I use:
> SELECT COUNT(Tea)
> FROM teaInStock
>
> Tea cannot be NULL, so this is the same as:
> SELECT COUNT(*)
> FROM teaInStock
>
> But I find the first more clear.
> I almos
On 2017/09/05 10:13 PM, John McKown wrote:
On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski
wrote:
On behalf of Cecil, the fault in that logic is that count(*) returns the
number of rows in that table, not whether there is a hole "somewhere: Your
query will either return 1, or, 0.
I
On 5 Sep 2017, at 9:21pm, Cecil Westerhof wrote:
> I want to know the number of teas I have in stock. For this I use:
> SELECT COUNT(Tea)
> FROM teaInStock
>
> Tea cannot be NULL, so this is the same as:
> SELECT COUNT(*)
> FROM teaInStock
>
> But I find the first more clear.
> I almost
2017-09-05 22:46 GMT+02:00 R Smith :
>
>
> On 2017/09/05 10:13 PM, John McKown wrote:
>
>> On Tue, Sep 5, 2017 at 3:00 PM, Stephen Chrzanowski
>> wrote:
>>
>> On behalf of Cecil, the fault in that logic is that count(*) returns the
>>> number of rows in that table, not whether there is a hole "so
2017-09-05 23:11 GMT+02:00 Simon Slavin :
>
>
> On 5 Sep 2017, at 9:21pm, Cecil Westerhof wrote:
>
> > I want to know the number of teas I have in stock. For this I use:
> > SELECT COUNT(Tea)
> > FROM teaInStock
> >
> > Tea cannot be NULL, so this is the same as:
> > SELECT COUNT(*)
> > FROM
I agarre. 😁
Mensaje original De: R Smith Fecha:
5/9/17 4:11 PM (GMT-05:00) A: sqlite-users@mailinglists.sqlite.org Asunto:
Re: [sqlite] Getting number of rows with NULL
On 2017/09/05 10:00 PM, Stephen Chrzanowski wrote:
> On behalf of Cecil, the fault in that logic is that c
Count() needs to extract the field from the record, tallying only
those that are NOT NULL.
Count(*) returns the total number of records in the table, with no need to
extract a specific field.
When looking into efficiency, try using the .explain/explain feature.
asql> explain select count(a) f
Cecil Westerhof wrote:
> I am thinking about writing some Android applications. I would like to
> share data between the phone (or tablet) and de desktop. What is the best
> way to do this? In a way that would also be convenient for other people.
There is no good way to go over the USB connection
On Wed, Sep 6, 2017 at 7:56 AM, Hick Gunter wrote:
> Count() needs to extract the field from the record, tallying
> only those that are NOT NULL.
>
Technically it would not need to "extract" the field, only lookup
the row header and
see whether that field/column is NULL or not (since NULL is a
30 matches
Mail list logo