Re: [sqlite] Optimizing an insert/update

2008-02-29 Thread Cyril SCETBON
> > Thanks, > > Mike > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- Cyril SCETBON ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FW: Query to Find number of distinct records

2008-02-27 Thread Cyril SCETBON
is email and its > attachments are scanned for virus by our scanners and are believed to be > safe. However, no warranty is given that this email is free of malicious > content or virus. > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- Cyril SCETBON ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Tool to find out the memory usage of a program

2006-09-05 Thread Cyril Scetbon
see options of ps (man ps) Anish Enos Mathew a écrit : Hi, I want to find out the total and the peak memory usage of a program(in Linux). Is there any tool to find it out.I am inserting 100,000 rows into a table.I want to find out how much memory it is taking ; both th

Re: [sqlite] DBD::SQLite

2006-03-17 Thread Cyril Scetbon
$sql = "SELECT varint FROM mytable"; $sth = $dbh->prepare($sql); eval { $sth->execute(); }; if ($@) { print STDERR "[EMAIL PROTECTED]"; exit(1); } my $ary_ref = $sth->fetchrow_arrayref; print STDERR "RETURN IS $ary_ref->[0] \n"; __END__ bash-3.00$

Re: [sqlite] DBD::SQLite

2006-03-17 Thread Cyril Scetbon
ommit => 1 }); $stmt=$dbh->prepare("insert into mytable(varint) values(?)"); $stmt->bind_param(1, '01237', { TYPE => SQL_VARCHAR }); #$stmt->execute('01238'); $stmt->execute(); Chris Werner a écrit : Can you run .schema on the table? -Origin

Re: [sqlite] DBD::SQLite

2006-03-16 Thread Cyril Scetbon
spect the problem is in your treatment of perl... Christian Werner -Original Message- From: Cyril Scetbon [mailto:[EMAIL PROTECTED] Sent: Thursday, March 16, 2006 2:56 PM To: sqlite-users@sqlite.org Subject: [sqlite] DBD::SQLite Hi, I use DBD::SQLite for accessing a SQLite database, but

[sqlite] DBD::SQLite

2006-03-16 Thread Cyril Scetbon
Hi, I use DBD::SQLite for accessing a SQLite database, but there's an issue when I tyr to insert a number starting with a 0. In fact, DBD::SQLite seems to trim the starting 0 of the number. So, when I insert 0234 in a table I find 234 instead. Anyone has encoutered and resolved this bug ?

Re: [sqlite] ring buffer table

2005-12-22 Thread Cyril Scetbon
implement a trigger that count the number of rows : if count(rows) = 500 then delete the first row Julien LEFORT wrote: Hi, I would like to implement a log table with a finite dimension, for exemple a table with 500 records, and when the last record is set in the table I would like to come b

Re: [sqlite] Erreur avec DBD::SQLite

2005-10-11 Thread Cyril Scetbon
it seems there are not errors cause I can dump it, use it without warning. Maybe a select request in the limit clause is not supported ? Scott Leighton wrote: On Monday 10 October 2005 2:32 pm, Cyril Scetbon wrote: Scott Leighton wrote: On Monday 10 October 2005 6:03 am, Cyril

Re: [sqlite] Erreur avec DBD::SQLite

2005-10-10 Thread Cyril Scetbon
Scott Leighton wrote: On Monday 10 October 2005 6:03 am, Cyril Scetbon wrote: No error code is returned cause the script is blocked by the instruction $dbh->do($req); Change that line to $dbh->do($req) or die $dbh->errstr; to get an error displayed. Scott

Re: [sqlite] Erreur avec DBD::SQLite

2005-10-10 Thread Cyril Scetbon
Puneet Kishor wrote: On Oct 10, 2005, at 7:35 AM, [EMAIL PROTECTED] wrote: Sorry the precedent message was in french :-( I encountered a weird error using DBD::SQLite. This code works good : use DBI; $dbh= DBI->connect("dbi:SQLite:dbname=./backup.db")|| warn $!; $dbh->{TraceLevel} = "3|S

Re: [sqlite] Erreur avec DBD::SQLite

2005-10-10 Thread cyril . scetbon
Sorry the precedent message was in french :-( I encountered a weird error using DBD::SQLite. This code works good : use DBI; $dbh= DBI->connect("dbi:SQLite:dbname=./backup.db")|| warn $!; $dbh->{TraceLevel} = "3|SQL"; $req='delete from logs where date not in (select date from logs order by date

[sqlite] Erreur avec DBD::SQLite

2005-10-10 Thread cyril . scetbon
Salut, Je rencontre une erreur bizarre avec le module DBD::SQLite. Le code suivant passe correctement : use DBI; $dbh= DBI->connect("dbi:SQLite:dbname=./backup.db")|| warn $!; $dbh->{TraceLevel} = "3|SQL"; $req='delete from logs where date not in (select date from logs order by date desc limit 5

Re: [sqlite] How do I backup sqlite data file

2005-07-28 Thread Cyril Scetbon
sqliteX active.db .dump > backup.sql Koji Namekata wrote: Hi, What is the most reasonable way to backup sqlite data file? When applications using that db file are stopped, simple file copy `cp active.db backup.db' works fine. But with long running applications, is it correct to assume asynch

Re: [sqlite] CURRENT_TIME returns false value

2005-07-22 Thread cyril . scetbon
;m located at GMT-7. Where are you? > > Perhaps what you wanted was: > > select datetime('now','localtime'); > > > > > > On Jul 21, 2005, at 1:32 PM, Cyril Scetbon wrote: > > > Hi, > > > > I don't understand why when I use

[sqlite] CURRENT_TIME returns false value

2005-07-21 Thread Cyril Scetbon
Hi, I don't understand why when I use select CURRENT_TIME from sqlite I get a false value as follows : [EMAIL PROTECTED]:~$ date Thu Jul 21 22:37:20 CEST 2005 [EMAIL PROTECTED]:~$ sqlite3 /tmp/test.db "select CURRENT_TIME" 20:37:26 thanks