Re: [sqlite] how to update the Moving average value

2012-08-11 Thread Keith Medcalf

select id, sales_vol, (select avg(sales_vol) as mavg 
 from tbl b
where b.id between a.id - 3 and a.id)
  from tbl a;

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org


> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of ???
> Sent: Saturday, 11 August, 2012 22:46
> To: sqlite-users@sqlite.org
> Subject: [sqlite] how to update the Moving average value
> 
> I hace many record of product database,and wanna count the moving average
> value of sales_vol of last 3 days(id) of value, how to write sql command?
> 
> id  Sales_vol  mov_avg
> 1 1
> 2 2
> 3 3   =(1+2+3)/3
> 4 5   =(2+3+5)/3
> 5 4   =(3+5+4)/3
> 6 2   =(5+4+2)/3
> 7
> ...
> 
> 
> 
> ___
> 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] how to update the Moving average value

2012-08-11 Thread 叶艳红
I hace many record of product database,and wanna count the moving average
value of sales_vol of last 3 days(id) of value, how to write sql command? 

id  Sales_vol  mov_avg
1 1 
2 2 
3 3   =(1+2+3)/3
4 5   =(2+3+5)/3
5 4   =(3+5+4)/3
6 2   =(5+4+2)/3
7
...



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


[sqlite] Typo on hwaci.com website (cerod.html)

2012-08-11 Thread Philip Newton
Hi there,

http://www.hwaci.com/sw/sqlite/cerod.html contains the sentence " This
utility program (called cerod_build.exe) reads an ordinary,
uncompressed and unencrypted SQLite database built by a public-domain
version of SQLite and constructs and equivalent compressed and
encrypted CEROD database."

The second "and" should be "an": "... and constructs _an_ equivalent ...".

It also goes on to say that "After you purchase a license to use
CEROD, we will be issued a userid and password to the on-line software
configuration management system for CEROD. "

I presume that should either be "you will be issued" or "we will issue
you"; rather than "we will be issued".

And then, "You can then log in and download the latest CEROD source
code and documentation whenever you like. Your license is perpetual,
so your login never expires. You can login as often as you like to
obtain the latest updates. "

It might be good to be consistent about whether the user will "log in"
or "login" between the first and the last of those three sentences.
(In the second sentence, it's a noun, so it can only be the one-word
variant.)

Cheers,
Philip
-- 
Philip Newton 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Make System.Data.SQLite 1.0.81.0 work with .NET 4.0. How?

2012-08-11 Thread Bernd

Am 10.08.2012 19:14, schrieb jean.nkengto...@externe.bnpparibas.com:

Hello,

I bet somebody already managed to make this work. Unhappily I can't access
archives.

Here is my problem:
I'm building a Console Application to load and fill one SQLite DB.
We recently decided to switch the application to framework 4.0, from
framework 3.5.

I've downloaded and deployed dll 1.0.81.0 on my application (added to
project's references) from there:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki.
Now on run, I'm stumbling on this error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime
and cannot be loaded in the 4.0 runtime without additional configuration
information.



To me it looks like the compiler is trying to load the wrong dll, maybe 
from the GAC.

Did you download one of these archives?
- sqlite-netFx40-static-binary-bundle-x64-2010-1.0.81.0.zip
- sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.81.0.zip

Usually I don't use the setup-files as I don't need the Visual Studio 
integration. You should be fine unzipping the system.data.sqlite.dll 
that fits your system and throw it into your bin-folder and you should 
be good to go.



After some copy, replace of dlls, following
http://www.tsjensen.com/blog/post/2011/06/04/SQLite+On+Visual+Studio+2010+Setup+Instructions.aspx
, I still don't get it to work:
Impossible to load metadata resource specified

I saw some threads asking to add "useLegacyV2RuntimeActivationPolicy", but
that doesn't work.
Plus, why should I add this, knowing that version 1.0.81.0 is supposed to
be built in v4.0?


I've never had to mess around with any hacks, nor should you.
If you don't absolutely need the VS-Integration and installed the setup, 
you could try uninstalling it.


Bernd

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


Re: [sqlite] create table question

2012-08-11 Thread Simon Slavin

On 10 Aug 2012, at 9:14pm, u okafor  wrote:

> We are doing a CREATE TABLE query; sqlite3_step() is called in shell.c and 
> along
> the way, sqlite3VdbeExec() is called. sqlite3VdbeExec() call is pased with 
> "p" 
> pointer which contains "aOp" array. Could you please tell us where this "aOp" 
> array 
> is created in the code... 

If you are trying to learn how to use SQLite, do /not/ use the code from the 
SQLite shell tool.  That shell tool does very advanced and tricky things.  
Instead use the documentation on the web site.  The way to use sqlite3_step() 
is described here:



an example of basic library use can be found here:



a basic description of what to do can be found here:



You should only end up calling sqlite3VdbeExec() yourself if you are doing very 
advanced things.

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


[sqlite] create table question

2012-08-11 Thread u okafor
Dear Forum members,
We are doing a CREATE TABLE query; sqlite3_step() is called in shell.c and along
the way, sqlite3VdbeExec() is called. sqlite3VdbeExec() call is pased with "p" 
pointer which contains "aOp" array. Could you please tell us where this "aOp" 
array 
is created in the code... 
Thank you in advance. 
RKKUZO
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Make System.Data.SQLite 1.0.81.0 work with .NET 4.0. How?

2012-08-11 Thread jean . nkengtonye
Hello,

I bet somebody already managed to make this work. Unhappily I can't access 
archives.

Here is my problem:
I'm building a Console Application to load and fill one SQLite DB.
We recently decided to switch the application to framework 4.0, from 
framework 3.5.

I've downloaded and deployed dll 1.0.81.0 on my application (added to 
project's references) from there:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki.
Now on run, I'm stumbling on this error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime 
and cannot be loaded in the 4.0 runtime without additional configuration 
information. 

After some copy, replace of dlls, following 
http://www.tsjensen.com/blog/post/2011/06/04/SQLite+On+Visual+Studio+2010+Setup+Instructions.aspx
, I still don't get it to work:
Impossible to load metadata resource specified

I saw some threads asking to add "useLegacyV2RuntimeActivationPolicy", but 
that doesn't work.
Plus, why should I add this, knowing that version 1.0.81.0 is supposed to 
be built in v4.0?

Could somebody explain and provide instructions to make this work?

Thanks and regards,
Jean

- 


This message and any attachments (the "message") is
intended solely for the intended addressees and is confidential. 
If you receive this message in error,or are not the intended recipient(s), 
please delete it and any copies from your systems and immediately notify
the sender. Any unauthorized view, use that does not comply with its purpose, 
dissemination or disclosure, either whole or partial, is prohibited. Since the 
internet 
cannot guarantee the integrity of this message which may not be reliable, BNP 
PARIBAS 
(and its subsidiaries) shall not be liable for the message if modified, changed 
or falsified. 
Do not print this message unless it is necessary,consider the environment.

--

Ce message et toutes les pieces jointes (ci-apres le "message") 
sont etablis a l'intention exclusive de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur ou s'il ne vous est pas destine,
merci de le detruire ainsi que toute copie de votre systeme et d'en avertir
immediatement l'expediteur. Toute lecture non autorisee, toute utilisation de 
ce message qui n'est pas conforme a sa destination, toute diffusion ou toute 
publication, totale ou partielle, est interdite. L'Internet ne permettant pas 
d'assurer
l'integrite de ce message electronique susceptible d'alteration, BNP Paribas 
(et ses filiales) decline(nt) toute responsabilite au titre de ce message dans 
l'hypothese
ou il aurait ete modifie, deforme ou falsifie. 
N'imprimez ce message que si necessaire, pensez a l'environnement.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Concurrency and sqlite4

2012-08-11 Thread deltagam...@gmx.net

Hello,

will there be some improvement regarding concurrency in the new sqlite4 ?

Sqlite3 fits quite good to my needs, only the concurrency causes some 
problems, so I am eager to know about improvements in this area.


Thx for your efforts

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