Re: [sqlite] OSX path

2011-06-17 Thread john darnell
Thanks for your kind words, Simon. As for myself, I really do strive for civility, though I don't always get there. I'll keep working at it if you promise to be patient with me. As for "top-posting," In the corporate culture I come from, it is considered the only way to do things (or at

Re: [sqlite] OSX path

2011-06-17 Thread Simon Slavin
On 17 Jun 2011, at 11:50pm, john darnell wrote: > Say what you will about Adobe and InDesign, but their tools for writing > Apple, ah, supplemental code, are not insubstantial or trivial. IMHO, it is > understandable when that is my major environment for writing code that I > might not

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
Um, what's top-posting? And of course I always strive to be wise. Simon (or for that matter, the rest of the list), if you thought I was being a wiseass, then again, my apologies. R, John > -Original Message- > From: sqlite-users-boun...@sqlite.org

Re: [sqlite] OSX path

2011-06-17 Thread Warren Young
On 6/17/2011 4:50 PM, john darnell wrote: > > I am essentially a Windows programmer Is that also your excuse for top-posting? :) > I will have to take your > word on the use of HFS-style paths vs posix/Unix style paths on Mac > platforms. That would be wise, because Simon is correct. > I will

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
Simon: First of all, let me apologize for my whine. We all have our bumps in the road and if we don't then we're probably not doing our jobs (as one venerable Navy Chief once pointed out to a hapless, naïve ensign many years ago). I should have just shut up and moved on. I am

Re: [sqlite] select (partly) url-encoded strings?

2011-06-17 Thread Sven Utcke
Hello Igor Tandetnik, > On 6/17/2011 6:11 PM, Sven Utcke wrote: > > Actually, the above would be awfully slow (as it can not use the > > index). It might be better to use an intermediate table (but of > > course still filled using urldecode()), what is the recommended > > way to create such a

Re: [sqlite] select (partly) url-encoded strings?

2011-06-17 Thread Igor Tandetnik
On 6/17/2011 6:11 PM, Sven Utcke wrote: > Actually, the above would be awfully slow (as it can not use the > index). It might be better to use an intermediate table (but of > course still filled using urldecode()), what is the recommended way to > create such a table in sqlite3 (and have it

Re: [sqlite] OSX path

2011-06-17 Thread Simon Slavin
On 17 Jun 2011, at 10:09pm, john darnell wrote: > I checked two references and neither one of them mentioned this teensy > little requirement. I guess they must've thought it wasn't important. The use of colons for file paths is purely an old-fashioned Mac thing and never worked

Re: [sqlite] Help with CASE WHEN

2011-06-17 Thread Nico Williams
On Fri, Jun 17, 2011 at 5:05 PM, Mr. Puneet Kishor wrote: > The above is not SQL. You can't have a SQL statement begin with CASE. SQL > statements can only begin with either SELECT or UPDATE or CREATE or DELETE or > ALTER, etc. CASE is an expression, and has to be a

Re: [sqlite] select (partly) url-encoded strings?

2011-06-17 Thread Sven Utcke
Hello Igor, > On 6/17/2011 5:36 PM, Sven Utcke wrote: > > I might see a name > > like "image 1 (modified%20(2)).jpg". Since I can not forsee which > > parts might have been encoded and which not, I therefore need to write > > something like: > > > >SELECT * FROM table WHERE

Re: [sqlite] Help with CASE WHEN

2011-06-17 Thread Mr. Puneet Kishor
On Jun 17, 2011, at 4:56 PM, jose isaias cabrera wrote: > CASE (SELECT round(sum(Xtra8),2) FROM LSOpenJobs > WHERE subProjID = 9144 AND lang = 'ES-LA' > AND PSubClass != 'Portal-Fee') > > WHEN < 5000 THEN >UPDATE LSOpenJobs SET ProjFund = (SELECT

Re: [sqlite] select (partly) url-encoded strings?

2011-06-17 Thread Igor Tandetnik
On 6/17/2011 5:36 PM, Sven Utcke wrote: >I might see a name > like "image 1 (modified%20(2)).jpg". Since I can not forsee which > parts might have been encoded and which not, I therefore need to write > something like: > >SELECT * FROM table WHERE urldecode(table.name)='some file name'; > >

[sqlite] Help with CASE WHEN

2011-06-17 Thread jose isaias cabrera
Greetings. I have used CASE before, but for simple codes and it works. However, I am trying to break down some calculations and it-s not working. I am getting, ...> ...> END; Error: near "CASE": syntax error sqlite> COMMIT TRANSACTION; Error: cannot commit - no transaction is active

[sqlite] select (partly) url-encoded strings?

2011-06-17 Thread Sven Utcke
Hi, let me introduce myself first: I'm new to this list (but not SQL), using sqlite3 mostly in order to write exporters from my face-recognition tool to some photo management software (F-Spot and Digikam, currently), but also some convenience functions (mostly for F-Spot). And that's actually

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
Thanks Doug. I appreciate you pointing this out to me. I checked two references and neither one of them mentioned this teensy little requirement. I guess they must've thought it wasn't important. R, John > -Original Message- > From: sqlite-users-boun...@sqlite.org

Re: [sqlite] OSX path

2011-06-17 Thread Doug Currie
On Jun 17, 2011, at 2:56 PM, john darnell wrote: > I am attempting to open an SQLite database on the Mac (OSX Snow Leopard) and > am getting an error. This is the code I am using: > > char DBEnginePath[1000]; > > strcpy(DBEnginePath, "Macintosh HD:Applications:Adobe InDesign >

Re: [sqlite] Opening a database on a Mac

2011-06-17 Thread john darnell
Thanks Pavel. That worked. R, John > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Pavel Ivanov > Sent: Friday, June 17, 2011 2:23 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Opening a

Re: [sqlite] Opening a database on a Mac

2011-06-17 Thread Pavel Ivanov
>   strcpy(DBEnginePath, "Macintosh HD:Applications:Adobe InDesign > CS5:Plug-Ins:WPC_ID:IndexData.db"); Try to change path here to "/Applications/Adobe InDesign CS5/Plug-Ins/WPC_ID/IndexData.db". Pavel On Fri, Jun 17, 2011 at 3:08 PM, john darnell wrote: > Sorry

[sqlite] (no subject)

2011-06-17 Thread john darnell
I am attempting to open an SQLite database on the Mac (OSX Snow Leopard) and am getting an error. This is the code I am using: char DBEnginePath[1000]; strcpy(DBEnginePath, "Macintosh HD:Applications:Adobe InDesign CS5:Plug-Ins:WPC_ID:IndexData.db"); fprintf(stderr, "%s\n",

[sqlite] Opening a database on a Mac

2011-06-17 Thread john darnell
Sorry to send this twice, but I realized that my first transmission did not include a subject line. _ From: john darnell Sent: Friday, June 17, 2011 1:56 PM To: 'General Discussion of SQLite Database' Subject: I am attempting to open an SQLite

Re: [sqlite] Is there a difference between DELETE and UPDATE/INSERT in terms of syncing to disk?

2011-06-17 Thread Kevin Yoo
Simon, Thank you for your response. The callback function is called when Django's table object's delete method is called, and not by sqlite's DELETE command. I do not know what callback functionality is provided by sqlite, but I don't believe it is being used in this case. We have solved

[sqlite] 2nd Call For Papers, 18th Annual Tcl/Tk Conference 2011

2011-06-17 Thread Andreas Kupries
[[ Important Changes: The Conference Registration Page is live. Regarding special events we are looking into arranging a trip to the Air and Space Museum out near Dulles. This is currently a very tentative thing. If a local person would like to help with this please talk to

Re: [sqlite] [sqlite-dev] Is there an option to not lock during transaction?

2011-06-17 Thread Pavel Ivanov
> Doesn't enabling WAL mode address the transaction size limit? Yes, you are right. WAL mode will eliminate transaction size issue, although there will be a WAL-file size issue. ;) But that issue is only about disk space, nothing related to locking of reading transactions. Pavel On Fri, Jun

[sqlite] System.Data.SQLite ADO.NET cannot open databases in WAL mode

2011-06-17 Thread Sougato Das
It seems that the current .NET wrapper for SQLite, which does not use the very latest version of SQLite, cannot access SQLite databases in WAL mode. Does anyone know a workaround for this, or any other way to access SQLite databases in WAL mode via .NET? Or do I basically have to wait for the

Re: [sqlite] need help with a query using datetime

2011-06-17 Thread Igor Tandetnik
Black, Michael (IS) wrote: > sqlite> create table t(d date); > sqlite> insert into t values('2011-12-31 09:00'); > sqlite> insert into t values('2011-12-31 12:15'); > sqlite> select d,substr(datetime(d,'-12 hours'),1,16) from t; > 2011-12-31 09:00|2011-12-30 21:00 >

Re: [sqlite] need help with a query using datetime

2011-06-17 Thread Ruth Ivimey-Cook
On 17/06/2011 12:10, looki wrote: > First column holds the givin datetime from my table and the second column > should show the datetime from first row but 12 hours before. for example: > > '2011-12-31 09:00' '2011-12-30 21:00' > '2011-12-31 12:15' '2011-12-30 00:15' > ... > > looks simple but

Re: [sqlite] need help with a query using datetime

2011-06-17 Thread Black, Michael (IS)
sqlite> create table t(d date); sqlite> insert into t values('2011-12-31 09:00'); sqlite> insert into t values('2011-12-31 12:15'); sqlite> select d,substr(datetime(d,'-12 hours'),1,16) from t; 2011-12-31 09:00|2011-12-30 21:00 2011-12-31 12:15|2011-12-31 00:15 Michael D. Black Senior

[sqlite] need help with a query using datetime

2011-06-17 Thread looki
Hi, i have a table which holds dates like '2011-12-31 09:00' and i now want to write a query which gives me 2 columns. First column holds the givin datetime from my table and the second column should show the datetime from first row but 12 hours before. for example: '2011-12-31 09:00'