Re: [sqlite] enum in SQLite

2006-01-05 Thread Derrell . Lipman
Michael Scharf <[EMAIL PROTECTED]> writes: > Jim C. Nasby wrote: >> On Thu, Jan 05, 2006 at 01:39:02PM -0600, Kurt Welgehausen wrote: >> >>> create trigger EnumTrg before insert on MainTbl for each row >>> when (select count(*) from EnumVals where val = new.EnumCol) = 0 begin >>> select

[sqlite] sqlite 2.8, HP-UX, Linux NFS server

2006-01-05 Thread b s
Hi, I am trying the following program and it fails with 'database is locked'. I have set the 'insecure_locks' option in /etc/exports of the NFS server (RH 7.3, 2.4.18-3 kernel). It only fails for HP-UX clients (11iv1 aka 11.11). Anybody has success with this combo? thanks bal #include #include

Re: [sqlite] [PATCH] WinCE compilation

2006-01-05 Thread Steve Lhomme
Ah, thanks for the tip. I'll have a look. Steve Simon Posnjak wrote: Hi, I do not now if you found it but there is another port of sqlite to WinCE. You can find it at http://sqlite-wince.sourceforge.net/. Would it be possible if your port and the sf port could be merged together in main

Re: [sqlite] enum in SQLite

2006-01-05 Thread Kurt Welgehausen
> ... you'll also need to write an update trigger ... True, and you may want to protect EnumVals with triggers after you populate it, or put EnumVals is a separate read-only database and attach it. On the other hand, being able to change the allowed values without changing the schema may be an

Re: [sqlite] enum in SQLite

2006-01-05 Thread Jim C. Nasby
On Thu, Jan 05, 2006 at 01:39:02PM -0600, Kurt Welgehausen wrote: > create trigger EnumTrg before insert on MainTbl for each row > when (select count(*) from EnumVals where val = new.EnumCol) = 0 begin >select raise(rollback, 'foreign-key violation: MainTbl.EnumCol'); > end; Wouldn't that

Re: [sqlite] enum in SQLite

2006-01-05 Thread Clay Dowling
Kurt Welgehausen said: >> SQLite doesn't support enums natively. You could emulate it using >> triggers, although it would be somewhat hidden and definitely a pain in >> the tucus to use. > > It's not really so hard. > > create table MainTbl ( > ... > EnumCol SomeType references EnumVals, >

Re: [sqlite] enum in SQLite

2006-01-05 Thread Kurt Welgehausen
> SQLite doesn't support enums natively. You could emulate it using > triggers, although it would be somewhat hidden and definitely a pain in > the tucus to use. It's not really so hard. create table MainTbl ( ... EnumCol SomeType references EnumVals, ...); create table EnumVals (val

Re: [sqlite] Feature Request: Open from fd

2006-01-05 Thread Christian Smith
On Wed, 4 Jan 2006, Steve Lhomme wrote: >[EMAIL PROTECTED] wrote: >> Peter Bierman <[EMAIL PROTECTED]> wrote: >> >>>Related to a project I'm working on, it would be useful for me to be >>>able to open a database file via passing an already open file >>>descriptor to the sqlite open() call.

Re: [sqlite] enum in SQLite

2006-01-05 Thread Clay Dowling
Rajan, Vivek K said: > I would like to know the following: > > *Does SQLite support enum like MySQL? If yes, how to use it > > *If not, is there another way to model enumeration in SQLite? > And/or any plans going forward to support enums natively in SQLite? SQLite doesn't

[sqlite] enum in SQLite

2006-01-05 Thread Rajan, Vivek K
I would like to know the following: *Does SQLite support enum like MySQL? If yes, how to use it *If not, is there another way to model enumeration in SQLite? And/or any plans going forward to support enums natively in SQLite? Rajan

Re: [sqlite] specifying field type, any benefit?

2006-01-05 Thread shamil_daghestani
If you have "dot zero(s)" values (such as, 4.0) do not save them in an INTEGER column because then they will lose their float characteristics. insert into students values(John, 4.0) select age from students where first_name = 'John' 4 <-- got converted to integer Regards /sd

Re: [sqlite] Prevent the error message box from popping up?

2006-01-05 Thread Roberto
You will need to be clearer on what error message you are seeing. AFAIK SQLite does not display any error messages, is this a feature of your development environment? On 02/01/06, Tsolakos Stavros <[EMAIL PROTECTED]> wrote: > Hi all. > > I am new both to this list and sqlite. Great tool. > > I

Re: [sqlite] how can I import CSV file into SQLite quickly

2006-01-05 Thread ronggui wong
sorry ,maked an mistake. actually,the data size is 805 vars, 118519 obs. 2006/1/5, ronggui wong <[EMAIL PROTECTED]>: > Thanks to all give response to help. > This is my solution using the luanguage I familiar.(http://www.r-project.org). > > I use the code to read a 11819x807 csv file and it takes

Re: [sqlite] How to optimize select queries

2006-01-05 Thread Ritesh Kapoor
thnx my queries are running in 1/3rd the time now!! ritesh On Mon, 2006-01-02 at 22:22, Dennis Cote wrote: > Ritesh Kapoor wrote: > > >Hi, > > > >I need to optimize/speed up my 'select' queries. The query creates > >about 3 to 6 left joins from 7 different tables depending on the > >different

Re: [sqlite] [PATCH] WinCE compilation

2006-01-05 Thread Simon Posnjak
Hi, I do not now if you found it but there is another port of sqlite to WinCE. You can find it at http://sqlite-wince.sourceforge.net/. Would it be possible if your port and the sf port could be merged together in main line src tree? Regards Simon On sre, 2006-01-04 at 10:13 -1000, Steve