On Fri, 22 Feb 2008 10:46:00 -0500, Igor Tandetnik wrote:
It's impossible in pure SQL, unless the DBMS supports special syntax for
recursive queries, and/or recursive triggers.
But isn't recursion, for better or worse, part of the SQL:2003 standard?
-Thufir
On Mar 3, 2008, at 12:03 PM, P Kishor wrote:
Dan,
On 3/2/08, Dan [EMAIL PROTECTED] wrote:
Hi,
I tried this script here with the latest CVS version and
it didn't crash:
CREATE TABLE pages(page_id INTEGER PRIMARY KEY, page_name TEXT,
page_text TEXT);
CREATE VIRTUAL TABLE
Hi,
I have two problems concerning the contributed file
extension-function.c. First is that I can't download it from the
'Contributed files' page on www.sqlite.org. More in general, when trying
to download a contributed file (extension-functions.c) from the
Contributed files page
Hi all,
I'll appreciate if anyone can send me the correct syntax for executing
PRAGMA auto_vacuum = 1 command.
In the sqlite documentation there is only a list of all available PRAGMA
commands, but I didn't find any code examples.
Do I need to execute the PRAGMA auto_vacuum via
Hi Jason,
I'm used to doing stored procedures for web apps, which
conditionally execute statements based on state and/or the
presence of variables.
As others have pointed out, SQLite doesn't (currently at least) offer
stored procedures, so no branching in SQL such as if/then etc. But SQL
I put a pointer to the mozilla bug report here:
I probably should have mentioned our bug report as well. It's bug 408518 [1].
These stack traces don't make any sense to me either. The definition
of sqlite3_enable_shared_cache() in SQLite cvs is:
That, and as far as I can tell it's ever
Hello all,
I am new to Sqlite and I would like to backup Sqlite databases at runtime.
Appearently Sqlite does not (yet?) provide a functionality such as mysqlhotcopy.
My questions are:
Can a backup mechanism be implemented by means of the current Sqlite-API?
And if not so:
Does anybody plan to
Thufir wrote:
But isn't recursion, for better or worse, part of the SQL:2003 standard?
It's an optional part of the SQL:1999 standard that is not widely
implemented.
Dennis Cote
___
sqlite-users mailing list
sqlite-users@sqlite.org
[EMAIL PROTECTED] wrote:
When I execute the code, sqlraw
function print the pSql string, and this is the same I pass.
The
Database descriptor is the same returned from open function, and status
code is OK!!!
But table value isn't updated.
The code looks OK except for the typo (i.e.
2008/2/22, Dennis Cote [EMAIL PROTECTED]:
http://article.gmane.org/gmane.comp.db.sqlite.general/17286/match=managing+trees+database
for a method I use to manage trees in SQLite that works very well.
another method is to implement it like this (or similar):
Kalyani Phadke wrote:
In SQL Server2005, Row_number() function is used to retrieve the
sequential number of a row within a partition of a result set, starting
at 1 for the first row in each partition. Which is very useful when
implementing paging through a large number records in Table. Is
Toby Roworth wrote:
Looking at the API reference. it would apear you can send an extra
custom argument to the callback fro sqlite3_exec, using the 4th
parameter - how does this work,
It works well. :-)
and inperticular, could I pass an object
through to the call back,
Yes.
and if
Rael Bauer wrote:
According to the web page, 3.5.3.
Which web page is that?
Probably http://www.sqlite.org/changes.html
HTH
Dennis Cote
___
sqlite-users mailing list
sqlite-users@sqlite.org
Paulo van Breugel wrote:
I have two problems concerning the contributed file
extension-function.c. First is that I can't download it from the
'Contributed files' page on www.sqlite.org. More in general, when trying
to download a contributed file (extension-functions.c) from the
Raviv Shasha wrote:
Sqlite_exec (pDB, PRAGMA auto_vacuum = 1, NULL, 0, errMsg);
Raviv,
That is correct, but you should not the following detail from
http://www.sqlite.org/pragma.html
Therefore, auto-vacuuming must be turned on
before any tables are created. It is not possible to enable
ADO.NET is part of the .NET framework. There are no additional depencencies
and with SQLite there is nothing to setup outside your own application.
The performance impact of using ADO.NET vs direct is miniscule and greatly
outweighed by the improved efficiency in development.
Sam
On Sun, Mar
Abshagen, Martin RD-AS2 wrote:
Can a backup mechanism be implemented by means of the current Sqlite-API?
Well, no, but the database is a single file, so you can back it up by
copying the file.
If you are concerned about other processes accessing the database while
you are copying it, have
It should be easy to write your own dump feature. The table create
statements are saved in sqlite_master, and likewise for the schema.
Without looking at the code for sqlite3 (the command line utility) or
tksqlite, I would bet that is how they implement their dump feature.
On Mon, Mar 3, 2008
The Blob Example [1] contains code [2] in which, if sqlite3_prepare()
fails, the subsequent call to sqlite3_finalize() is skipped. Is this
OK? Does sqlite3_prepare() free up any memory it may have allocated
if it fails?
I've read the documentation for these two functions but still don't
Jerry Krinock [EMAIL PROTECTED] wrote:
The Blob Example [1] contains code [2] in which, if sqlite3_prepare()
fails, the subsequent call to sqlite3_finalize() is skipped. Is this
OK?
If sqlite3_prepare fails, you don't get a valid sqlite3_stmt handle, so
there's nothing to call
On Mon, Mar 3, 2008 at 10:16 AM, Igor Tandetnik [EMAIL PROTECTED] wrote:
Jerry Krinock [EMAIL PROTECTED] wrote:
The Blob Example [1] contains code [2] in which, if sqlite3_prepare()
fails, the subsequent call to sqlite3_finalize() is skipped. Is this
OK?
If sqlite3_prepare fails, you
Scott Hess [EMAIL PROTECTED] wrote:
On Mon, Mar 3, 2008 at 10:16 AM, Igor Tandetnik
[EMAIL PROTECTED] wrote:
Jerry Krinock [EMAIL PROTECTED] wrote:
The Blob Example [1] contains code [2] in which, if
sqlite3_prepare() fails, the subsequent call to
sqlite3_finalize() is skipped. Is this
On Mon, Mar 3, 2008 at 10:47 AM, Igor Tandetnik [EMAIL PROTECTED] wrote:
Scott Hess [EMAIL PROTECTED] wrote:
On Mon, Mar 3, 2008 at 10:16 AM, Igor Tandetnik
[EMAIL PROTECTED] wrote:
Jerry Krinock [EMAIL PROTECTED] wrote:
The Blob Example [1] contains code [2] in which, if
Scott Hess [EMAIL PROTECTED] wrote:
True, but my code snippet didn't check for NULL. If, for some reason,
SQLite returned a partial statement handle with an error code, then
I'd expect you would want to pass it back to sqlite3_finalize().
Since sqlite3_finalize() explicitly handles NULL, I
En/na Luca Olivetti ha escrit:
En/na Luca Olivetti ha escrit:
Hello,
I'm using sqlite 3.3.8 under linux (mandriva 2007.1).
[...]
1) is sqlite suitable when you have multiple threads accessing the same
database? Or should I delegate the access in a single thread and
serialize the
Hello,
I have source tables Talker and Listener, each with fields ID (PK, Integer)
and Group (Integer):
CREATE TABLE Talker (ID INTEGER, Group INTEGER, Primary Key (ID));
Ditto Listener
I would like to make a table Communications with fields Group (PK, Integer),
Slot(PK, Integer) TalkerID
I must be missing something:
$ sudo apt-get install sqlite3
...
Selecting previously deselected package sqlite3.
...
Setting up sqlite3 (3.3.8-1.1) ...
$ ls -l test.db
ls: test.db: No such file or directory
$ sqlite3 test.db
SQLite version 3.3.8
Enter .help for instructions
sqlite create table
I must be missing something:
$ sudo apt-get install sqlite3
...
Selecting previously deselected package sqlite3.
...
Setting up sqlite3 (3.3.8-1.1) ...
$ ls -l test.db
ls: test.db: No such file or directory
$ sqlite3 test.db
SQLite version 3.3.8
Enter .help for instructions
sqlite
Paul Hilton wrote:
Hello,
I have source tables Talker and Listener, each with fields ID (PK, Integer)
and Group (Integer):
CREATE TABLE Talker (ID INTEGER, Group INTEGER, Primary Key (ID));
Ditto Listener
I would like to make a table Communications with fields Group (PK, Integer),
Sean Rhea wrote:
sqlite create table foo (node_id, timestamp, tput);
SQL error: database is locked
What am I doing wrong?
Sean,
Ensure that you have write privileges for the database file and the
directory it is in. SQLite needs to create a journal file in the same
directory for you to
Hello all,
I was working with some queries last night, and ran accross something that I
don't quite understand. Basically, this is what I have...
***
CREATE TABLE MAIN (
id integer primary key autoincrement not null,
name varchar(30),
[other fields left out, as they are
Oh, I forgot to mention (if it matters), the MAIN table has about 3000
rows in it, while the LIST table has about 6 rows.
Mike
On Mon, Mar 3, 2008 at 3:32 PM, Mike McGonagle [EMAIL PROTECTED] wrote:
Hello all,
I was working with some queries last night, and ran accross something that
I
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dennis Cote
Sent: Monday, March 03, 2008 4:17 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Can I automatically create a 'disambiguation' number
in a second field of a primary key?
On Mon, Mar 3, 2008 at 12:59 PM, Andreas Kupries
[EMAIL PROTECTED] wrote:
Is the database file by chance in a NFS mounted directory ?
That was it. Thanks!
Sean
--
Humanity has advanced, when it has advanced, not because it has been
sober, responsible, and cautious, but because it has been
Mike McGonagle wrote:
Oh, I forgot to mention (if it matters), the MAIN table has about 3000
rows in it, while the LIST table has about 6 rows.
Mike
On Mon, Mar 3, 2008 at 3:32 PM, Mike McGonagle [EMAIL PROTECTED] wrote:
Hello all,
I was working with some queries last night, and
I'm sure the real experts will chime-in, but it looks like you might be
executing the subquery once for every row in main.
Maybe if you use a join, it would go faster
select
L.data
from
list L, main m
where
m.name='something'
and L.mid = m.id;
Or, maybe you could just use
Scott Baker [EMAIL PROTECTED] wrote:
Mike McGonagle wrote:
-- Compound Query
SELECT data FROM LIST WHERE mid = (SELECT id FROM MAIN WHERE name =
something) ORDER BY ord;
-- Individual Queries
SELECT id FROM MAIN WHERE name = something;
SELECT data FROM LIST WHERE mid =
Hi all,
I have a setup with two databases that have tables which refer to each
other. I'd like to create triggers to handle cleanup when items are
deleted from one database that are referred to from the second
database. My attempts at doing this have all failed, either with SQL
parse errors or
I don't believe that this type of trigger is allowed.
Jeff Hamilton [EMAIL PROTECTED] wrote: Hi all,
I have a setup with two databases that have tables which refer to each
other. I'd like to create triggers to handle cleanup when items are
deleted from one database that are referred to from
Thanks for everybody's input, I will test these things out tonight...
On Mon, Mar 3, 2008 at 3:53 PM, Igor Tandetnik [EMAIL PROTECTED] wrote:
SELECT data FROM LIST l
INNER JOIN MAIN m ON l.mid = m.id
WHERE m.name = something;
The two statements are not equivalent: they produce different
Paul Hilton wrote:
Thanks for the suggestion,
However it doesn't solve my problem, perhaps because of something I failed
to say.
I am intending to use these 'Slot' numbers to schedule experiments between
talkers and listeners.
The 'Slot' refers to a time slot.
I would like the
On Mon, Mar 3, 2008 at 3:09 PM, Jeff Hamilton [EMAIL PROTECTED] wrote:
I have a setup with two databases that have tables which refer to each
other. I'd like to create triggers to handle cleanup when items are
deleted from one database that are referred to from the second
database.
I'm
Paul Hilton [EMAIL PROTECTED] wrote:
Here is the problem: I want Slot created to disambiguate the Primary Key, So
that for every value of Group the value of Slot starts at 1 and counts up.
These are two different things:
(1) Slot needs to disambiguate the PRIMARY KEY
(2) Slot needs to
Hi,
My database layer needs to support PostgreSQL, MS SQL Server and
SQLite and as much as possible I try to use the same SQL statements
without modification. I found that for some of my uses, I needed extra
functions or aliases to builtin sqlite functions and so I wrote them.
Since others may
44 matches
Mail list logo