[sqlite] DBD:SQLite and sqlite3_column_decltype()

2006-02-09 Thread Nathan Kurz
Hello -- I'm trying to track down a segfault that happens when I'm using DBD::SQLite for Perl, and I'm confused by the documentation for sqlite3_column_decltype(). I think I understand what it does, but I think there are some typos that make me uncertain:

Re: [sqlite] delete all tables

2006-02-09 Thread deminix
This is definitely the fastest way, if it succeeds. If its performed via SQLite DDL then it does the appropriate locking on the file etc and returns nice error codes. By doing it via the file system (at least on linux), other readers of the file will continue to read from it... I don't know if

Re: [sqlite] delete all tables

2006-02-09 Thread Xavier Noria
On Feb 9, 2006, at 23:02, Marian Olteanu wrote: I would say that the fastest way (CPU cycles and lines of code) to delete all tables would be to delete the file in which the database is stored. Clever!

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Jay Sprenkle
On 2/9/06, Cyrille37 <[EMAIL PROTECTED]> wrote: > Jay Sprenkle a écrit : > >> Thanks Jay, > >> > >> the "not in" was the syntax I didn't know for adding the select query to > >> the delete command. I haven't found the not in to be slow, but I haven't tried it on sqlite. In all the other systems

Re: [sqlite] delete all tables

2006-02-09 Thread Marian Olteanu
I would say that the fastest way (CPU cycles and lines of code) to delete all tables would be to delete the file in which the database is stored. On Thu, 9 Feb 2006, Xavier Noria wrote: In the schema definition I would like to avoid the combo delete if exists table_name; create

[sqlite] delete all tables

2006-02-09 Thread Xavier Noria
In the schema definition I would like to avoid the combo delete if exists table_name; create table_name ( ... ); Can I query sqlite_master about tables, indexes, etc. in a way that allows the deletion of everything in one shot beforehand? -- fxn

Re: [sqlite] Re: How to read column names

2006-02-09 Thread Eugen Stoianovici
Igor Tandetnik wrote: Eugen Stoianovici wrote: Is there a way of reading the names of the columns in a table? how about the table names in a data base? select * from sqlite_master where type='table' pragma table_info(table_name); Igor Tandetnik Thanks

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Cyrille37
Jay Sprenkle a écrit : Thanks Jay, the "not in" was the syntax I didn't know for adding the select query to the delete command. You're welcome. You can also do it with a join but it's not as clear and simple. Perhaps the "Join" version is faster than "Not In" ?? I read that "not" usually

RE: [sqlite] How to read column names

2006-02-09 Thread nbiggs
select name from sqlite_master where type='table' That will get you the names of tables in the database. -Original Message- From: Eugen Stoianovici [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 3:57 PM To: sqlite-users@sqlite.org Subject: [sqlite] How to read column names

Re: [sqlite] How to read column names

2006-02-09 Thread Dennis Cote
Eugen Stoianovici wrote: Is there a way of reading the names of the columns in a table? how about the table names in a data base? Eugen, This will give you the table names: select name from sqlite_master where type = 'table'; and this will give you the columns in that table: pragam

[sqlite] Re: How to read column names

2006-02-09 Thread Igor Tandetnik
Eugen Stoianovici wrote: Is there a way of reading the names of the columns in a table? how about the table names in a data base? select * from sqlite_master where type='table' pragma table_info(table_name); Igor Tandetnik

[sqlite] How to read column names

2006-02-09 Thread Eugen Stoianovici
Is there a way of reading the names of the columns in a table? how about the table names in a data base?

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Jay Sprenkle
> Thanks Jay, > > the "not in" was the syntax I didn't know for adding the select query to > the delete command. > You're welcome. You can also do it with a join but it's not as clear and simple.

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Cyrille37
Jay Sprenkle a écrit : How about this: delete from Words where IID not in ( select Words_IID from Feedbacks_has_Words ) Thanks Jay, the "not in" was the syntax I didn't know for adding the select query to the delete command. Thank you. cyrille

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Cyrille37
Jay Sprenkle a écrit : How about this: delete from Words where IID not in ( select Words_IID from Feedbacks_has_Words ) Thanks Jay, the "not in" was the syntax I didn't know for adding the select query to the delete command. Thank you. cyrille

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Cyrille37
Radu Lodina a écrit : Hi cyrille, Please try: DELETE FROM Words WHERE IID NOT IN ( SELECT Words_ID FROM Feedbacks_has_Words ) YEAH!!! Thanks a lot. Your answer was so fast that I could not believe. Surely I'm dreaming ... ;o) thanks again. cyrille Regards Radu Lodina On 2/9/06,

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Jay Sprenkle
On 2/9/06, Cyrille37 <[EMAIL PROTECTED]> wrote: > Hello, > > I've got a SELECT query that I would like to transform as a DELETE query , > but I could not write that DELETE query ;o{ > > Here is the case : > > In a search engine, I would like to erase all words that are no more > attached to a

Re: [sqlite] about DELETE and JOIN

2006-02-09 Thread Radu Lodina
Hi cyrille, Please try: DELETE FROM Words WHERE IID NOT IN ( SELECT Words_ID FROM Feedbacks_has_Words ) Regards Radu Lodina On 2/9/06, Cyrille37 <[EMAIL PROTECTED]> wrote: > > Hello, > > I've got a SELECT query that I would like to transform as a DELETE query , > but I could not write that

[sqlite] about DELETE and JOIN

2006-02-09 Thread Cyrille37
Hello, I've got a SELECT query that I would like to transform as a DELETE query , but I could not write that DELETE query ;o{ Here is the case : In a search engine, I would like to erase all words that are no more attached to a feedback entry. table Words ( IID, Word ) table

Re: [sqlite] print for debugging from triggers

2006-02-09 Thread Jay Sprenkle
> >> >program). But this didn't work. So I wrote a simple print method that > >> >takes > >> >one argument and printf it to the standard out. This works and actually > >> >solves my problem. > >> There isn't a way to get this output printed directly, but you can > >> easily create a log of your

Re: [sqlite] print for debugging from triggers

2006-02-09 Thread Derrell . Lipman
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Thu, Feb 09, 2006 at 09:51:44AM -0700, Dennis Cote wrote: >> >program). But this didn't work. So I wrote a simple print method that takes >> >one argument and printf it to the standard out. This works and actually >> >solves my problem. >> There

Re: [sqlite] print for debugging from triggers

2006-02-09 Thread Jim C. Nasby
On Thu, Feb 09, 2006 at 09:51:44AM -0700, Dennis Cote wrote: > >program). But this didn't work. So I wrote a simple print method that takes > >one argument and printf it to the standard out. This works and actually > >solves my problem. > There isn't a way to get this output printed directly, but

Re: [sqlite] print for debugging from triggers

2006-02-09 Thread Dennis Cote
Ran wrote: Hi all, I use many triggers and for debugging purposes I wanted to know which one is triggered and when. At first I thought that if I write a SELECT within the BEGIN-END block, this SELECT results will be printed (at least when using sqlite3 command line program). But this didn't

Re: [sqlite] String to numeric conversion

2006-02-09 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Ticket #1662 (http://www.sqlite.org/cvstrac/tktview?tn=1662) complains that SQLite is not converting strings into numbers if the string contains leading spaces. This happens because SQLite just hands the string to strtod() and strtod() does not recognize numbers with

[sqlite] print for debugging from triggers

2006-02-09 Thread Ran
Hi all, I use many triggers and for debugging purposes I wanted to know which one is triggered and when. At first I thought that if I write a SELECT within the BEGIN-END block, this SELECT results will be printed (at least when using sqlite3 command line program). But this didn't work. So I wrote

RE: [sqlite] sql problem

2006-02-09 Thread Downey, Shawn
Using the LIKE qualifier instead of = will result in case insensitive matches. Shawn M. Downey MPR Associates 10 Maxwell Drive, Suite 204 Clifton Park, NY 12065 518-371-3983 x113 (work) 860-508-5015 (cell) -Original Message- From: manoj marathayil [mailto:[EMAIL PROTECTED] Sent:

Re: [sqlite] String to numeric conversion

2006-02-09 Thread Guillaume MAISON
[EMAIL PROTECTED] a écrit : So the question is: should this be changed. Should SQLite ignore leading space in strings when trying to determine if the string looks like a number. [...] Which is the correct behavior? Is this important enough to change (and possible cause problems in legacy

Re: [sqlite] testing Avg() function in other database engines

2006-02-09 Thread Jarosław Nozderko
Sybase ASE 12.5.3: 3 3.33 Regards, Jarek > -Wiadomość oryginalna- > Od: Dennis Cote [mailto:[EMAIL PROTECTED] > Wysłano: 8 lutego 2006 20:11 > Do: sqlite-users > Temat: [sqlite] testing Avg() function in other database engines > > Hi All, > > I have a question that I