Re: [sqlite] Feature request: extend the IN operator

2011-08-07 Thread P Kishor
On Mon, Aug 8, 2011 at 2:19 AM, Igor Tandetnik wrote: > Alexey Pechnikov wrote: >> 2011/8/7 Simon Slavin : >>> You don't need to. The SQLite expressions I listed tell you how to achieve >>> the result without doing that. >> >>

Re: [sqlite] SQLite join-mechanisms question

2007-04-12 Thread P Kishor
On 4/12/07, Cesar Rodas <[EMAIL PROTECTED]> wrote: Hello. I have a question about SQLite join-mechanisms. Let me explain with an example. I have the follow table. CREATE TABLE a( word_id INTEGER, doc_id INTEGER ); CREATE INDEX "a_index1" ON "a"( "doc_id" ASC ); CREATE INDEX "a_index"

Re: [sqlite] Journal files not deleted.

2007-04-12 Thread P Kishor
Guilty of extending this silly thread... On 4/12/07, Noah Hart <[EMAIL PROTECTED]> wrote: Not to quibble, but to quote from wipro's website "Only Indian company to be ranked among the top 10 global outsourcing providers in IAOP's 2006 Global Outsourcing 100 listing" you are indeed

Re: [sqlite] Sqlite3 stable version

2007-04-13 Thread P Kishor
On 4/13/07, Hamid Benhocine <[EMAIL PROTECTED]> wrote: Dear drh, We do want install the latest version of sqlite.for the production ( 2007-Apr-09 - Version 3.3.15 ) But, Our sytem group, found the only flaged stable version of the sqlite3 in the web site is this one ( 2006-Jan-31 - Version

Re: [sqlite] SQL query, finding out which row a result is in

2007-04-22 Thread P Kishor
Your question is so confusing that I am going to assume there is something you have not been able to express in the asking of it -- On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote: Given a arbitrary statement, I need to find out which row a specific result is in, as efficiently as possible.

Re: [sqlite] SQL query, finding out which row a result is in

2007-04-22 Thread P Kishor
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote: On Sun, Apr 22, 2007 at 05:33:43PM -0500, P Kishor wrote: >On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote: >>Given a arbitrary statement, I need to find out which row a specific >>result is in, as efficiently

Re: [sqlite] An explanation?

2007-04-23 Thread P Kishor
On 4/23/07, Marco Bambini <[EMAIL PROTECTED]> wrote: As a performance test I created a db with 300,000 records, table is: CREATE TABLE table1 (a INTEGER, b INTEGER) a query like: SELECT * FROM table1 WHERE a=5 AND b=11; takes 0.281 secs. if I add two indexes: CREATE INDEX index1 ON table1(a);

Re: [sqlite] License Queries

2007-04-26 Thread P Kishor
you don't have to do anything. SQLite is in public domain. You can cook with it, make castles with it, become a billionaire (although, if you do, remember to give some money to your favorite open source project), or roll pancakes with it. If you make and modifications to SQLite AND if you want

Re: [sqlite] License Queries

2007-04-26 Thread P Kishor
alright. Let's do it again (DRH can chime in to educate us if I get it wrong) -- On 4/26/07, Pavan <[EMAIL PROTECTED]> wrote: Hi Kishor, >you don't have to do anything. Thanks for the quick reply. I did not quite understand to which part of the question this reply belongs. .. .. > > On

Re: [sqlite] SQL query help (mutiple joins)

2007-05-01 Thread P Kishor
On 5/1/07, Allan, Mark <[EMAIL PROTECTED]> wrote: Hi, Thanks for your quick replies. I have tried this method but however I am getting a row returned for each entry in ForcedSpiroTable or RelaxedSpiroTable that matches the search criteria. i.e. If a single patient say "Joe Bloggs" has 5

Re: [sqlite] SQL query help (mutiple joins)

2007-05-01 Thread P Kishor
actually SELECT COUNT(DISTINCT ... On 5/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: It will be as the below query, but replace: distinct p.* with: count(p.ID) RBS >> Allan, Mark wrote: >> > What I want is Joe Blogs just the once. >> > >> > >> Mark, >> >> Then try adding distinct like

Re: [sqlite] Best way to optimize this query?

2007-05-02 Thread P Kishor
On 5/2/07, Tito Ciuro <[EMAIL PROTECTED]> wrote: Hello, Assume the following scenario: I store people in a table, like this: People ROWID, idx GUID, idx First, idx Last, idx Email ... In the app, the user can select People GUIDs from different

Re: [sqlite] Transaction journal corrupted by antivirus

2007-05-03 Thread P Kishor
You are in a sticky situation. Read below -- On 5/3/07, Voxen <[EMAIL PROTECTED]> wrote: Hi, My application is storing email messages in a SQLite database (raw email messages as they are downloaded from the mail server). This is done under a transaction. Sometimes I get the SQLITE_MISUSE

[sqlite] DBD::SQLite with FTS

2007-05-10 Thread P Kishor
has anyone created a DBD::SQLite with the full-text search option turned on? else, are there any guidelines on how to hook a new SQLite lib with the DBD package since the CPAN version seems to be running a few versions late. -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env.

Re: [sqlite] Unsupported file format

2007-05-11 Thread P Kishor
On 5/11/07, Alberto Simões <[EMAIL PROTECTED]> wrote: Hi, I am using a Mac, and probably doing something weird with fink software and (probably) other installations. The fact is that I create a database using DBD::SQLite, and then: [EMAIL PROTECTED] ProjectoDicionario]$ sqlite3 dic.db

Re: [sqlite] Compiling SQLite under Mac OS (was: unsupported file format)

2007-05-12 Thread P Kishor
On 5/12/07, Alberto Simões <[EMAIL PROTECTED]> wrote: On 5/11/07, P Kishor <[EMAIL PROTECTED]> wrote: > Just download the latest source code and compile a new sqlite3 with > it. All will be well. I am trying to compile SQLite under Mac OS. Normally I use fink but it inclu

Re: [sqlite] building/upgrading on Mac OS X

2007-05-23 Thread P Kishor
don't mess with system libs. Install in /usr/local/*. Set your path in your shell to look in /usr/local* first. Everything of Apple will work; everything of yours will work. On 5/23/07, Alessandro de Manzano <[EMAIL PROTECTED]> wrote: Hello, I'm using Sqlite since 2005 for a bunch of projects

Re: [sqlite] Sqlite Server

2007-05-27 Thread P Kishor
Seems like you haven't even bothered to look at the SQLite website. Here are a few hints -- - There is no such thing as a "SQLite server" - There is no such thing as a "SQLite server Developer licence" Rest of the answers are readily available on www.sqlite.org. You should spend about 30 mins

Re: [sqlite] Changing Schema On The Fly

2007-05-31 Thread P Kishor
If you read you will see that, "Each value stored in an SQLite database (or manipulated by the database engine) has one of the following storage classes: NULL. The value is a NULL value. INTEGER. The value is a signed integer, stored in 1, 2, 3, 4, 6, or 8

[sqlite] db design mixing different entities in the same table

2007-05-31 Thread P Kishor
Not a SQLite-specific question per se, but a (SQLite) db design question. I am modeling entities and their relationships to each other. A classic network digraph kind of stuff. The entities are organizations or persons. A person may be associated with none (org type "unassigned") or one

Re: [sqlite] Re: db design mixing different entities in the same table

2007-05-31 Thread P Kishor
On 5/31/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: P Kishor <[EMAIL PROTECTED]> wrote: > I am modeling entities and their relationships to each other. A > classic network digraph kind of stuff. The entities are organizations > or persons. A person may be associate

Re: [sqlite] Re: db design mixing different entities in the same table

2007-05-31 Thread P Kishor
On 5/31/07, Andrew Finkenstadt <[EMAIL PROTECTED]> wrote: On 5/31/07, P Kishor <[EMAIL PROTECTED]> wrote: > > I realize that I didn't explain the problem well enough (thus is the > peril of being too close to it for a long time). > > I can have an (org <--

Re: [sqlite] baffled by dates

2007-06-04 Thread P Kishor
There is no "DATE" format in SQLite. Dates are stored as strings. The only formats SQLite knows and understands are TEXT, REAL, INTEGER, BLOB, and NULL (see the link on datatypes). On the other hand, there are built-in functions that can act on your date strings and convert them back and forth,

Re: [sqlite] baffled by dates

2007-06-04 Thread P Kishor
ported. There are functions to transform in and out of that format to present dates as required by the user. The Sqlite date format uses a magib epoch which matches all of the major internaional date systems. P Kishor wrote: > There is no "DATE" format in SQLite. Dates are stored as strings.

Re: [sqlite] baffled by dates

2007-06-05 Thread P Kishor
" > http://www.sqlite.org/cvstrac/wiki?p=ProposedIncompatibleChanges > > Because rehashing the old arguments is pointless, here's the old thread: > > http://www.mail-archive.com/sqlite-users@sqlite.org/msg20589.html > > >>P Kishor wrote: >> >>>There is no

Re: [sqlite] performance question: SELECT max(rowid) - 1

2007-06-14 Thread P Kishor
someone else might give a more technical and scientific explanation, but my take is that "SELECT n FROM table" is just that -- a row returned for every row in the table because there is no WHERE clause constraining the results. "SELECT max() - 1 FROM table" on the other hand GROUPs the result

Re: [sqlite] Trigger update of multiple columns

2007-06-18 Thread P Kishor
On 6/17/07, T <[EMAIL PROTECTED]> wrote: Hi All, I have a pretty standard sales tracking database consisting of tables: Products - Each row is a product available for sale. Includes fields: Code, Buy, Sell, Description Sales - Each row is a sale made to a

Re: [sqlite] Trigger update of multiple columns

2007-06-18 Thread P Kishor
ok, your problem makes a bit more sense, but still, much in it doesn't make sense. On 6/18/07, T <[EMAIL PROTECTED]> wrote: Hi Puneet and John, You each respectively said: > Why are you repeating the Code, Buy, Sell, and Description columns > in the Sale_Products table when they already

Re: [sqlite] SQL query help

2007-06-18 Thread P Kishor
On 6/18/07, Jeff Godfrey <[EMAIL PROTECTED]> wrote: Not seeing this on the list 1.5 hrs after posting, I thought I'd try again. Sorry if this is a duplicate... Jeff = Hi All, I have a table which contains (among other things), a "name" column and a "version" column (a software asset

Re: [sqlite] Database Level Unique Sequence

2007-07-02 Thread P Kishor
On 7/2/07, Andre du Plessis <[EMAIL PROTECTED]> wrote: Good day everyone. I would like to know how to create an Autoincrement field and insure that it is unique across the database, I tested this and it does not seem to work: .. 1. Use a GUID, or 2. Use some kind of crypt/md5 kinda function

Re: [sqlite] iPhone

2007-07-02 Thread P Kishor
On 7/2/07, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: Congratulations to DRH and all. I Just love this beast,incredibly small but with monster features. hmmm now, is that a phone in your pocket, or is it just that your database is happy to see me? Which beast are we talking about

Re: [sqlite] Importing a big text file (CSV?)

2007-07-19 Thread P Kishor
On 7/19/07, Alberto Simões <[EMAIL PROTECTED]> wrote: Hi I have a file (big file with 16 000 000 lines) with records like 2 3 4 4 3 2 5 4 387 5 8 5473 ... and I want to import this to an SQLite table. Although I can replace all this to INSERT commands very easily, I would like to ask first if

Re: [sqlite] Importing a big text file (CSV?)

2007-07-19 Thread P Kishor
On 7/19/07, Veikko Mäkinen <[EMAIL PROTECTED]> wrote: Alberto Simões wrote: > Hi > > I have a file (big file with 16 000 000 lines) with records like > > 2 3 4 > 4 3 2 > 5 4 387 > 5 8 5473 > ... > > and I want to import this to an SQLite table. > Although I can replace all this to INSERT

Re: [sqlite] Duplicate Row check

2007-07-19 Thread P Kishor
On 7/19/07, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: Q was incomplete. When i do a insert is there a way to know row already exists!! what is the definition of "row already exists"? If you are concerned about a particular column, make that into a PK. If you are concerned about all the

Re: [sqlite] SQLite on Mac

2007-07-19 Thread P Kishor
On 7/19/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: Hi all, Does SQLite work on Mac, and if yes, is there any Mac enabled version that I could download? you must be new here, as they say on ./ Yes, SQLite works just fine on Mac. Just type the words Mac and SQLite in Google. -- Puneet

Re: [sqlite] sql query required

2007-07-27 Thread P Kishor
Try SELECT Count(Name) FROM tablename GROUP BY yearofbirth On 7/27/07, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: > Suppose I have a table: > > > > Create table "yearofbirth INTEGER, Name string" > > > > What will be the query to identify how many people were born in > different years? The

Re: [sqlite] Re: How to know which rows are affected by UPDATE/DELETE?

2007-07-29 Thread P Kishor
This has to be absolutely the funniest replies ever. I am sure Gilles meant to ask something else altogether, but we will never know until Gilles asks that. In the meantime, ;-) On 7/29/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Gilles Ganault > wrote: > > Is there a way to know which rows

Re: [sqlite] UI question

2007-08-02 Thread P Kishor
just enter a ; (semi-colon) to indicate that you have ended your command. SQLite will complain, and then will let you pick up and continue. On 8/2/07, Scott Derrick <[EMAIL PROTECTED]> wrote: > This is probably a stupid question but has frustrated me a couple of times. > > When using the command

Re: [sqlite] How to Speed of Inserts

2007-08-03 Thread P Kishor
1. Use bind vars... prepare the statement once, execute it many times binding values each time. 1a. Drop the index. 2. Use a transaction. 3. Commit every . In your case with only 10,000 recs, I would commit only at the very end. 4. Build the index at the end. Really, 10k recs should insert in

Re: [sqlite] Is SQLite Case Sensitive?

2007-08-07 Thread P Kishor
SQL is not case-sensitive, but SQL comparisons are. Use the following SELECT * FROM table WHERE field1 = 'a' OR field1 = 'A' you can also use WHERE Lower(field1) = 'a' or WHERE Upper(field1) = 'A' On 8/7/07, Lee Crain <[EMAIL PROTECTED]> wrote: > I am working on an application where I am

Re: [sqlite] Extremely new to SQLite

2007-08-07 Thread P Kishor
On 8/7/07, Dennis Cote <[EMAIL PROTECTED]> wrote: > Lee Crain wrote: > > Dennis, > > > > Are you certain that the callback function interface has been deprecated? > > > > >From the link you posted: > > > > --- > > > > "2.2 Executing SQL statements > >typedef int

Re: [sqlite] Spatial searches

2007-08-23 Thread P Kishor
Besides the suggestions from Dennis below, please search the archives for emails by me on doing exactly this. I achieved fairly decent performance on a database of 7.5 million rows doing lookups on 250k rectangles. I was working on a quad-Xeon server with 4 Gb ram and Win XP, using Perl to work on

Re: [sqlite] SQLite and html character entities

2007-09-20 Thread P Kishor
And, other than the above, I don't have to do anything else? Just a straight ahead INSERT with bind vars is enough? Many thanks in advance, Puneet. > > Then there is the problem of non-compliant browsers, but that is > another history... > > > Best regards, > ~

Re: [sqlite] SQLite and html character entities

2007-09-20 Thread P Kishor
l update the text with correct accents instead of with escaped entities (that is, the users will type é instead of ). Puneet. > > - Original Message > From: P Kishor <[EMAIL PROTECTED]> > To: Nuno Lucas <[EMAIL PROTECTED]> > Cc: sqlite-users@sqlite.org > Sent: Thu

Re: [sqlite] SQLite and html character entities

2007-09-20 Thread P Kishor
On 9/20/07, Trevor Talbot <[EMAIL PROTECTED]> wrote: > On 9/20/07, P Kishor <[EMAIL PROTECTED]> wrote: > > > sqlite> select * from tbl; > > the first record > > é ç ñ î > > more from 3rd row > > row four > &g

Re: [sqlite] Reading Blob data using Perl

2007-10-16 Thread P Kishor
can't help you all the way, but below are a few comments -- On 10/16/07, Brian Rowlands (Greymouth High School) <[EMAIL PROTECTED]> wrote: > Hi > I'm hoping someone can help me explain how to fix a problem I have with > reading a Blob field from a SQLite DB using Perl. My long term aim is to >

Re: [sqlite] How to post the question to this group

2007-10-18 Thread P Kishor
On 10/18/07, Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All, > I got a lot of email from this group but I don't remember how to post the > question to this user group. Please help. > Thanks, > JP is this a trick question? You just posted a question above quite successfully! now, bring

Re: [sqlite] Sqlite Rename table

2007-11-06 Thread P Kishor
On 11/6/07, Valerio Bontempi <[EMAIL PROTECTED]> wrote: > Hi Kees, > > thanks for your solution, it is a very interesting solution. > But I need to rename a table using sql from php. > (this is also the reason for my need of sqlite and not sqlite3, not > supported yet by php) > > Thanks a lot > >

Re: [sqlite] Suggests for improving the SQLite website

2007-11-08 Thread P Kishor
Hi Richard, I might be in a minority on this list for suggesting that the SQLite website could indeed become more helpful and informative through a redesign. I am not suggesting that the redesign necessarily be focused on attractiveness, although, there can be some correlation in ease of use and

[sqlite] building a custom DBD::SQLite

2007-11-17 Thread P Kishor
I need to build a DBD::SQLite package using SQLite with fts capabilities. Can someone on this list kindly give me painless, easy to understand instructions to do so? I need to do this on a Mac OS X 10.4 first, and then on my web host subsequently (running some flavor of Linux, natch). Many

[sqlite] Re: building a custom DBD::SQLite

2007-11-18 Thread P Kishor
On Nov 17, 2007 2:22 PM, P Kishor <[EMAIL PROTECTED]> wrote: > I need to build a DBD::SQLite package using SQLite with fts > capabilities. Can someone on this list kindly give me painless, easy > to understand instructions to do so? I need to do this on a Mac OS X > 10.4 first,

[sqlite] Re: building a custom DBD::SQLite

2007-11-18 Thread P Kishor
On Nov 18, 2007 2:59 PM, P Kishor <[EMAIL PROTECTED]> wrote: > On Nov 17, 2007 2:22 PM, P Kishor <[EMAIL PROTECTED]> wrote: > > I need to build a DBD::SQLite package using SQLite with fts > > capabilities. Can someone on this list kindly give me painless, easy > >

[sqlite] Re: building a custom DBD::SQLite

2007-11-19 Thread P Kishor
: *** [sqlite3] Error 1 This train is not going anywhere at all. In another post, my experience with fts2 On Nov 18, 2007 5:28 PM, P Kishor <[EMAIL PROTECTED]> wrote: > > On Nov 18, 2007 2:59 PM, P Kishor <[EMAIL PROTECTED]> wrote: > > On Nov 17, 2007 2:22 PM, P Kishor &

Re: [sqlite] Calculating Average Time

2007-11-19 Thread P Kishor
On Nov 19, 2007 5:43 PM, Jonathan O <[EMAIL PROTECTED]> wrote: > I have searched (archives/google) and haven't found a solution for what I > need and can't think of a solution so below is my question. > I have: >Job 1 run 1 with a time of '01:00:15' >Job 1 run 2 with a time of '01:00:21' >

[sqlite] how do I edit the wiki? or do I?

2007-11-19 Thread P Kishor
I finally got this blessed full-text search thing working. So that other clueless folks like me don't end up mucking around for 2 days+, I would like to put up step-by-step instructions that would make sense to some one not so developer-like as I. How do I add stuff to the wiki? or, how do I get a

Re: [sqlite] how do I edit the wiki? or do I?

2007-11-19 Thread P Kishor
On Nov 19, 2007 8:58 PM, Joe Wilson <[EMAIL PROTECTED]> wrote: > Step 1: [Edit] very funny! There is no step 2. I feel silly. I saw the [not logged in] link and just assumed that I couldn't edit. A bit after I emailed my query, I just hit the edit link and voila! Thanks. > >

[sqlite] trouble with TRIGGERs

2007-11-20 Thread P Kishor
I have a table CREATE TABLE foo ( foo_id INTEGER PRIMARY KEY, foo_name TEXT, foo_text TEXT ); I have created a virtual table to do full text search CREATE VIRTUAL TABLE fts_foo ( USING fts2(foo_text); I have populated this table INSERT INTO fts_foo (rowid, foo_text) VALUES (foo.foo_id,

[sqlite] Re: trouble with TRIGGERs

2007-11-20 Thread P Kishor
solved... case of the missing ; after the UPDATE and INSERT statements. On Nov 20, 2007 12:35 PM, P Kishor <[EMAIL PROTECTED]> wrote: > I have a table > > CREATE TABLE foo ( > foo_id INTEGER PRIMARY KEY, > foo_name TEXT, > foo_text TEXT > ); > > I have c

[sqlite] Detailed notes on compiling full-text search

2007-11-21 Thread P Kishor
http://www.sqlite.org/cvstrac/wiki?p=CompilingFts Not being very conversant with the ins and outs of compiling software, I had to do a lot of undue diligence to get this working, so I hope this is of help to someone. By the way, fts is the greatest thing since... since the world's most widely

Re: [sqlite] Detailed notes on compiling full-text search

2007-11-21 Thread P Kishor
asion, so maybe if he reads this he would be kind enough to provide some guidance. I will also ask on Perlmonks. > > Thanks! > > -Clark > > - Original Message > From: P Kishor <[EMAIL PROTECTED]> > To: sqlite-users@sqlite.org > Sent: Wednesday, Novem

Re: [sqlite] wrong version number when compiled

2007-11-23 Thread P Kishor
you suddenly got bit by this, but glad to see that you are not wasting time on this anymore... what a serious pain these mysterious computer problems can be. On Nov 23, 2007 4:31 PM, Xabriel J Collazo Mojica <[EMAIL PROTECTED]> wrote: > Guys: > > Thank you all for your quick replies! &

Re: [sqlite] wrong version number when compiled

2007-11-23 Thread P Kishor
On Nov 23, 2007 3:56 PM, Xabriel J Collazo Mojica <[EMAIL PROTECTED]> wrote: > You're right! I tried /usr/local/bin/sqlite3 -version an it reports the > correct version 3.5.2: > > xabita:/ xabriel$ /usr/local/bin/sqlite3 -version > 3.5.2 > > I cannot remove the old one as I know some Mac programs

Re: [sqlite] Re: A valid SQL fails with SQLite

2007-11-23 Thread P Kishor
On Nov 23, 2007 11:47 AM, <[EMAIL PROTECTED]> wrote: > Yes, you are right, I just tested it in another GUI myself. It is the GUI's > fault (SQLite Studio), which I found on the list on the SQLite site. > > Damn, I would never have suspected the GUI. I would have thought that it > would just

Re: [sqlite] Re: building a custom DBD::SQLite

2007-11-25 Thread P Kishor
along the way as well, and they all take time. On Nov 24, 2007 5:36 PM, Scott Hess <[EMAIL PROTECTED]> wrote: > On Nov 18, 2007 3:28 PM, P Kishor <[EMAIL PROTECTED]> wrote: > > Following those pretty much to the t, I almost got everything working. > > Except, I go

[sqlite] SQLite Manager Firefox extension

2007-11-26 Thread P Kishor
To all those looking for a decent, cross-platform SQLite gui, check out SQLite Manager Firefox add-on https://addons.mozilla.org/en-US/firefox/addon/5817 I have just started experimenting with it, and it really quite nice even at version 0.2.9.1. Works well on my Mac. -- Puneet Kishor

Re: [sqlite] FTS Usage

2007-11-29 Thread P Kishor
On 11/29/07, Jiri Hajek <[EMAIL PROTECTED]> wrote: > Hello, > > I'm considering usage of FTS, but from the documentation it's a little > unclear to me what's the recommended way of using it, particularly in > the following scenario: > > Let's say that I already have some database structure

[sqlite] 'nuther gui for SQLite

2007-11-29 Thread P Kishor
another gui for SQLite, among many other databases. Uses their own jdbc driver to connect. -- Puneet Kishor - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Single row insert speeds

2007-12-03 Thread P Kishor
you would need to give more info about your db, the data, etc. On my Macbook Pro, I get 1000+ inserts a second for a random 100 byte string insert (that is, less than one per ms). That includes the time to generate the string, and is all in Perl, while I am listening to iTunes, and no funny pragma

Re: [sqlite] Single row insert speeds

2007-12-03 Thread P Kishor
On 12/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "P Kishor" <[EMAIL PROTECTED]> wrote: > > I get 1000+ inserts a second for a random 100 byte string > > insert ( > > I get 5+ inserts/sec on my Linux box. turned off AutoCommit, turned off ra

Re: [sqlite] Single row insert speeds

2007-12-03 Thread P Kishor
ff between the safety of the > synchronous operation (in case power is lost) versus the insert > speeds. there is always a tradeoff between caution and impetuousness. Such is life. Glad it worked out for you. ;-) > > Thanks for the help, > Mark > > On Dec 3, 2007 12:59 PM, <[EM

Re: [sqlite] SQLite is in Android

2007-12-04 Thread P Kishor
On 12/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Richard Klein <[EMAIL PROTECTED]> wrote: > > Surely I'm not the first person to notice that > > SQLite is part of Google's open-source Android > > platform for mobile phones. > > > > I've had Android listed at

Re: [sqlite] File Is Encrypted Or Is Not a Database

2007-12-04 Thread P Kishor
On 12/4/07, Mark Easton <[EMAIL PROTECTED]> wrote: > I have also tried v 3.5.3 now and still cannot open the database. I guess I > need the right version of sqlite3 so that I can dump to sql and then I can > rebuild in a newer version. But how do I find our what version of sqlite I > need? > > > >

Re: [sqlite] File Is Encrypted Or Is Not a Database

2007-12-04 Thread P Kishor
od->id, > $mod->inst_version eq "undef" || !defined($mod->inst_version) > ? "-" : $mod->inst_version, > $mod->cpan_version eq "undef" || !defined($mod->cpan_version) > ? "-" : $mod->cpan_vers

Re: [sqlite] Re: Any advantages of "varchar()" over "text"?

2007-12-07 Thread P Kishor
On 12/7/07, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > On Fri, Dec 07, 2007 at 05:49:56PM -0500, Igor Tandetnik wrote: > > > >So I would to ask: are there any benefits from using VARCHAR() and > > >not TEXT? > > > > There is no difference whatsoever to SQLite. It maintains the types for > >

Re: [sqlite] Any advantages of "varchar()" over "text"?

2007-12-07 Thread P Kishor
On 12/7/07, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > We can define in, using SQLite, both "fixed max. width" VARCHAR() fields (I > know, in practice it can be crossed over), as well as "no limit" TEXT fields. > > So I would to ask: are there any benefits from using VARCHAR() and not TEXT? >

[sqlite] indexing BLOBs

2007-12-07 Thread P Kishor
folks, I have never worked with BLOBs, but am now going to. Feel a bit nervous. The way I understand it, our favorite db breaks a BLOB into its predetermined chunks (4096 bytes or whatever) and figures out how and where to store them. We just ask it to put in the BLOB or take out the BLOB, and

Re: [sqlite] Re: indexing BLOBs

2007-12-07 Thread P Kishor
On 12/7/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > P Kishor <[EMAIL PROTECTED]> wrote: > > folks, I have never worked with BLOBs, but am now going to. Feel a > > bit nervous. > > > > Here is a question -- what if I have a rather large image and I wan

Re: [sqlite] Re: Any advantages of "varchar()" over "text"?

2007-12-07 Thread P Kishor
On 12/7/07, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > On Fri, Dec 07, 2007 at 05:43:49PM -0600, P Kishor wrote: > > > I believe it used to... fixed width (CHAR) was quicker than VARCHAR > > while the latter was more space efficient, obviously. > > But he didn't

Re: [sqlite] How to convert the GMT time to date time format

2007-12-18 Thread P Kishor
On Dec 18, 2007 12:20 PM, Joanne Pham <[EMAIL PROTECTED]> wrote: > Thank Richard, > What is the 'localtime' in this case. If my time zone is Pacific Time zone. 'localtime' is the keyword that tells SQLite to get the time from your computer's time zone setting. Read the datetime section on the

Re: [sqlite] How to truncate the hour

2007-12-19 Thread P Kishor
On 12/19/07, Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All, > I have the table as defined below: > hourlyAppAcclTable ( appid INTEGER, > startTime INTEGER -- is number of seconds in > GMT time in the integer > . > ) > > the values

Re: [sqlite] How to truncate the hour

2007-12-19 Thread P Kishor
qlite.org/cvstrac/wiki?p=DateAndTimeFunctions carefully. Most of your questions will be answered there. > > > > - Original Message > From: P Kishor <[EMAIL PROTECTED]> > To: sqlite-users@sqlite.org > Sent: Wednesday, December 19, 2007 9:28:22 AM > Subject: R

Re: [sqlite] recognizing a sqlite database?

2007-12-19 Thread P Kishor
On 12/19/07, Dave Dyer <[EMAIL PROTECTED]> wrote: > > Is there an officially sanctioned magic number test to recognize > a sqlite database? I'd like to allow a user to browse for a file, > and if it happens to be a sqlite database to take a separate path. > You could read the file and check for

Re: [sqlite] "always-trim" - feature suggestion

2008-01-07 Thread P Kishor
speaking for myself, and projecting on the makers of SQLite... On 1/7/08, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > On Mon, Jan 07, 2008 at 03:59:52PM +, [EMAIL PROTECTED] wrote: > > > If you want to trim whitespace on insert, why not just say so: > > > >INSERT INTO table

Re: [sqlite] Database Commoditization and SQLite

2008-01-07 Thread P Kishor
On 1/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Says Brian Aker, Director of Architecture at MySQL AB: > >"SQLite has commoditized the entire low end of the database > market out of existence." > > http://www.linuxworld.com/community/?q=node/2106 > > -- makes you sound like a

Re: [sqlite] "always-trim" - feature suggestion

2008-01-09 Thread P Kishor
fwiw, Zbigniew, I did not consider you rude or argumentative, but yes, this thread would have been "trimmed" a lot earlier after pretty much the very first "request for implementation." I hope you won't be put off by any perceived "hostility." No one wants to be that way. Your comments,

[sqlite] SQLite --> PostGres

2008-01-11 Thread P Kishor
I have been writing an app using SQLite (great to develop with, and to serve with to an extent), always with the intent of one day upsizing it to PostGres (pain in the tush to develop with, but great to serve with to any extent). Much to my delight, I am finding that y'all (the SQLite developers)

[sqlite] updating based on JOIN

2008-01-11 Thread P Kishor
CREATE TABLE zip (zip_code, city); CREATE TABLE city (city_id, name); INSERT a bunch of data. Then... ALTER TABLE zip ADD COLUMN city_id; UPDATE zip SET city_id = c.city_id FROM zip JOIN city c ON zip.city = c.name; SQL error: near "from": syntax error hints please! -- Puneet Kishor

Re: [sqlite] SQLite --> PostGres

2008-01-11 Thread P Kishor
hy of the makers of SQLite. I am just trying to see how much that philosophy can allow while making SQLite into a great app development platform that can seamlessly be upsized to a major database such as PostGres. > > -Original Message- > From: P Kishor [mailto:[EMAIL PROTECTED]

Re: [sqlite] SQLite --> PostGres

2008-01-11 Thread P Kishor
On 1/11/08, Rich Shepard <[EMAIL PROTECTED]> wrote: > On Fri, 11 Jan 2008, P Kishor wrote: > > > it to PostGres (pain in the tush to develop with, but great to serve > >The actual name is PostgreSQL and it's usually referred to as postgres. > > > For example,

Re: [sqlite] Next Version of SQLite

2008-01-13 Thread P Kishor
On 1/13/08, Joe Wilson <[EMAIL PROTECTED]> wrote: > --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > > There are people on this mailing list (ex: Joe Wilson) who appear > > to read every line of every change that we make to SQLite, within > > minutes of making them, and complain if we so much as

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread P Kishor
with SQLite being the db... On 1/14/08, mark pirogovsky <[EMAIL PROTECTED]> wrote: > Some relational (PostgreSQL for example) databases allow you to store > arbitrary array as a field in on row. So your retrieval would be much > easier. > Also depending on your performance requirements you can

[sqlite] Apple Filemaker's Bento uses SQLite

2008-01-15 Thread P Kishor
I have always wondered how long would it be before Apple offered a front-end to SQLite. Well, the wait has ended with Filemaker's Bento. Create a new "library" (another name for a table/database... not clear which), and it gets stored in ~/Library/Application Support/Bento/bento.bentodb in a

Re: [sqlite] Question on SQL arbitrary arrays

2008-01-15 Thread P Kishor
On 1/15/08, Joe Wilson <[EMAIL PROTECTED]> wrote: > > On 1/14/08, mark pirogovsky <[EMAIL PROTECTED]> wrote: > > > Some relational (PostgreSQL for example) databases allow you to store > > > arbitrary array as a field in on row. > > I was not aware of Postgres arrays or that it is part of the >

Re: [sqlite] Dump w/o Schema

2008-01-15 Thread P Kishor
On 1/15/08, Mark Riehl <[EMAIL PROTECTED]> wrote: > I'm coming from a MySQL background and the mysqldump utility supports > schema-only, sqlite> .mode filename sqlite> .s > data-only, sqlite> .mode filename sqlite> .mode csv|tabs sqlite> .dump > and schema plus data dumps. sqlite> .mode

Re: [sqlite] Date arithmetic question

2008-01-17 Thread P Kishor
On 1/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Fowler, Jeff" <[EMAIL PROTECTED]> wrote: > > Remember gang, if you want to know how many seconds are between two > > timestamps, you wouldn't ask for a difference in months. You'd say > > something like DATEDIFF(seconds, t1, t2). > > > >

Re: [sqlite] SQLite and OS X - Can I have multiple versions?

2008-01-28 Thread P Kishor
On 1/28/08, Carl Gundel <[EMAIL PROTECTED]> wrote: > > As I understand it, Apple's Mac OS X comes with SQLite as part of its Mail > app. It is not so much that "OS X comes with SQLite" as part of its Mail.app. It is more like OS X allows one to create persistent data stores using multiple

Re: [sqlite] SQLite and OS X - Can I have multiple versions?

2008-01-28 Thread P Kishor
On 1/28/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "P Kishor" <[EMAIL PROTECTED]> wrote: > > > > Most folks though install their own version of SQLite under the > > /usr/local tree ... > > Why do people feel like they need SQLi

[sqlite] find the highest rank per group

2008-01-28 Thread P Kishor
I have id, name, .., title, rank 1, a, .., foo, 5 1, a, .., bar, 4 1, a, .., bar, 7 2, b, .., baz, 6 2, b, .., qux, 9 and so on I want 1, a, .., bar, 7 2, b, .., qux, 9 that is, all the rows for each name where title is the highest. SELECT id, name, .., title, MAX(rank) FROM table GROUP BY

Re: [sqlite] find the highest rank per group

2008-01-28 Thread P Kishor
select max(rank) from table b where b.id = a.id) Many thanks. That works. > > - Jeff > -Original Message- > From: P Kishor [mailto:[EMAIL PROTECTED] > Sent: Monday, January 28, 2008 10:42 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] find the highest rank per grou

[sqlite] CREATE VIEW or CREATE TEMP TABLE

2008-01-29 Thread P Kishor
So, I have a series of SQL selects to do, making for a pretty complicated process. The end result is to be inserted into a new table. I can create a VIEW of each step, SELECTing each subsequent result from the preceding VIEW. Or, I can CREATE TEMP TABLE for each step. Any pros and cons of one or

  1   2   3   4   5   6   7   8   9   10   >