Re: [sqlite] Accessing SQLite from PHP5?

2010-05-20 Thread Gilles Ganault
On Wed, 19 May 2010 20:50:01 -0400, "J. King" wrote: >FYI, PHP 5.3 provides an SQLite3 module which >offers a version of SQLite more up-to-date than that exposed by PDO. >Whereas PDO is an abstracted interface, though, SQLite3 appears to be a >slightly more direct m

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 13:18:49 +0100, Bart Smissaert wrote: >Quite simple that. Basically: range > variant array > loop through >array and write to SQLite. >Let me know and I will post some example code. If you have some basic code to go through Excel or OO sheets to gather data and somehow stick t

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 15:04:35 +0100 (BST), Swithun Crowe wrote: >You don't get the exception message because the exec method doesn't throw >an exception. It puzzled me for a bit. Right, it doesn't raise an exception :-/ I had to look at /var/log/lighttpd/error.log. Thank you. __

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 15:57:37 +0200, Michal Seliga wrote: >I think this is not really sqlite related, i am using fastcgi with nginx >server and when security became in issue i had similar problems >quick solution - do 'chmod -R 777 /srv/www' and you will see if problem >is related to rights or if

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 14:30:06 +0100 (BST), Swithun Crowe wrote: >If you use PDO, then you get access to Sqlite 3.x databases: > >http://www.php.net/manual/en/ref.pdo-sqlite.php Thanks for the input. After following the following article, I successfully installed Lighttpd in FastCGI mode + PHP5 and

[sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
Hello I'd like to use SQLite from some PHP5 scripts, either on Linux or Linux. What is the right way to set things up so that I can use a recent release of SQLite (apparently, the SQLite that comes with PHP by default is a 2.x release)? Thank you. ___

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 11:48:06 +0100, Bart Smissaert wrote: >You can run SQL on sheet ranges. >Just need to make sure that the workbook is saved and closed as there is a bug >to do with ADO causing a memory leak. Thanks for the tip. I'll investigate in-place querying in Excel and OO Calc, and if it

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Mon, 17 May 2010 22:55:47 -0700, Matt Young wrote: >I have that problem. A solution is an ultra lite SQLite window to >play along side existing spread sheet packages. Then just get read and >write to the spreadsheet happening. Right. There a millions of users who have stuffed data in Excel be

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Mon, 17 May 2010 20:31:07 +0200, Henk Pretorius wrote: >Try SQLite Manager - a FireFox add on, but can also run stand-alone as >a XUL application. Thanks, I'll see if it can show data entry forms so non-technies can handle their database safely. http://code.google.com/p/sqlite-manager/ _

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Gilles Ganault
On Mon, 17 May 2010 18:59:36 +0200, "Olaf Schmidt" wrote: >I'd say, what you're looking for (in case a "softer" migration >of Excel-VBA-Devs is planned) is more a library IMO - >and not an "Application". Thanks, I'll check it out. Ideally, I was looking for a tool that would read data entry forms

[sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Gilles Ganault
Hello I was wondering: To help people move from Excel to a DB to handle data, I'd like to show them a really good Windows application that will enable them to create/read/update/delete records, and should present users with forms to handle records (not tables, as this is too abstract for users).

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-05 Thread Gilles Ganault
On Mon, 3 May 2010 08:57:04 -0400, Reid Thompson wrote: >http://code.google.com/p/mongoose/ Right, I got Lua and SQLite working as a CGI call. The alternative is to use the Lua-based Xavante web server and include SQLite; I'll try to get this working tomorrow. Thank you.

Re: [sqlite] Accessing SQLite from Lua?

2010-05-05 Thread Gilles Ganault
On Wed, 05 May 2010 13:32:24 +0200, Gilles Ganault wrote: >I'd like to know how to use this from a Lua script. For Lua newbies like me who'd like to access an SQLite database through the LuaSql interface, here's how to do it: 1. In the directory where the Lua interpreter is

[sqlite] Accessing SQLite from Lua?

2010-05-05 Thread Gilles Ganault
Hello >From what I've been reading this morning, it appears that Lua offers two ways to access an SQLite database: - through the database-neutral Lua API LuaSQL - by calling the SQLite-specific luasqlite I have no preference, and would like to find the Windows binaries that I could just copy to t

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-04 Thread Gilles Ganault
On Mon, 3 May 2010 00:39:37 +0400, Alexey Pechnikov wrote: >it's easy for TCL developers. You may build tclsqlite+tclhttpd+your >tcl scripts as starpack (single executable binary). For integrate >SQLite database into starpack use this extension: >http://www.siftsoft.com/tclsqlitevfs.html Thanks.

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Mon, 03 May 2010 15:22:27 +0200, Michael Schlenker wrote: >You could take the Tcl WUB webserver, which already implements a SQLQ >domain from an sqlite DB and use that. Easy to wrap in single file too. > >See http://code.google.com/p/wub/source/browse/trunk/Domains/SqlQ.tcl Thanks for the link

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Sun, 02 May 2010 21:26:27 +0200, Gilles Ganault wrote: >It's probably quite an easy thing to do for someone well versed in C, >but I haven't seen a project that would combine a web server and >SQLite into a single EXE. Here's a diagram: http://img222.i

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Mon, 3 May 2010 14:47:48 +0200, Sylvain Pointeau wrote: >if you speak about MySQL or POSTGRESQL >then you mean database server, not a web server. Yes. Please read the thread, starting with my original post where I explain the idea. ___ sqlite-users

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Mon, 3 May 2010 14:41:10 +0200, Sylvain Pointeau wrote: >How do you authenticate to your http sqlite web server? >is it not a security issue then? SQLite is meant for local use, so people interested in an SQLite server would operate on a small LAN, protected from the Net by a firewall. If aut

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Mon, 3 May 2010 15:01:26 +0400, Alexey Pechnikov wrote: >See http://wiki.tcl.tk/15722 Add SQLite into it - about few minuts of time. Thanks. If no one is interested in launching a project that would offer a single binary and maintain it, I'll try TCL-TK. _

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Mon, 3 May 2010 11:24:49 +0100, Simon Slavin wrote: >If you're going to mostly pass data for use with web applications then JSON is >possibly a more appropriate format Thanks, I'll check it out. >The problem is not in coding it -- that's relatively easy. The problem is in >who would use it

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-03 Thread Gilles Ganault
On Sun, 2 May 2010 20:31:15 +0100, Simon Slavin wrote: >How are you seeing this ? You send your SQL queries via HTTP and it answers >by replying with XML ? XML or TAB-separated text. Using regexes, it's easy to parse data, unless someone knows of a better way. Besides, if there are a lot of SEL

[sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-02 Thread Gilles Ganault
Hello, It's probably quite an easy thing to do for someone well versed in C, but I haven't seen a project that would combine a web server and SQLite into a single EXE. Besides ease of deployment, this would offer a cross-platform solution that wouldn't require developing a specific client-side co

[sqlite] [newbie/VB.Net + SQLite] Reliable file hashing?

2010-03-05 Thread Gilles Ganault
Hello, I'm having the following issue while looping through a directory: for each file, I need to hash its content, check if this file is already in an DB, add a record if it isn't. The goal of this application is to check a whole drive for UltraEdit temp files, check for duplicates, and s

Re: [sqlite] [VB.Net] Working with SQLite?

2010-02-24 Thread Gilles Ganault
On Wed, 24 Feb 2010 13:31:52 -, "Nick Shaw" wrote: >Ah ok, in that case a 3rd party interface would probably be quickest for >you. :) Thanks. For those interested, using the above open-source wrapper, here's how to 1) create a new SQLite database file, 2) create a new table if it doesn't exis

Re: [sqlite] [VB.Net] Working with SQLite?

2010-02-24 Thread Gilles Ganault
On Wed, 24 Feb 2010 13:17:23 -, "Nick Shaw" wrote: >You could just import the required DLL functions from sqlite3.dll? Not >very object-oriented, I admit - you'd need to write your own class >wrapper around the functions if you wanted that - but I'd think that >importing the functions was the

[sqlite] [VB.Net] Working with SQLite?

2010-02-24 Thread Gilles Ganault
Hello I'm only getting started with VB.Net, and I need a way to work with an SQLite 3 database. According to the wiki, the following solutions seem to be currently supported: = System.Data.SQLite http://sqlite.phxsoftware.com/ Devart dotConnect for SQLite www.devart.com/dotconnect/s

Re: [sqlite] SQLite server for Windows/Linux?

2009-10-30 Thread Gilles Ganault
On Mon, 26 Oct 2009 15:10:05 -0400, Reid Thompson wrote: >may be of interest >http://sqlrelay.sourceforge.net/ Thanks for the link. Unfortunately, it doesn't seem to support Windows yet. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sq

Re: [sqlite] SQLite on a Windows Network

2009-10-30 Thread Gilles Ganault
On Fri, 30 Oct 2009 01:47:33 -0400, mark m wrote: >I have heard problems with SQLite and NFS but I have no idea if a standard >Windows shared drive uses NFS or not. Am I o.k. to use SQLite??? http://www.sqlite.org/cvstrac/wiki?p=SqliteNetwork ___ sqli

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-30 Thread Gilles Ganault
On Mon, 26 Oct 2009 15:07:38 -0400, Sam Carleton wrote: >There is a WONDERFUL Firefox plug-in that I use, I love it! I am guessing >it works on all OS's but I use it on Windows Vista and Windows 7. Thanks. I assume it's the SQLite Manager plug-in: http://code.google.com/p/sqlite-manager/ _

Re: [sqlite] SQLite server for Windows/Linux?

2009-10-26 Thread Gilles Ganault
On Sun, 25 Oct 2009 02:57:52 -0700 (PDT), George Black wrote: >did you try www.SQLitening.com David Morris just sent a pointer above. Thanks much for the info. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-26 Thread Gilles Ganault
On Mon, 26 Oct 2009 11:31:50 +0500, "SQL Maestro Group" wrote: >SQLite Maestro allows you to copy query results to clipboard with ease: just >execute a query and press Ctrl+A, Ctrl+C. Thanks, I'll check it out. ___ sqlite-users mailing list sqlite-user

Re: [sqlite] SQLite server for Windows/Linux?

2009-10-26 Thread Gilles Ganault
On Sat, 24 Oct 2009 17:37:31 -0700 (PDT), David Morris wrote: >Have a peek at : http://www.sqlitening.com/support/index.php >Different language and could run under Wine on *nix Thanks for the pointer. I didn't know SQLitening. ___ sqlite-users mailing

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-24 Thread Gilles Ganault
On Sat, 24 Oct 2009 16:28:21 +0200, Gilles Ganault wrote: >>You could also try http://www.gaia-gis.it/spatialite/ > >Ah, good one :-) It succesfully SELECTed all the rows, and let me copy >them into the clipboard in a fraction of a second. Thanks a lot. I'll take that ba

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-24 Thread Gilles Ganault
On Fri, 23 Oct 2009 18:13:27 +0200, "Roger Andersson" wrote: >Never had any access violation but regarding number of records >Options -> Fetch Size -> 0 >And then like said by Donald, right click and Copy Result Set To Clipboard Thanks for the tip, but after SELECTing 100.000 rows, right-clickin

Re: [sqlite] SQLite server for Windows/Linux?

2009-10-24 Thread Gilles Ganault
On Sat, 24 Oct 2009 00:38:20 +0200, "Olaf Schmidt" wrote: >Hmm in this case, what about: >http://www.realsoftware.com/realsqlserver/ Thanks much for the tip :) I'll give it a shot. >So, on what platform(s) do your client-apps need to work? >In what (main)language do you develop your client-app?

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-24 Thread Gilles Ganault
On Fri, 23 Oct 2009 09:55:17 -0700, Alex Mandel wrote: >There's a reason why a lot of them don't display more than 100-1000 >records per view. Yup. The Firefox-based SQLiteManager couldn't handle the 100.000 rows I SELECTed :-/ >You could also try http://www.gaia-gis.it/spatialite/ Ah, good on

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 10:19:17 -0400, "Griggs, Donald" wrote: >I'm grateful to Mike Cariotoglou for Sqlite3Explorer > http://www.singular.gr/sqlite/ Unless I overlooked it, it won't let me copy all the rows into the clipboard (tried CTRL-A, also tried selecting the first and the last row follow

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 12:11:52 +0100, "O'Neill, Owen" wrote: >I'm pretty sure QT is statically linked against it on the windows >versions. I'll check it out, although I'd rather something actively supported. ___ sqlite-users mailing list sqlite-users@sq

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 22:36:16 +1100, Neville Franks wrote: >The best I have found is SQLite Expert http://www.sqliteexpert.com/ >The Personal version is free. And I have checked out many. Thanks for the pointer. The Free version doesn't allow copying more than 100 rows into the clipboard, so I'll

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 12:56:59 +0200, Arjen Markus wrote: >How about SQLIteStudio? http://sqlitestudio.one.pl/index.rvt Thanks for the link. It seems unable to return all the rows, and only displays them by 1.000, so I can't just select the whole thing and copy it into the clipboard :-/ __

Re: [sqlite] SQLite server for Windows/Linux?

2009-10-23 Thread Gilles Ganault
Thanks for the links On Fri, 23 Oct 2009 08:48:53 -0400, "Griggs, Donald" wrote: >I know almost nothing about them, but the following may possibly be of >interest: > >http://sqlrelay.sourceforge.net/ This one looks quite a bit big for my needs :-/ >http://www.it77.de/sqlite/sqlite.htm "28.05.

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 11:13:05 +0100, "O'Neill, Owen" wrote: >http://sqlitebrowser.sourceforge.net/screenshots.html Thanks for the pointer. "Version 1.2 released - 04/05/2005" "SQLite Database Browser requires Trolltech's QT" I'll give it a shot but if I find something more recent and dependence-

Re: [sqlite] SQLite server for Windows/Linux?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 03:25:45 -0700, Roger Binns wrote: >The problem is that the moment you have a network accessible service you >have to deal with administration. Things like authentication, security, >log files etc. In the absolute, yes, but not if SQLite is to be used in a firewalled LAN just

Re: [sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
On Fri, 23 Oct 2009 12:00:47 +0200, Thibaut Gheysen wrote: >You can use sqlite-manager (http://code.google.com/p/sqlite-manager/). Thanks for the tip, but I'd rather a stand-alone rather than a Firefox plug-in. ___ sqlite-users mailing list sqlite-use

[sqlite] SQLite server for Windows/Linux?

2009-10-23 Thread Gilles Ganault
Hello I know that SQLite is meant as a server-less, file server-based solution, but... since Richard Hipp has also written a single-EXE SCM solution (www.fossil-scm.org), I wanted to check if someone had recently written a similar solution so that SQLite can be used as a light, no-brainer DB serve

[sqlite] [Windows] Good GUI alternative to sqlite.exe?

2009-10-23 Thread Gilles Ganault
Hello I'm looking for a Windows alternative to the CLI sqlite.exe to manage SQLite databases. SQLiteSpy (www.yunqa.de) is OK, but unless I missed the option, it won't let me copy the output of a SELECT into the clipboard so I can paste it elsewhere. Are there better alternatives? Thank you. __

Re: [sqlite] [Delphi] Reading list of tables?

2009-08-26 Thread Gilles Ganault
On Thu, 13 Aug 2009 09:10:11 -0500, Fred Williams wrote: >That's all you are suppose to get when querying the Master table for table >names. > >You ask how to get a list of tables. That is what you got. Thanks. I only needed to get the list of tables in an SQLite database file, and Simon's tip w

Re: [sqlite] Fixed size for auto-incremented primary key?

2009-08-26 Thread Gilles Ganault
On Sat, 8 Aug 2009 12:59:53 +0100, Simon Slavin wrote: >Not to start from zero that way. But you can create a record yourself >which has a barcode of > >11 > >to force the number of digits, and from then SQLite will count up from >that one. (Test this first, I haven't tried exactly t

[sqlite] Rows where people connected in the past 2 weeks?

2009-08-18 Thread Gilles Ganault
Hello I thought this query would work to read a date column that holds the DD-MM- date when the user last logged on, and check how many of them logged on in the past two weeks for the last time: SELECT COUNT(id) FROM members WHERE (julianday('now') - julianday(dateconnection)) < 15; This is

Re: [sqlite] Functions to convert dates with non-English month name?

2009-08-17 Thread Gilles Ganault
On Mon, 17 Aug 2009 07:44:15 -0400, "Igor Tandetnik" wrote: >update membres set dateinscription= >substr(dateinscription, -4) || '-' || >(case substr(dateinscription, 4, length(dateinscription) - 8) > when 'January' then '01' when 'February' then '02' ... > when 'December' then '12

Re: [sqlite] [Duplicates] How to keep only one row?

2009-08-17 Thread Gilles Ganault
On Mon, 17 Aug 2009 13:05:53 +0200, Martin Engelschalk wrote: >If you are looking for a delete - command, then you have to decide which >of the duplicate rows you want to keep. Are they all the same even in >the other fields? > >Perhaps you want to do something like > >delete from members where

[sqlite] Functions to convert dates with non-English month name?

2009-08-17 Thread Gilles Ganault
Hello, Before I go ahead and write a script to loop through all the rows, I was wondering if SQLite supports functions to convert DD MM into the MySQL-friendly -MM-DD, and whether those functions are localized so that it understands month names in languages other than English? Here's an

[sqlite] [Duplicates] How to keep only one row?

2009-08-17 Thread Gilles Ganault
Hello I have a table that has a lot of duplicates in the Name column. I'd like to only keep one row for each. The following lists the duplicates, but I don't know how to delete the duplicates and just keep one: SELECT name FROM members GROUP BY name HAVING COUNT(*) > 1; Thank you.

Re: [sqlite] [Delphi] Reading list of tables?

2009-08-13 Thread Gilles Ganault
On Tue, 11 Aug 2009 11:35:16 +0100, Simon Slavin wrote: >SELECT sql FROM sqlite_master WHERE type='table' Thanks Simon. To get only the name of the tables instead of the SQL command that was used to create them: SELECT tbl_name FROM sqlite_master WHERE type="table"'; __

[sqlite] [Delphi] Reading list of tables?

2009-08-11 Thread Gilles Ganault
Hello I'd like to fill a ComboBox widget with the list of tables in a database file, using the free Aducom wrapper. Would someone have some code handy on how to extract this information from a SQLite database, ie. the equivalent for the CLI command ".tables". Thank you.

[sqlite] Fixed size for auto-incremented primary key?

2009-08-08 Thread Gilles Ganault
Hello I'd like to use also use items' ID number as barcodes, so I'd like to set the size to eg. 10 so that I don't end up with really tiny barcodes for the first hundred's of articles. Is it possible to have auto-incremented primary keys be a fixed size, eg. 01, 02, etc.?

Re: [sqlite] [Columns] Keeping internal + beautified names?

2009-07-14 Thread Gilles Ganault
On Sat, 11 Jul 2009 09:38:27 -0700, Jim Dodgen wrote: >I would just use: > >SELECT id AS Identification FROM foobar Thanks. This is what I already use for displaying the results, but then I'm stuck when I need to perform INSERT/UPDATES because I need to get the actual columns names :-/ It'd be c

Re: [sqlite] Reading year from YYYY-MM-DD column?

2009-07-14 Thread Gilles Ganault
On Tue, 30 Jun 2009 07:54:13 -0500, P Kishor wrote: >sqlite> SELECT strftime('%Y', '1999-12-03') AS year; Thanks guys. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] [Columns] Keeping internal + beautified names?

2009-07-11 Thread Gilles Ganault
Hello Apart from using a table for this very purpose, is there a way to keep internal names and beautified names for a table's column names? Internal name = for the SQL queries, eg. "id" Beautified name = as column name in a grid object, eg. "Identification" Thank you. _

[sqlite] Reading year from YYYY-MM-DD column?

2009-06-30 Thread Gilles Ganault
Hello I read http://www.sqlite.org/lang_datefunc.html, but I still don't know how to extract the year from a table where a column has dates formatted as -MM-DD. Currently, I use this, but I'm sure there's a better way: == //Find all invoices sent in 2009 SELECT * FROM invoices,ph

[sqlite] Tips to access SQLite with multiple clients?

2009-06-21 Thread Gilles Ganault
Hello I know that SQLite is not meant to be used by more than one simultaneous client, but I don't know of another SQL server that is so light, easy to use, and available for Linux and Windows. If you know of such a beast, I'm interested. Otherwise... I'm willing to take the risk of using

Re: [sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread Gilles Ganault
On Fri, 13 Mar 2009 09:52:25 -0400, "Igor Tandetnik" wrote: (snip) Thank you Igor for the help. Before I give it a shot, I need to speciy those requirements: 1. The tables live in two SQLite database files, so I must open both in the same client session 2. Each table may contain one or more recor

[sqlite] Merging two SQLites + leaving out duplicates?

2009-03-13 Thread Gilles Ganault
Hello I have two SQLites databases that I need to merge. Some companies are found in both, so I'd like to only keep one record when this occurs. What would be the right way to do this? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org h

Re: [sqlite] Listing top 10 companies through COUNT?

2008-11-23 Thread Gilles Ganault
On Sun, 23 Nov 2008 16:40:11 +0800, "Eugene Wee" <[EMAIL PROTECTED]> wrote: >Oops, and as for top 10, a LIMIT 10 clause may suffice, e.g., >SELECT code, COUNT(code) AS code_count FROM companies GROUP BY code ORDER BY >code_count DESC LIMIT 10; > >However, if you wish to show the next 10, then the n

[sqlite] Listing top 10 companies through COUNT?

2008-11-23 Thread Gilles Ganault
Hello I tried a few things, but I still can't find how to do this: The Companies table contains one row for each company; each row has a Code field that indicates the type of activity this company is into. I'd like to count how many companies belong to each activity, and display the top t

Re: [sqlite] Comparing a field between two databases?

2008-11-17 Thread Gilles Ganault
On Mon, 17 Nov 2008 10:39:17 +0100, Gilles Ganault <[EMAIL PROTECTED]> wrote: >.attach db1.sqlite >.attach db2.sqlite Correction: attach "db1.sqlite" as db1 attach "db2.sqlite" as db2 ___ sqlite-users mailing l

Re: [sqlite] Comparing a field between two databases?

2008-11-17 Thread Gilles Ganault
On Sun, 16 Nov 2008 18:28:50 +0900, "Alexandre Courbot" <[EMAIL PROTECTED]> wrote: >attach is probably what you want: Thanks. For those interested, here's how to load two database files into the sqlite3.exe CLI, and retrieve rows that have a common "code" value in two tables: C:\> sqlite3.exe .a

Re: [sqlite] [UnicodeEncodeError] Don't know what else to try

2008-11-16 Thread Gilles Ganault
On Fri, 14 Nov 2008 10:59:23 +0100, Michael Schlenker <[EMAIL PROTECTED]> wrote: >A tool like chardet helps: >http://chardet.feedparser.org/ Thanks for the link. Turns out some data were Unicode, while others were 1252. ___ sqlite-users mailing list sql

[sqlite] Comparing a field between two databases?

2008-11-16 Thread Gilles Ganault
Hello I have two SQLite files, each with the exact same structure. I need to check the value in a field in both tables, and check if it's identical. Is there a way to use sqlite3.exe to open two databases, and perform a SELECT to compare the value of a field in the databases? Thank you. ___

Re: [sqlite] [UnicodeEncodeError] Don't know what else to try

2008-11-14 Thread Gilles Ganault
Oops, wrong newsgroup. Please ignore. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] [UnicodeEncodeError] Don't know what else to try

2008-11-14 Thread Gilles Ganault
Hello Data that I download from the web seems to be using different code pages at times, and Python doesn't like this. Google returned a way to handle this, but I'm still getting an error: print output.decode('utf-8') File "C:\Python25\lib\encodings\utf_8.py", line 16, in decode

Re: [sqlite] Counting rows in one table, and comparing COUNT with column in other table?

2008-11-14 Thread Gilles Ganault
On Tue, 11 Nov 2008 07:30:21 -0500, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >> SELECT code.number,COUNT(companies.code) FROM code,companies WHERE >> code.id=companies.code >> > >Add "GROUP BY code.id" One more thing: I'd like to only retrieve rows where code.number and COUNT(companies

Re: [sqlite] Counting rows in one table, and comparing COUNT with column in other table?

2008-11-11 Thread Gilles Ganault
On Tue, 11 Nov 2008 07:30:21 -0500, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >Add "GROUP BY code.id" Way to do. Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Finding rows not in second table?

2008-11-11 Thread Gilles Ganault
On Sat, 8 Nov 2008 12:33:28 +0700, Dan <[EMAIL PROTECTED]> wrote: >That is a subjective statement. It could be true if there are a >lot more rows in table 'Companies' than there are in 'Code' and there >is no index on Companies. There are indeed a lot more rows in COMPANIES than in CODE, since COD

[sqlite] Counting rows in one table, and comparing COUNT with column in other table?

2008-11-11 Thread Gilles Ganault
Hello This is a newbie question. I could successfully retrieve the results by sending two queries and extracting data with Python, but I was wondering if I could perform the same action in one SQLite query. Here's an example of data in the CODE and COMPANIES tables: CODE table id=1 numb

Re: [sqlite] Finding rows not in second table?

2008-11-07 Thread Gilles Ganault
On Fri, 7 Nov 2008 12:18:35 -0500, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >select code.id from code >where code.id not in (select code from companies); Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/

[sqlite] Finding rows not in second table?

2008-11-07 Thread Gilles Ganault
Hello, This must be something very simple for experienced SQL/SQLite users, but I don't know how to write this query: I have two tables ("code" and "companies", with code.id being used as foreign key as companies.code). I'd like to fetch all the rows in "code" that don't exist in "companies": SE

[sqlite] Rewriting contents of a column?

2008-10-28 Thread Gilles Ganault
Hello I have a list of books in an SQLite database. I'd like to rewrite the Price column so that: 1. When it says "US$ 1.12", turn this into "$ 1.12" 2. When it says nothing, the currency is actually in Euros, and rewrite this as "€10,19". Can SQLite do this, or should I write a script to perform

[sqlite] Formatting to "Sentence case"?

2008-10-24 Thread Gilles Ganault
Hello A column holds book titles which are all in capital letters ("MY BOOK TITLE"), and I'd like to reformat them as "My book title". Is there a function in SQLite that does this, or should I use some external language to do this? Thank you. ___ sqli

Re: [sqlite] visual basic and sqlite

2008-10-09 Thread Gilles Ganault
On Thu, 9 Oct 2008 18:05:25 +0800, "Raziedahanin KASIM" <[EMAIL PROTECTED]> wrote: >I want to develop a simple application using VB 6.0 and sqlite Where should >i start? www.sqlite.org/cvstrac/wiki?p=SqliteWrappers ___ sqlite-users mailing list sqlite-u

[sqlite] Exporting to MySQL?

2008-10-08 Thread Gilles Ganault
Hello I'm no MySQL expert, and am having some syntax errors when trying to export data from SQLite 3 into MySQL 5. Before I dive into MySQL's documentation, does someone know how I should rewrite this type of SQL to keep MySQL happy? BEGIN TRANSACTION; CREATE TABLE dummy (id TEXT PRIMARY KEY NOT

Re: [sqlite] [Index] Listing 6001 after 601 and not after 801?

2008-10-06 Thread Gilles Ganault
On Sun, 5 Oct 2008 08:52:21 -0600, "Dennis Cote" <[EMAIL PROTECTED]> wrote: >It sounds like you want the account numbers to be sorted as text rather than >numerically, so cast the values to text in the order by clause. > > ... order by cast(account_number as text) ... Thanks guys. An easier solut

[sqlite] [Index] Listing 6001 after 601 and not after 801?

2008-10-05 Thread Gilles Ganault
Hello This is for an accounting program: As an exemple, all accounts starting with 6 must be listed together, which means that eg. 6001 must come after 601, and not after, say, 801. Is there a trick in SQL that lets me do this? ORDER BY ASC won't do this. Thank you.

Re: [sqlite] Empty column: Set to NULL or leave empty?

2008-09-12 Thread Gilles Ganault
On Thu, 11 Sep 2008 07:31:48 -0500, "Jay A. Kreibich" <[EMAIL PROTECTED]> wrote: > A NULL assignment is SQL's way of representing an undefined/unknown > value. This is a bit different than the way many popular scripting > languages use an "undef" value or the way that C/C++ uses NULL. Thanks g

[sqlite] Empty column: Set to NULL or leave empty?

2008-09-11 Thread Gilles Ganault
Hello I didn't pay attention to this until recently, when someone advised me to never set empty columns to NULL. So I guess a NULL is different from a column that was never set to anything when creating the record? Here's an example: == //Leave col2 empty instead of NULL $sql = "INSE

Re: [sqlite] Creating recurrent appointments?

2008-09-01 Thread Gilles Ganault
On Mon, 01 Sep 2008 15:44:05 +0300, Mihai Limbasan <[EMAIL PROTECTED]> wrote: >You will need to loop through this. Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Creating recurrent appointments?

2008-09-01 Thread Gilles Ganault
Hello I need to write an application to manage appointments. Most of them are recurrent, with no end-date, while others are one-shots, and the user must be able to schedule reccurent appointments but be able to tweak some of them if need be. To investigate whether I need to bother keeping

Re: [sqlite] [Delphi] ANSI characters turned into Unicode?

2008-08-13 Thread Gilles Ganault
On Wed, 13 Aug 2008 14:24:25 -0400, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >This does look like UTF-8 encoded string - misinterpreted to be in >Latin-1 codepage. Indeed, the wrapper uses UTF8 by default. Setting it to Standard solved the issue. Thanks. __

[sqlite] [Delphi] ANSI characters turned into Unicode?

2008-08-13 Thread Gilles Ganault
Hello Using Aducom's free wrapper for Delphi, when using accents in a field, they're turned into (I assume) Unicode: déjà vu, caché, voilà -> déjà vu, caché, voilà ! To be able to tell if it's the wrapper or SQLite itself, is there a function I should call when using accented characters, or

Re: [sqlite] Case-insensitive Glob?

2008-06-21 Thread Gilles Ganault
On Fri, 20 Jun 2008 12:59:56 +0100, "Simon Davies" <[EMAIL PROTECTED]> wrote: >'like' is case-insensitive. Thanks, that solved the problem. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-user

[sqlite] Case-insensitive Glob?

2008-06-20 Thread Gilles Ganault
Hello Is there a way for glob to be case-insensitive? I'd like to retrieve all rows where the city name can be a mix of upper- and lower-case letters, eg. select * from customers where city glob "*ville*"; would match "ville" or "Ville". Thank you. _

Re: [sqlite] SQLite3 to SQLite2?

2008-06-17 Thread Gilles Ganault
On Mon, 16 Jun 2008 18:32:12 -0600, "David Baird" <[EMAIL PROTECTED]> wrote: >echo .dump | sqlite3 input.db | sqlite output.db Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-us

[sqlite] SQLite3 to SQLite2?

2008-06-16 Thread Gilles Ganault
Hello We have an application that can only read SQLite2 databases. Is there an easy way to convert a SQLite3 database file into the SQLite2 format? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/

[sqlite] How to import CSV data if strings NULL?

2008-06-15 Thread Gilles Ganault
Hello It's probably trivial but I'm having a difficult time using Python to import a tab-delimited file into SQLite because some columns might be empty, so the INSERT string should contain NULL instead of "NULL". Does someone have working code handy that can parse through each line, check

Re: [sqlite] [newbie] SQLite + VB.Net 2005?

2008-04-10 Thread Gilles Ganault
On Mon, 07 Apr 2008 05:08:46 +0200, Gilles Ganault <[EMAIL PROTECTED]> wrote: >Would someone have a step-by-step procedure on how to get from a >working VisualStudio 2005 to a working SQLite access? For those interested, http://sqlite.phxsoftware.com seems to work in VS2005 Pro:

[sqlite] [newbie] SQLite + VB.Net 2005?

2008-04-06 Thread Gilles Ganault
Hello I just started learning VB.Net with "The Book of Visual Basic 2005", and would like to use SQLite, but I don't know where to start, as the wrappers I found usually only have C# samples, and assume the reader knows how to install those wrappers... which I dont, yet :-/ Would someone have a s

Re: [sqlite] [PHP] Compiling with latest SQLite?

2008-03-30 Thread Gilles Ganault
On Thu, 27 Mar 2008 09:55:18 -, "Brandon, Nicholas (UK)" <[EMAIL PROTECTED]> wrote: >That's fine for windows, unfortunately the same facility is not >available in the unix world. ... and I'd like to run this on FreeBSD :-) >I compiled a PDO module using 3.5.4 (I think) using the source code f

[sqlite] [PHP5] Direct access to SQLite faster than through PDO+APC?

2008-03-30 Thread Gilles Ganault
Hello I wanted to check performance in PHP through caching tools like APC or MemCacheD compared to direct access trough PDO_SQLite, and it seems like APC is actually five times slower than accessing an SQLite database directly: === # ab -kc 10 -t 30 http://localhost/test_apc.php Perc

[sqlite] [PHP] Compiling with latest SQLite?

2008-03-26 Thread Gilles Ganault
Hello I noticed that the PDO::SQLite driver that comes with PHP 5.2.5 is 3.3.17, while the non-OOP version is 2.8.17. Does someone know how to recompile PHP with the latest SQLite source? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.or

<    1   2   3   >