Re: [sqlite] MIN() for a timedelta?

2012-07-26 Thread Keith Medcalf
You could also store the timedelta as a float seconds as well. Then you wouldn't have to worry about inconsistent string formatting ... --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org > -Original Message- > From: sqlite-users-boun...@sqlite.org

Re: [sqlite] MIN() for a timedelta?

2012-07-26 Thread Keith Medcalf
Select min(substr('0' || duration, -15)) from durations; --- () 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 C M > Sent: Thursday, 26 July, 2012

Re: [sqlite] MIN() for a timedelta?

2012-07-26 Thread Igor Tandetnik
On 7/26/2012 5:32 PM, C M wrote: I have string representations of a Python timedelta stored in an SQLite database of the form H:MM:SS:ss (the last is microseconds). Here are a possible examples of such timedeltas: '0:00:06.229000' '9:00:00.00' '10:01:23:041000' I want to select the

Re: [sqlite] MIN() for a timedelta?

2012-07-26 Thread Simon Slavin
On 27 Jul 2012, at 12:04am, C M wrote: > On Thu, Jul 26, 2012 at 6:45 PM, Nico Williams wrote: >> >> >> Just use CASE to add the missing zero as necessary, something like this: >> >> SELECT strftime('%s', (SELECT CASE WHEN '9:12:32' LIKE '0%' THEN

Re: [sqlite] MIN() for a timedelta?

2012-07-26 Thread C M
On Thu, Jul 26, 2012 at 6:45 PM, Nico Williams wrote: > On Thu, Jul 26, 2012 at 4:32 PM, C M wrote: >> I could zero pad these strings myself, so that '9:00:00.00' >> becomes '09:00:00.00', but that would break other uses of these >> values in my

Re: [sqlite] C++ - Evaluating a statement

2012-07-26 Thread Nico Williams
On Thu, Jul 26, 2012 at 4:32 PM, Arbol One wrote: > Reading the documentation, it says that 'sqlite3_step(sqlite3_stmt*) > > ' must be called at least once to evaluate the statement. However, what does > it evaluate? The prepared statement. Prepared statements are really a

Re: [sqlite] MIN() for a timedelta?

2012-07-26 Thread Nico Williams
On Thu, Jul 26, 2012 at 4:32 PM, C M wrote: > I could zero pad these strings myself, so that '9:00:00.00' > becomes '09:00:00.00', but that would break other uses of these > values in my code and was wondering if there were a way in SQlite to > "see" these values as

[sqlite] MIN() for a timedelta?

2012-07-26 Thread C M
I have string representations of a Python timedelta stored in an SQLite database of the form H:MM:SS:ss (the last is microseconds). Here are a possible examples of such timedeltas: '0:00:06.229000' '9:00:00.00' '10:01:23:041000' I want to select the shortest duration (the smallest

[sqlite] C++ - Evaluating a statement

2012-07-26 Thread Arbol One
Reading the documentation, it says that 'sqlite3_step(sqlite3_stmt*) ' must be called at least once to evaluate the statement. However, what does it evaluate? Freedom of speech does not translate to freedom of insulting ___ sqlite-users

Re: [sqlite] svn: SQLite compiled for 3.6.20, but running with 3.6.4

2012-07-26 Thread Stephan Beal
On Thu, Jul 26, 2012 at 6:38 PM, Tilsley, Jerry M. wrote: > Anyone know how I can get rid of the 3.6.20 compilation so that the system > will quit complaining? This is on a RedHat 6.2 system. > You can use ldd to find where the extra lib is, and then simply mv/rename it

[sqlite] svn: SQLite compiled for 3.6.20, but running with 3.6.4

2012-07-26 Thread Tilsley, Jerry M.
All, Anyone know how I can get rid of the 3.6.20 compilation so that the system will quit complaining? This is on a RedHat 6.2 system. Thanks, Jerry Tilsley Sr Systems Analyst St. Claire Regional Medical Center Disclaimer This email is confidential and

Re: [sqlite] Testing the ODBC link

2012-07-26 Thread Maury Markowitz
Just following up: The problem getting the "catalog name" was a minor one - the ODBC link for SQLite only supported early versions of the ODBC call for doing this. When I reverted to an earlier-model API call, poof, it worked. And it kept working for all the other DB's I tried too. So we're

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-26 Thread Bernhard Mogens Ege
Ah, so it does! I obviously misread your previous suggestion that was spot on. And now it certainly works, memory db with shared cache in System.Data.SQLite. :) Thank you for your help. :) -- Bernhard -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Handling concurrent read request to SQLite

2012-07-26 Thread Simon Slavin
On 26 Jul 2012, at 6:29am, "Navaneeth.K.N" wrote: > Recently, I implemented a web version of my program which internally uses > the shared library. There will be REST URLs exposed for the "learn" API > call, something like "http://websitename.com/learn; with the word to