Re: [sqlite] Aggregating Forex data

2011-12-14 Thread Rafael Garcia Leiva
El 13/12/2011 17:44, Igor Tandetnik escribió: On 12/13/2011 11:31 AM, Rafael Garcia Leiva wrote: The problem is that is very slow. It takes nearly 24 hours to query 1 year of Forex data in my laptop (and I have to work with 10 years periods). I will spend a couple of days learning about

[sqlite] lost primary key

2011-12-14 Thread YJM YAN
source table: DDL: "create table xxx_table(id interger primary key autoincrement, field1, field2)" int ret = sqlite3_exec(m_db,"attach './backup.db' as filedb",0,0,NULL); ret = sqlite3_exec(m_db,"begin transaction",0,0,NULL); ret = sqlite3_exec(m_db,"create table filedb.xxx_table as select *

Re: [sqlite] Updating key on related table

2011-12-14 Thread BareFeetWare
On 15/12/2011, at 2:58 PM, Jeff Matthews wrote: > Thanks. You are putting me on track. > > Can you describe the properties, collate, nocase, restrict, etc., The "primary key" constraint automatically assigns a new ID to each Customer and Invoice when you insert a new row that doesn't specify

Re: [sqlite] Updating key on related table

2011-12-14 Thread BareFeetWare
On 15/12/2011, at 2:11 PM, Jeff Matthews wrote: > Customer Table > >ID >Name > > Invoice Table > >CustomerID >InvoiceNumber > > When I create a new invoice record for the selected customer, does > Invoice.CustomerID update with

[sqlite] Updating key on related table

2011-12-14 Thread Jeff Matthews
Customer Table ID Name Invoice Table CustomerID InvoiceNumber When I create a new invoice record for the selected customer, does Invoice.CustomerID update with Customer.ID automatically, or do I need to do this

Re: [sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Igor Tandetnik
On 12/14/2011 9:38 PM, Dilip Ranganathan wrote: Thanks. Along the same lines, I have another question. I have a table like this: timestamp | category | col1 | col2 xxCAT1 35 yyCAT1 56 zzCAT3

Re: [sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Dilip Ranganathan
On Wed, Dec 14, 2011 at 8:35 PM, Igor Tandetnik wrote: > On 12/14/2011 8:21 PM, Dilip Ranganathan wrote: > >> I am not an expert in SQL, so do bear with me if I am asking the obvious. >> >> Given: >> >> timestamp | col1 | col2 >> >> xx

Re: [sqlite] FW: Which version of SQLite?

2011-12-14 Thread Nataraj S Narayan
Hi I am also an ex-clipper. I miss the old 'code blocks' days. I think Ruby comes closest to Clipper with its own code blocks. regards Nataraj On Thu, Dec 15, 2011 at 7:17 AM, Jeff Matthews wrote: > > > I want to use SQLite in a C# app I am developing. > > > > My database

Re: [sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Igor Tandetnik
On 12/14/2011 8:45 PM, Jeff Matthews wrote: Did you get my response? I thought of something that you should try, which is adding a where clause. SELECT timestamp, col1, min(col2) FROM table WHERE col2=min(col2)<- Here GROUP BY col1 ORDER BY min(col2) ASC This would produce an error

Re: [sqlite] Which version of SQLite?

2011-12-14 Thread Simon Slavin
On 15 Dec 2011, at 1:47am, Jeff Matthews wrote: > Select (0) // Provides allocation for a new file handle for opening a > database > > Use Customers // Will open Customers dbf, where in those days, each table > was its own file, and thus, we had multiple dbf files in an app to use >

[sqlite] FW: Which version of SQLite?

2011-12-14 Thread Jeff Matthews
I want to use SQLite in a C# app I am developing. My database knowledge drops off around 1996, when I gave up Clipper programming. I have since learned a little about some of the new methods used by database gurus. But I remember Clipper like it was yesterday since I did so much of it.

Re: [sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Jeff Matthews
Igor, Did you get my response? I thought of something that you should try, which is adding a where clause. SELECT timestamp, col1, min(col2) FROM table WHERE col2=min(col2) <- Here GROUP BY col1 ORDER BY min(col2) ASC This is why I am thinking you should use the where clause: The

Re: [sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Igor Tandetnik
On 12/14/2011 8:21 PM, Dilip Ranganathan wrote: I am not an expert in SQL, so do bear with me if I am asking the obvious. Given: timestamp | col1 | col2 xxabc 5 yyabc 4 zzdef 7 rrdef 6 SELECT

Re: [sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Jeff Matthews
SELECT timestamp, col1, min(col2) FROM table GROUP BY col1 ORDER BY min(col2) ASC The min() is just giving you the smallest value. It is not moving your record pointer to the corresponding timestamp. You will have to do that by yourself or specify better what the purpose of your logic is.

[sqlite] Returning other columns of an aggregate result

2011-12-14 Thread Dilip Ranganathan
I am not an expert in SQL, so do bear with me if I am asking the obvious. Given: timestamp | col1 | col2 xxabc 5 yyabc 4 zzdef 7 rrdef 6 SELECT timestamp, col1, min(col2) FROM table GROUP BY

Re: [sqlite] SQLite with Vis. Studio C# Entity Framework 4.1

2011-12-14 Thread Don V Nielsen
While I love working with C# and Sqlite, I'm quite an amateur at it even though I'm doing some sophisticated programming for my employer. And even less at exploiting the capabilities of Visual Studio in helping me. Below is a very typical routine for me. I use string.Format a lot to assemble

Re: [sqlite] Pointer alignment bug on sparc64

2011-12-14 Thread Richard Hipp
On Wed, Dec 14, 2011 at 2:59 AM, Tod McQuillin wrote: > Hi all, > > I've found what appears to be a bug in SQLite 3.7.9 (as found in the > DBD::SQLite perl module version 1.35). > Already fixed. http://www.sqlite.org/src/info/54cc119811 > > Running the tests included with

Re: [sqlite] Is CEROD support offered for Android?

2011-12-14 Thread Richard Hipp
On Tue, Dec 13, 2011 at 1:58 PM, steven harris wrote: > Just curious... > CEROD works fine on Android. Note, however, that to use any SQLite other than the one that comes built into Android, you have to make arrangements to do your own Java bindings. The standard Java

[sqlite] Pointer alignment bug on sparc64

2011-12-14 Thread Tod McQuillin
Hi all, I've found what appears to be a bug in SQLite 3.7.9 (as found in the DBD::SQLite perl module version 1.35). Running the tests included with DBD::SQLite, I saw test failures and perl crashing with a bus error while creating an index. Running the failing test under dbx, I observed

[sqlite] Is CEROD support offered for Android?

2011-12-14 Thread steven harris
Just curious... Thanks! Steve ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Database usage across processes

2011-12-14 Thread Richard Hipp
On Wed, Dec 14, 2011 at 6:02 AM, Sreekumar TP wrote: > Hi, > > If I share a database across two process , both have sqlite threading mode > to serialized, do I still need to serialize the access to the database ? > No. SQLite does that automatically using file locking.

[sqlite] Database usage across processes

2011-12-14 Thread Sreekumar TP
Hi, If I share a database across two process , both have sqlite threading mode to serialized, do I still need to serialize the access to the database ? -Sreekumar ___ sqlite-users mailing list sqlite-users@sqlite.org