Re: [sqlite] System.Data.SQLite for Pocket PC & RTREE

2015-02-09 Thread Duncan Hall
OK. Embarassing as it is, I'm going to have to 'fess up here. When I attempted to implement a stopwatch which wasn't available, I discovered that the app was targetting .Net 2. When I rebuilt it targetting 3.5 it worked. Unfortunately the stopwatch tells me that it takes longer than I would like

Re: [sqlite] SQLCipher - Full Database Encryption for SQLite

2015-02-09 Thread justin
On 2015-02-09 10:34, Simon Slavin wrote: SQLCipher is an open source extension to SQLite that provides transparent 256-bit AES encryption of database files. It comes as free source for you to compile yourself, or you can buy pre-built binary libraries for

Re: [sqlite] Repost: Having problems with Entity Framework code first db creation

2015-02-09 Thread Joe Mistachkin
Walter Williams wrote: > > Nothing changed after installing it. > What steps in the IDE are you taking to get to that point? Have these steps worked in the past? I'm asking these questions because I'm not completely sure that the System.Data.SQLite provider supports the various "code first"

Re: [sqlite] Repost: Having problems with Entity Framework code first db creation

2015-02-09 Thread Walter Williams
Nothing changed after installing it. Walter Williams Senior Software Engineer Sawtooth Software, Inc. "Do, or do not. There is no try." -Original Message- From:

Re: [sqlite] System.Data.SQLite for Pocket PC & RTREE

2015-02-09 Thread Joe Mistachkin
Duncan Hall wrote: > > I'm not using the Spatialite extension for the query, only the indexes > created by it on the desktop which I think is a pretty standard SQLite > RTree. At least it works that way on the desktop. > So, on the target device, only the System.Data.SQLite binaries are being

Re: [sqlite] Repost: Having problems with Entity Framework code first db creation

2015-02-09 Thread Joe Mistachkin
Walter Williams wrote: > > I am still getting the same error. > Do you have the following package installed? https://www.microsoft.com/en-us/download/details.aspx?id=40762 Whether or not the above is required for Visual Studio 2013 is unclear; however, I don't think it can hurt to try

Re: [sqlite] SQLCipher - Full Database Encryption for SQLite

2015-02-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/09/2015 02:54 AM, Dominique Devienne wrote: > Adding PRAGMAs is not possible to a true SQLite "extension" I > thought, It is however possible to add functions. eg encryption_mode could be added and called like this: select

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Doug Currie
Thank you, Richard. It works for me now. e On Mon, Feb 9, 2015 at 1:30 PM, Richard Hipp wrote: > On 2/7/15, Doug Currie wrote: > > In response to this SO question: > > > > >

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Richard Hipp
On 2/7/15, Doug Currie wrote: > In response to this SO question: > > http://stackoverflow.com/questions/28377210/how-to-retrieve-rank-based-on-total-mark-in-sqlite-table > > I tried to formulate a query without temp tables using an ordinary CTE, but > received an error

Re: [sqlite] Repost: Having problems with Entity Framework code first db creation

2015-02-09 Thread Walter Williams
I am still getting the same error. Walter Williams Senior Software Engineer Sawtooth Software, Inc. "Do, or do not. There is no try." -Original Message- From:

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Doug Currie
For those interested in the initial "misuse of aggregate" issue of this thread, there is now a ticket: http://www.sqlite.org/src/tktview?name=2f7170d73b e On Mon, Feb 9, 2015 at 9:19 AM, Keith Medcalf wrote: > > Not exactly since aggregates are implemented as functions.

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Keith Medcalf
Not exactly since aggregates are implemented as functions. In the case of sum(a + b + c) you have the overhead of one aggregate setup call, one call per row (after the three additions are done) and one finalizer call to retrieve the aggregate and release the context. In the case of sum(a) +

Re: [sqlite] SQL Help

2015-02-09 Thread Stephen Chrzanowski
Maybe with a query or two extra, you can determine a temp table, then build on that. Do an initial distinct look up on the primary fields you want as the fields in your temp table and create it, then do the required queries to get the raw data into the temp table, then do the finalized query to

Re: [sqlite] SQL Help

2015-02-09 Thread John McKown
This looks interesting: http://search.cpan.org/~bduggan/SQLite-VirtualTable-Pivot-0.02/lib/SQLite/VirtualTable/Pivot.pm it is a bit old - 2009 . Other SQL dialects have this either built in or via an "extension". If you're doing this in a program, I would likely just to two SELECT statements. The

Re: [sqlite] SQL Help

2015-02-09 Thread Igor Tandetnik
On 2/9/2015 7:55 AM, R.Smith wrote: Which of course works fine if you have a predeterminable set of columns to extract, such as Months in the above case. How can I do this sort of thing (i'm only interested in similar results, the method is not important) for an indetermintate set of columns?

[sqlite] SQL Help

2015-02-09 Thread R.Smith
I used to make Pivot-table-like reports in (what I thought was) the normal way: SELECT ProductID, sum(QtyMade) AS TotQty, (sum(CASE Mth WHEN 1 THEN QtyMade ELSE 0 END)) AS 'Jan Qty' ,(sum(CASE Mth WHEN 2 THEN QtyMade ELSE 0 END)) AS 'Feb Qty' ,(sum(CASE Mth WHEN 3 THEN

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread R.Smith
On 2/8/2015 10:23 PM, James K. Lowden wrote: I have a couple of efficiency questions for those who know: 1. Is the left-join on a CTE apt to be more effecient than the version that uses a correlated subquery in the SELECT clause? I'm guessing it matters in some DBs but from testing it

Re: [sqlite] SQLCipher - Full Database Encryption for SQLite

2015-02-09 Thread Dominique Devienne
On Mon, Feb 9, 2015 at 11:34 AM, Simon Slavin wrote: > SQLCipher is an open source extension to SQLite that provides transparent > 256-bit AES encryption of database files. [...] > > The API extends SQLite by adding PRAGMAs and C functions to configure the > encryption. >

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-09 Thread Dominique Devienne
On Mon, Feb 9, 2015 at 6:12 AM, James K. Lowden wrote: > > If not, would it be possible too much effort ? > > I'm guessing the answer is No because the prerequisites are missing. > [DD] And that's the crux of it. SQLite has virtual tables, and as such can approximate

[sqlite] SQLCipher - Full Database Encryption for SQLite

2015-02-09 Thread Simon Slavin
SQLCipher is an open source extension to SQLite that provides transparent 256-bit AES encryption of database files. It comes as free source for you to compile yourself, or you can buy pre-built binary libraries for numerous platforms, with support. The

Re: [sqlite] Multi-thread mode question

2015-02-09 Thread Dan Kennedy
On 02/09/2015 02:18 PM, Hick Gunter wrote: In serialized mode, SQLite will acquire the mutex when it detects you are "starting to use" the database handle (somewhere between entering sqlite3_prepare and the first sqlite3_step) and then HANG ON TO IT, NOT LETTING GO until the calling thread is

Re: [sqlite] ordinary CTE containing sum()

2015-02-09 Thread Clemens Ladisch
James K. Lowden wrote: > 1. Last I checked, SELECT in a column position in the SELECT clause as > in > > select foo (select ...) > > is not permitted by the SQL standard. This example indeed is not valid SQL syntax. However, SELECT in a column position is allowed: select (select 42);