Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Simon Slavin
On 13 Nov 2009, at 9:11pm, Kees Nuyt wrote: > SELECT rowid AS rowid, col1, col2 > FROM foo; > rowid|col1|col2 > 1|1|row1 > 2|2|row2 Heh. Neat. Also you can do things like SELECT col1 AS rowid, col1, col2 Simon. ___ sqlite-users mailing list

Re: [sqlite] Disk activity on Linux

2009-11-13 Thread Walter Dnes
On Thu, Nov 12, 2009 at 11:24:58AM -0600, Bret Patterson wrote > We're seeing a lot more disk activity than expected on Linux when > using sqlite3. We've run this same series of test on windows and > the disk IO is much lower, which is the opposite of what I really > expected. Below is my scenario

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread P Kishor
On Fri, Nov 13, 2009 at 3:11 PM, Kees Nuyt wrote: > On Fri, 13 Nov 2009 15:07:54 +0100, Marco Bambini > wrote: > >> sqlite 3.6.19 >> >> CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT); >> >> SELECT rowid, col1, col2 >> >> returns the following column

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Kees Nuyt
On Fri, 13 Nov 2009 15:07:54 +0100, Marco Bambini wrote: > sqlite 3.6.19 > > CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT); > > SELECT rowid, col1, col2 > > returns the following column names with sqlite3_column_name: > col1, col1, col2 > > Is there a way to force the

Re: [sqlite] Output in currency format

2009-11-13 Thread Simon Slavin
On 13 Nov 2009, at 4:40pm, Peter Haworth wrote: > That often give rise to some rounding issues. I do all the math using > however many decimal places are given to me and then round the total > to two decimal places, then calculate how much is owed to each band > member based on that

Re: [sqlite] Maintenance Tasks

2009-11-13 Thread Simon Slavin
On 13 Nov 2009, at 4:03pm, Robert Rawlins - Think Blue wrote: > What tasks would you recommend running on a SQLite database and on what sort > of regularity? I know that's a bit of a 'how longs a piece of string' type > question but I'm just trying to understand if a SQLite database requires the

Re: [sqlite] Output in currency format

2009-11-13 Thread Nicolas Williams
On Fri, Nov 13, 2009 at 03:07:27AM +, Simon Slavin wrote: > > On 13 Nov 2009, at 12:34am, Nicolas Williams wrote: > > > On Thu, Nov 12, 2009 at 11:40:23PM +, Simon Slavin wrote: > >> There's still some possibility for confusion, however: how many places > >> of decimals do you use for

Re: [sqlite] Output in currency format

2009-11-13 Thread Peter Haworth
Thanks for all the comments on this. Didn't realise there were so many things to worry about when dealing with currency! The system I'm developing is only dealing with US dollars right now but I would hope it might make it's way into other countries at some point. Even with dollars, I

[sqlite] Maintenance Tasks

2009-11-13 Thread Robert Rawlins - Think Blue
Hello Guys, I'm a fairly new user to SQLite, I come from using DBMS like SQL Server, MySQL and Oracle. I've always run scheduled maintenance tasks on these kinds of databases, such as deleting old data, integrity checks / repairs, rebuilding indexes, backups and so forth. What tasks would

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread P Kishor
On Fri, Nov 13, 2009 at 8:07 AM, Marco Bambini wrote: > sqlite 3.6.19 > > CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT); > a > SELECT rowid, col1, col2 > > returns the following column names with sqlite3_column_name: > col1, col1, col2 > > Is there a way to force the

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Bogdan Ureche
Unless the user is a paying customer. On Fri, Nov 13, 2009 at 8:37 AM, Jean-Christophe Deschamps wrote: > > > >Unfortunately I cannot modify the query... it is supplied by an user. > > Well, what about upgrading the user? > > Sorry coul'd resist ... I'm already out! > > > >

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Jean-Christophe Deschamps
>Unfortunately I cannot modify the query... it is supplied by an user. Well, what about upgrading the user? Sorry coul'd resist ... I'm already out! ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Simon Slavin
On 13 Nov 2009, at 2:07pm, Marco Bambini wrote: > CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT); > a > SELECT rowid, col1, col2 > > returns the following column names with sqlite3_column_name: > col1, col1, col2 > > Is there a way to force the first column name to be returned as rowid

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Marco Bambini
Unfortunately I cannot modify the query... it is supplied by an user. -- Marco Bambini http://www.sqlabs.com http://www.creolabs.com/payshield/ On Nov 13, 2009, at 3:10 PM, Virgilio Fornazin wrote: > SELECT > field as NAME > > does not work? > > On Fri, Nov 13, 2009 at 12:07, Marco

Re: [sqlite] sqlite3_column_name

2009-11-13 Thread Virgilio Fornazin
SELECT field as NAME does not work? On Fri, Nov 13, 2009 at 12:07, Marco Bambini wrote: > sqlite 3.6.19 > > CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT); > a > SELECT rowid, col1, col2 > > returns the following column names with sqlite3_column_name: > col1, col1,

[sqlite] sqlite3_column_name

2009-11-13 Thread Marco Bambini
sqlite 3.6.19 CREATE TABLE foo (col1 INTEGER PRIMARY KEY, col2 TEXT); a SELECT rowid, col1, col2 returns the following column names with sqlite3_column_name: col1, col1, col2 Is there a way to force the first column name to be returned as rowid and not as its col1 alias? Thanks. -- Marco

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-13 Thread P Kishor
On Fri, Nov 13, 2009 at 2:17 AM, Jens Miltner wrote: > > Am 12.11.2009 um 20:08 schrieb Peter Haworth: > >> Thanks for all the info.  I believe the problem lies within Revolution >> since I'm pretty sure it includes its own private library of the >> sqlite code.  I've reported it to

Re: [sqlite] Output in currency format

2009-11-13 Thread Rich Shepard
On Thu, 12 Nov 2009, Dan Bishop wrote: > Microsoft Excel has a similar problem. I ran into it back when I was > working in a credit union and tried to import a CSV file containing credit > card numbers. Wouldn't have noticed except that credit card numbers are > 16 digits long and double only

Re: [sqlite] Converting .dbf to SQLite

2009-11-13 Thread Rich Shepard
On Thu, 12 Nov 2009, Alex Mandel wrote: > Using R might actually be a convenient way to do it all in essentially > one step, and technically batch scriptable. I found a perl script that converts .dbf to .csv. It's then trivial to import the .csv into SQLite. Rich

[sqlite] Bugreport: Wrong 'SQL error or missing database' message on SQLite 3.6.18 and later

2009-11-13 Thread Serge Golubenko
Steps to reproduce. 1. Create two tables in two databases: DocketLiga.db3 CREATE TABLE [MAIN] ( [NUM_DEC] integer PRIMARY KEY UNIQUE, [DATE_DEC] DATE, [ID_FORM_DEC] integer); DocketTXT.db3 CREATE VIRTUAL TABLE TXT_1 using fts3(UA); 2. Fill tables by some correct values. 3. Open first

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-13 Thread Artur Reilin
> > On Nov 12, 2009, at 4:36 PM, Artur Reilin wrote: > >> I also wonder, why the analyzer isn't working. I doesn't work for me. > > In what respect is it malfunctioning? > I've tried to use it in command line, but it didn't work; starting or put databases there, also don't work. at lest i didn't

Re: [sqlite] image upload to db trouble

2009-11-13 Thread Artur Reilin
> On Fri, 13 Nov 2009, Artur Reilin wrote: > >> To: General Discussion of SQLite Database >> From: Artur Reilin >> Subject: Re: [sqlite] image upload to db trouble >> >>> //echo $images; >>> $db = new PDO('sqlite: database.sqlite3'); >>>

Re: [sqlite] Compile Virtualtext extension

2009-11-13 Thread Gary_Gabriel
Alexey Pechnikov wrote: > Original SQLite source tree has "ext " directory for extensions and I did > place my extensions into this directory > > $ ls sqlite3-3.6.20/ext > async billing compress empty env fts1 fts2 fts3 functions iconv icu > inet key md5 README.txt rtree tablefunc

Re: [sqlite] Output in currency format

2009-11-13 Thread Jean-Denis Muys
On 11/13/09 6:31 , "Dan Bishop" wrote: > Microsoft Excel has a similar problem. I ran into it back when I was > working in a credit union and tried to import a CSV file containing > credit card numbers. Wouldn't have noticed except that credit card > numbers are 16

Re: [sqlite] image upload to db trouble

2009-11-13 Thread Jens Miltner
Am 13.11.2009 um 09:25 schrieb Keith Roberts: > On Fri, 13 Nov 2009, Artur Reilin wrote: > >> To: General Discussion of SQLite Database >> From: Artur Reilin >> Subject: Re: [sqlite] image upload to db trouble >> >>>//echo $images; >>> $db

[sqlite] disk image malformed with no system crash

2009-11-13 Thread Claudio Cilloni
Hi All. I'm new to Sqlite, and I'm getting some rare and random 'database disk image is malformed' error. I have no system crashes, power failures or filesystem corruption. My machine is a Linux Debian, ext3 filesystem running on a flash disk. I'm using Sqlite 3.6.19 through Python 2.6.2. I'm

Re: [sqlite] image upload to db trouble

2009-11-13 Thread Keith Roberts
On Fri, 13 Nov 2009, Artur Reilin wrote: > To: General Discussion of SQLite Database > From: Artur Reilin > Subject: Re: [sqlite] image upload to db trouble > >> //echo $images; >> $db = new PDO('sqlite: database.sqlite3'); >> >>

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-13 Thread Jens Miltner
Am 12.11.2009 um 20:08 schrieb Peter Haworth: > Thanks for all the info. I believe the problem lies within Revolution > since I'm pretty sure it includes its own private library of the > sqlite code. I've reported it to them and hopefully they will fix it. > > I understand the reasons for