Re: [sqlite] Question about speed of CASE WHEN

2007-03-20 Thread bartsmissaert
> Or is it just a case of needing to view > the final data in a user friendly environment? That is it. They can format, sort, print etc. in Excel. They won't even have to know about SQLite. The SQLite database file can safely be deleted and it will still work the same. RBS > Hi RBS, > >> I use

[sqlite] multithread problem

2007-03-20 Thread Rafi Cohen
Hi, I probably asked about this before, but as I'm having some problems with my implementation, I would like to ask more clear questions. The main part of the application does not modify the database, but quries it occasionally (select). The other thread is responsible for the changes (import from

[sqlite] Re: multithread problem

2007-03-20 Thread Igor Tandetnik
Rafi Cohen <[EMAIL PROTECTED]> wrote: 1. Should I open the database explicitly in the amin part and also in the thread? In my experience, SQLite works best when every thread opens its own connection. 2. should I create the tables in the thread or can I create them in the main thread and

[sqlite] Re: data type problem

2007-03-20 Thread Igor Tandetnik
qinligeng-9Onoh4P/[EMAIL PROTECTED] wrote: if you create a table use following statement (script generated from MS SQL Server 2000) CREATE TABLE [XTollData] ( [DutyID] [char] (32) NOT NULL , [CarNumber] [char] (10) NULL ); SQLite3_Column_decltype will treat DutyID as data type 'char' but not

Re: [sqlite] Anyone Having problems with SQLite 3.13 on WinMobile?

2007-03-20 Thread drh
Chris Hodges <[EMAIL PROTECTED]> wrote: > Hello: > > I recently upgraded to the latest version of SQLite 3.13 and ever since > then I have been experiencing numerous SQLITE_MISUSE[21] error message. Here are the kinds of things that will cause an SQLITE_MISUSE error: (1) Using the same

Re: [sqlite] data type problem

2007-03-20 Thread drh
<[EMAIL PROTECTED]> wrote: > if you create a table use following statement (script generated from MS SQL > Server 2000) > CREATE TABLE [XTollData] ( > [DutyID] [char] (32) NOT NULL , > [CarNumber] [char] (10) NULL > ); > > SQLite3_Column_decltype will treat DutyID as data type 'char' but not

Re: [sqlite] Re: multithread problem

2007-03-20 Thread Jakub Ladman
Dne úterý 20 březen 2007 12:42 Igor Tandetnik napsal(a): > Rafi Cohen <[EMAIL PROTECTED]> wrote: > > 1. Should I open the database explicitly in the amin part and also in > > the thread? > > In my experience, SQLite works best when every thread opens its own > connection. How should I understand

[sqlite] Raise not working.

2007-03-20 Thread Laurent LAVAUD
I have a problem to get < RAISE > function working. When the trigger is triggered by an insert, i only want to execute the < update > and skip the first insert. So i tried this with sqlite version 3.3.8 : -- create table

[sqlite] Query Issue

2007-03-20 Thread Arora, Ajay
Hi, I'm trying to run following query in sqllite, select a.extract_sequence,a.file_location,a.active,b.start_date,b.end_date,b.po rtfolio_code,c.status from extract_master a, extract_parameter b,

Re: [sqlite] API enhancement

2007-03-20 Thread Dennis Cote
Ken wrote: It should save some time. How much is questionable. Why would sqlite have to bind the Pointer bound variables? Isn't the strategy of binding to associate a variable with a statment? Why should I have to continually re-associate the bindings with a statement thats allready been

Re: [sqlite] data type problem

2007-03-20 Thread Dennis Cote
[EMAIL PROTECTED] wrote: <[EMAIL PROTECTED]> wrote: if you create a table use following statement (script generated from MS SQL Server 2000) CREATE TABLE [XTollData] ( [DutyID] [char] (32) NOT NULL , [CarNumber] [char] (10) NULL ); SQLite3_Column_decltype will treat DutyID as data type

Re: [sqlite] API enhancement

2007-03-20 Thread Ken
Denis, Thanks for the great explanation !!! Regards, Ken Dennis Cote <[EMAIL PROTECTED]> wrote: Ken wrote: > It should save some time. How much is questionable. > > Why would sqlite have to bind the Pointer bound variables? Isn't the strategy > of binding to associate a

[sqlite] Re: Raise not working.

2007-03-20 Thread Igor Tandetnik
Laurent LAVAUD wrote: I have a problem to get < RAISE > function working. When the trigger is triggered by an insert, i only want to execute the < update > and skip the first insert. create trigger checkdrop before INSERT on blocked when (select count(*) from blocked where id=new.id) > 0

Re: [sqlite] Raise not working.

2007-03-20 Thread Dennis Cote
Laurent LAVAUD wrote: I have a problem to get < RAISE > function working. When the trigger is triggered by an insert, i only want to execute the < update > and skip the first insert. So i tried this with sqlite version 3.3.8 :

Re: [sqlite] API enhancement

2007-03-20 Thread John Stanton
Partitioning an API at the wrong level punishes users who have carefully structured interfaces by needlessly bloating their code. It is hard to have a "Lite" embedded application when code bloat swells the library routines. Ken wrote: It should save some time. How much is questionable.

[sqlite] Finding linked peers

2007-03-20 Thread Clark Christensen
I'm having trouble wrapping my head around a solution here. Any advice is appreciated. I'm working on a SQLite-based app for keeping track of PC BIOS releases. One obvious requirement is to be able to track and document change history. So, using this sample schema/data code: create table

[sqlite] involing sqlite3 command as a superuser

2007-03-20 Thread Rafi Cohen
Hi, for various reasons, I preffer to invoke my application as the superuser. This, in turn, invokes sqlite3 command to apply a .import command from file to table. Although .import does not return any error, the table remains empty. So, I manually entered to sqlite3 and applied the .import

Re: [sqlite] Finding linked peers

2007-03-20 Thread Dennis Cote
Clark Christensen wrote: So, finally, the question: What might the SQL look like to retrieve a list of predecessors for 'PC1_v1.3'? Sure, I could prepare a stmt in the app (Perl), and walk the chain in some fashion. Is this result even possible using plain SQL? Clark, SQLite does not

RE: [sqlite] Finding linked peers

2007-03-20 Thread Samuel R. Neff
It's much easier to load all the data into a in-memory hierarchical structure and work with it from memory than try to come up with individual SQL statements. Some things you could do easily like find the leaf nodes (i.e., use a sub-select and identify nodes that nobody else uses as a parent) or

Re: [sqlite] Finding linked peers

2007-03-20 Thread Ken
Sample recusrive SQL from another database engine... level is a built in field. This is very useful and powerful syntax allowing one to build tree's (ie parent child relationships) inside of a table. SELECT level,chld FROM tbl1 START WITH value = 'some value'

Re: [sqlite] Finding linked peers

2007-03-20 Thread Clark Christensen
Dennis, Very cool. Thanks for showing the example. You always seem to offer well-considered solutions. It might just be a practical tool for the job here. I could see the materialized path solution working both for finding the change history, and for producing a browser-based UI for

Re: [sqlite] Finding linked peers

2007-03-20 Thread Clark Christensen
>Also note that using "version DESC" will not necessarily give you the expected results Gotcha. Always good to remember :-)) Thanks! -Clark - Original Message From: Samuel R. Neff <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Tuesday, March 20, 2007 12:50:12 PM Subject: RE:

Re: [sqlite] Re: multithread problem

2007-03-20 Thread Rich Rattanni
On 3/20/07, Jakub Ladman <[EMAIL PROTECTED]> wrote: Dne úterý 20 březen 2007 12:42 Igor Tandetnik napsal(a): > Rafi Cohen <[EMAIL PROTECTED]> wrote: > > 1. Should I open the database explicitly in the amin part and also in > > the thread? > > In my experience, SQLite works best when every thread

[sqlite] Date/timezone problem?

2007-03-20 Thread Jordan Hayes
I just downloaded Tcl bindings for 3.3.13 and am having trouble with some code that I wrote last year. Here's my code: load tclsqlite3.dll Sqlite3 sqlite3 db foo.sqb set q1 "SELECT DATETIME('now','localtime','start of day') today" db eval $q1 x { set today $x(today) puts "today =

Re: [sqlite] Date/timezone problem?

2007-03-20 Thread drh
"Jordan Hayes" <[EMAIL PROTECTED]> wrote: > I just downloaded Tcl bindings for 3.3.13 and am having trouble with > some code that I wrote last year. Here's my code: > > load tclsqlite3.dll Sqlite3 > sqlite3 db foo.sqb > > set q1 "SELECT DATETIME('now','localtime','start of day') today" > db

Re: [sqlite] Date/timezone problem?

2007-03-20 Thread Jordan Hayes
A date is just a string. When you apply 'localtime' it does not set some display flag - it actually changes the string. Ok, I get it. Thanks! /jordan - To unsubscribe, send email to [EMAIL PROTECTED]