[sqlite] SQLITE_OPEN_FULLMUTEX confusion

2013-06-05 Thread Dilip Ranganathan
I think I may have misunderstood something in a major way with regards to the subject. I have an application that maintains a single application-wide connection which is opened with SQLITE_OPEN_FULLMUTEX flag. So if I have a method that inserts multiple rows into a db, does that method need an app

[sqlite] SQLLite issue - Database full on Solaris

2012-03-06 Thread Dilip
a way to find out or how to reproduce this issue? > > Dilip > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Using non-aggregate columns in group by (with anadditional issue)

2012-01-13 Thread Dilip Ranganathan
On Fri, Jan 13, 2012 at 9:10 AM, Igor Tandetnik wrote: > Dilip Ranganathan wrote: > > Suppose among emp1 and emp2, I only want to see the entry with the latest > > timestamp. > > select timestamp, value, person from mytable t1 > where rowid = ( >select rowid from

Re: [sqlite] Using non-aggregate columns in group by (with an additional issue)

2012-01-13 Thread Dilip Ranganathan
On Fri, Jan 13, 2012 at 6:22 AM, Simon Slavin wrote: > > On 13 Jan 2012, at 11:07am, Dilip Ranganathan wrote: > > > I have a table that looks like something like this: > > > >timestampvalue person > >=

[sqlite] Using non-aggregate columns in group by (with an additional issue)

2012-01-13 Thread Dilip Ranganathan
I have a table that looks like something like this: timestampvalue person === 2010-01-12 00:00:00 33 emp1 2010-01-12 11:00:00 22 emp1 2010-01-12 09:00:00 16

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 >>

[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 col

Re: [sqlite] Checking for existence of in-memory tables

2011-11-25 Thread Dilip Ranganathan
in sqlite3_open with empty quotes. Unlike what I said in my original post I'd rather use the temporary DB approach than a pure in-memory solution. On Thu, Nov 24, 2011 at 8:45 AM, Dilip Ranganathan wrote: > Currently I use sqlite to create a bunch of on-disk tables to store my >

[sqlite] Checking for existence of in-memory tables

2011-11-24 Thread Dilip Ranganathan
Currently I use sqlite to create a bunch of on-disk tables to store my data. I use Sqlite's master table to determine if a table already exists based on which I take certain decisions. Suppose I switch these to in-memory tables (:memory:), how do I go about checking if a table exists? Do in-memory

Re: [sqlite] Using modifiers in julianday function

2011-10-24 Thread Dilip Ranganathan
On Mon, Oct 24, 2011 at 11:47 AM, Doug Currie wrote: > > On Oct 24, 2011, at 11:07 AM, Dilip Ranganathan wrote: > > > But as you all know, this doesn't work: > > > > select datetime(time) from table where time >= > > julianday(datetime(max(time)),'-2

[sqlite] Using modifiers in julianday function

2011-10-24 Thread Dilip Ranganathan
Lets say I have a column named 'time' that stores timestamps as juliandays. Suppose I only want to extract rows for the past 2 hours from now, I could do: select datetime(time) from table where time >= julianday('now','-2 hour','localtime') order by time desc That works as expected. However what