be good enough.
Will you use FTS?
http://www.sqlite.org/cvstrac/wiki?p=FtsTwo
>Can any one help me with this. It would be really helpful to me.
>Thank You in Advance
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
) and sqlite3_finalize()?
Do you check the return code of sqlite3_close() ?
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
is is slow, just curious.
The speed very much depends on what you do with the output.
If it scrolls over a terminal, the terminal will be the
bottleneck.
It should be very fast if you redirect the output to
/dev/null.
--
( Kees Nuyt
)
c[_]
___
sqlite-users m
ma
- Do not define indexes that are seldomly used
- Try to use integers as primary key,
make it the first column,
and use the exact code
CREATE TABLE tablename (
columnname INTEGER PRIMARY KEY,
);
- Do not store data that you don't need
>Thanks in ad
On Tue, 17 Feb 2009 19:11:56 +0100, Kees Nuyt
<k.n...@zonnet.nl> wrote in sqlite-users@sqlite.org:
I'm not fond of replying to myself, but this needs some
clarification:
>- Try to use integers as primary key,
> make it the first column, << wrong
> and use the exact
make it too big. 4096 or 8192 are a good start to
experiment with.
> Unless anyone has some good ideas I might
> have to give up on Sqlite.
I'm sure you can get more performance if you tweak page_size
and cache_size with some more understanding.
Use whatever engine is best for the tas
l
http://www.sqlite.org/cvstrac/wiki
>Thank you very much
>
>Michael R
HTH
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
g more time on the
site ;)
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>Thanks very much
>
>Michael R
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
I don't advise this, it's hard to maintain.
A loadable extension is the "proper mechanism".
>-Bryan
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Sat, 28 Feb 2009 00:20:48 +0300, Alexey Pechnikov
<pechni...@mobigroup.ru> wrote:
>Hello!
>
>On Friday 27 February 2009 21:50:30 Kees Nuyt wrote:
>> A view or trigger in one database is not allowed to
>> reference tables (or other views) in other databases. T
cation do the formatting.
SQL isn't meant for presentation anyway, it's for relational
storage.
Example:
Compute the time since the unix epoch in seconds (like
strftime('%s','now') except this includes the fractional
part):
SELECT (julianday('now') - 2440587.5)*8640
e functions to return any of a
few supported formats your application can cope with.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
oogle.com/search?hl=en=SQL+join+"cheat+sheet"+sqlite
>Michael
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
--
( Kees Nuyt
)
c[_]
_
iety of clients and
>developers. Here are the top group of items I think you have missed:
[snip]
Excellent article!
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
s.
http://www.sqlite.org/lang_transaction.html
I hope this helps and I added it to the wiki FAQ:
http://www.sqlite.org/cvstrac/wiki?p=SqliteWikiFaq
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bi
t.c
>
>If somebody found it useful or good enough: Feel free to use it, change it,
>or put on wiki pages.
I added it to the Wiki :
http://www.sqlite.org/cvstrac/wiki?p=SampleCode
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-u
h
>kind of codes when using "sqlite3_prepare_v2() + sqlite3_step() +
>sqlite3_column_*()"?
Perhaps the sqlite3_get_table() API is what you are looking
for? http://www.sqlite.org/c3ref/free_table.html
>
>Kees Nuyt wrote:
>>
>> On Fri, 6 Mar 2009 02:15:10 -0800 (PST
to attach
> at least 30 db at once ?
It's in the documentation:
http://www.sqlite.org/lang_attach.html
>thanx!
>
>bax
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
ww.sqlite.org/cvstrac/wiki?p=SqliteWikiFaq
>If not,
>are there any plans to add a "check" or "test" or "fulltest" target to
>the amalgamation source?
>
>Thanks,
>
>Tim
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
OIN db2.TableTwo n ON n.MyID=d.MyID
WHERE d.Zip > 80000
ORDER BY d.Zip;
DETACH DATABASE db2;
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
mpleCode
>Thank you very much
>
>Michael
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
) VALUES (2,"");
.quit
sqlite3 database1.sdb
attach database 'database2.sdb' as db2
select .
{{results}}
.quit
Hope this helps.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
http://www.sqlite.org/lockingv3.html#how_to_corrupt
http://www.sqlite.org/cvstrac/wiki?p=DatabaseCorruption
http://www.sqlite.org/atomiccommit.html
>Thanks and regards
>
>Chaitali
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite
3.6.11.
> Thank in advance,
> JP
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
his for the Windows platform.
sqlite3.exe in a CMD window.
If I suspect the SQL is difficult enough to make typoos, I
write a script with an ascii editor.
sqlite3 test.db3 Thanks.
>
>Jonathan
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sq
y Shower|Carrot Cake
9|2|The Jacket|
10|2|The Chinese Restaurant|
11|2|The Phone Message|
12|2|The Apartment|
13|2|The Stranded|Cinnamon Bobka
14|2|The Statue|
#
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite
'||
> CAST((intIP & 65280) >> 8 AS text)||'.'||
> CAST((intIP & 255) AS text) AS strIP
> FROM IP_table;
Cute code, thanks.
The implementation of BitAnd and ShiftRight in the
SQLite VM (~line 10176 in the amalgamated sqlite.c)
is very straightforward and should be pretty fast.
&g
in mind all the comments about single quotes.
>
>A bit more information though. Is there a term for
>that type of SELECT statement?
See above.
>Thanx,
>Dp.
HTH
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
;
Which when enabled allows you to UPDATE or
DELETE against the sqlite_master table.
==
Using this PRAGMA, you can UPDATE the sql column in the
sqlite_master table. Of course this is undocumented and
unsupported, and you risk corru
mary key on a text column) that
won't make a difference, I think.
>thank you
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
ite3 test_41.db3 .dump >t41
# diff t38 t41
>Thanks,
>Ev
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
synchronous=off (only during loading)
By the way, INTEGER PRIMARY KEY is faster than a TEXT column
(VARCHAR is also TEXT) as primary key.
>thnx
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
nfo on http://www.sqlite.org/ about
architecture and optimization.
> 3. Are there any ways to compress db files in disk (for
> free) and then is sqlite able to still get to the data
> easily?
Donald already gave a good answer to that question.
> Thank you!
--
( Kees Nuyt
)
c[_]
gt;> Apart from the sqlite command line tool, I can recommend
>> the source of fossil, which does all its magic around a
>> SQLite database:
>> http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki
>>
>> Also, there is some code in the SQLite wiki:
>> http://www
size I would start
with the maximum page_size allowed, that is 32768 bytes.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
SD) I have
no idea what else can be done to improve performance.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
6.11 and 3.6.12 (e.g. checkin 6341
http://www.sqlite.org/cvstrac/chngview?cn=6341 ).
The effect would be that often used pages (like non-leaf
index pages) are retained, which could reduce I/O.
>Also, you might consider going 64-bit.
--
( Kees Nuyt
)
c[_]
m for OS
diskbuffers.
> I will try out with PostGres and report back on what I get.
I'm curious.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
/cvstrac/wiki?p=SampleCode
we already have.
I feel tempted to put it in the wiki
http://www.sqlite.org/cvstrac/wiki
under the 'Hints For Using SQLite More Effectively' heading,
as http://www.sqlite.org/cvstrac/wiki?p=SimpleCode.
Would you mind if I do?
--
( Kees Nuyt
)
c[_]
___
;
>
>
>
>
>___
>
>sqlite-users mailing list
>
>sqlite-users@sqlite.org
>
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>___
d everyone who contributed to this great peace of
>software.
+1
>Thanks and best regards,
>
>Günter
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Wed, 25 Mar 2009 18:47:14 -0600, Dennis Cote
<r.dennis.c...@gmail.com> wrote:
>Kees Nuyt wrote:
>>
>> This seems a very nice addition to the
>> http://www.sqlite.org/cvstrac/wiki?p=SampleCode
>> we already have.
>>
>> I feel tempted to put it in th
e absolute path), but I guess you are aware of
that :)
>Can someone help me?
>
>Regards,
>Jonas
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Fri, 27 Mar 2009 18:08:13 +0100, Kees Nuyt
<k.n...@zonnet.nl> wrote:
> PRIMARY KEY (filepathid,filename,istarget)
Oops, make that
PRIMARY KEY (pathid,filename,istarget)
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sql
lve it in the host language, which is what I would
do. Actually, OP's original:
sqlite3 db 'select * from foo order by field desc; '|cat -n
is pretty good.
Oh, well, there are 11 roads to Rome :)
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing
syntax
6MATCH reserved for user C function match()
6REGEXP reserved for user C function regexp()
7ANDboolean (logical) AND
8OR boolean (logical) OR
(Note to the SQLite developers: I could put this in the wiki
but it might be better to update the
http://www.sqlite.org/lang_expr.html#binaryops page itself)
> Again sorry for the post.
No problem.
>Dp.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
t;
>sqlite3_exec(db, zSQL, 0, 0, 0);
>sqlite3_free(zSQL);
Two common optimizations:
1) Wrap the INSERT statements in a transaction
while not EOF on input file
BEGIN
loop 1 times or EOF
ed this, as now even the
>original system no longer shows this effect, but it's very probably
>not SQLite.
>
>Best regards,
>
>Günter
Ok, I'm glad it works for you.
Thanks for letting us know.
--
( Kees Nuyt
)
c[_]
___
sqlit
a while, but if it's your personal system
it won't hurt anybody.
>Thanks!
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
e they getting slower the
>further I go? And why are the updates so slow?
>
>Is it because the database file is too big?
>
>Any help or suggestions would be highly appreciated!
>
>Regards,
>
>Flo
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
esn't tell anything about the average
percentage of payload in database pages, which would be
another reason to vacuum.
For a full analysis, you'd have to run the sqlite3_analyzer
program, or incorporate part of its code in your
application.
--
( Kees Nuyt
)
c[_]
___
Does the same SQL work correctly from the command line tool?
It is not very common to drop a table when data changes,
usually the schema is stable and rows are inserted into and
deleted from tables, or column values changed.
It might indicate a flaw in your
For a normal application, you wouldn't have to drop tableB,
but just insert / delete rows.
What are you trying to accomplish?
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
ng else, start with:
http://www.sqlite.org/sitemap.html
>Cheers,
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
this DB?
Roger Binns is right. Just another hint:
Search for "adjacency model" and "nested set", which are the
two most common models.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
the optimum for your environment and
application.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
@hwaci.com>
Date: Mon, 20 Apr 2009 06:53:37 -0400 :
http://wiki.tcl.tk/21708
>They're very nice :)
>
>Cheers,
>Andrey
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
cross Attached
Databases (2008-01-24 11:56:16 UTC).
Cheers,
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
ix systems
> - I don't know if Control-D works on windows)
Control-D doesn't work in sqlite3.exe on windows, Control-C
does, both in the windows shell (CMD.EXE) and in msys
(mingw32) bash.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
or.
On Unix the Control-D by itself is enough.
>Pavel
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
;out that "database disk image is malformed".
> Is there any command to check if the index
>or database in good condition.
PRAGMA integrity_check;
http://www.sqlite.org/pragma.html#debug
>Thanks,
>JP
--
( Kees Nuyt
)
c[_]
___
sql
re right, it doesn't make sense.
@Joannek: When using group by, your select columns can only
use aggregate functions and the columns you group by.
Perhaps you meant to use ORDER BY here ?
>Pavel
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing
On Wed, 6 May 2009 00:40:22 -0500, "Jay A. Kreibich"
<j...@kreibi.ch> wrote:
>On Tue, May 05, 2009 at 11:46:38PM +0200, Kees Nuyt scratched on the wall:
>> On Tue, 5 May 2009 16:55:42 -0400, Pavel Ivanov
>> <paiva...@gmail.com> wrote:
>>
>>
's never printed anything. I even reinstalled my os system.
>I am pretty much confused with it. Could anyone give me some advice, please?
In your shell, type:
which sqlite3
Does the result point to the result of yur compilation of
sqlite3 ?
>Thanks so much.
--
( Kees Nuyt
)
c[_]
___
m not sure what you mean here. Guessing:
To sort by the third column of your result set, use:
SELECT * FROM mytable ORDER BY name_of_third_column;
or
SELECT * FROM mytable ORDER BY 3;
>Thanks in advance.
--
( Kees Nuyt
)
c[_]
___
sqlite-users
put to stdout, so
it works like any other unix utility.
Just give it a go. Experiment.
And enjoy.
>Thanks in advance
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
arameter on the
sqlite command line? As in:
# sqlite3 my.db
See also:
http://www.sqlite.org/quickstart.html
If you leave out the databasefilename, sqlite uses an
in-memory database, which is destroyed as soon as you
leave/quit/exit the command li
On Wed, 6 May 2009 23:24:00 +0200, Daniel Wolny
<dan...@szelka.net> wrote:
>2009/5/6 Kees Nuyt <k.n...@zonnet.nl>:
>> On Wed, 6 May 2009 23:01:24 +0200, Daniel Wolny
>> <dan...@szelka.net> wrote:
>> It should be possible, sqlite sends its output to std
an SQLite
database. Very basic but fully functional nevertheless.
http://www.sqlite.org/cvstrac/wiki?p=SampleCode
Example C code for creating / writing to / reading from a
database.
>TIA,
>Nuno Magalhães
--
( Kees Nuyt
)
c[_]
___
sqlite-use
FROM tag_link
INNER JOIN app_name ON (app_name.id = tag_link.app_id)
GROUP BY tag_link.app_id;
app_name.id|app_name.app|nrtags
30|a|1
39|b|1
49|t|2
331|d|3
>The parser returns no error, only seems to freeze. Tipps, hints – all kind
>of advice.
>sincerely, ckeen
Hope this helps.
--
(
, is that the same application
('d') uses the same tag more then once. Is that on purpose?
In other words, it's not completely clear to me what you are
trying to accomplish.
>Regards,
>-steffen
>
>
>Kees Nuyt wrote:
>>
>> On Sun, 10 May 2009 13:51:29 -0700 (PDT), ck
par = $this->prepare($sql);
if (is_array($parlist)){
/* we got a text array with params */
foreach ($parlist as $aval){
$stpar->execute(array(':jobid' =>
$jobid, ':partx' => $aval));
}
} else if (is_object($parlist)) {
/* we got a resultset from a query as paramlist
*/
while ($row = $parlist->fetch(PDO::FETCH_NUM)){
$stpar->execute(array(':jobid' =>
$jobid, ':partx' => $row[0]));
}
}
} else {
}
$this->commit();
/*
* ugly code to launch the dispatcher asynchronously using
* Windows schtasks.exe is left to the imagination of the reader
*/
}
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
gt;Table: task_status_log => (id, fk_task_log, status_code, time_stamp)
>
>And in psudo SQL:
>
>TRIGGER ON INSERT INTO task_log:
>BEGIN
>INSERT INTO task_fifo (fk_task_log) VALUES (NEW.id)
>END;
>
>TRIGGER ON DELETE FROM task_fifo:
>BEGIN
>
QLite sort
the resultset before it can return the first row in the
resultset. Need I say more?
http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/
s simple, but not for me.
This is an n:m relationship.
If group has more attributes (columns) than just its number,
you need a third table: person_group.
Then join person with person_group where group_id != 1;
The person_group table could be called membership, if you
like.
>Thanks in advance
&g
On Tue, 26 May 2009 14:44:25 +0800, wying wy
<joyousl...@gmail.com> wrote:
>Hi
>
>May I know if we can create index on a View?
You can't create an index on a VIEW.
A VIEW can be seen as a stored SELECT statement.
>Thanks in advance.
>wying
--
p, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
>>
>> I am using sqlite3wrapped C++ library APIs.
>>
>> Thanks and Regards,
>> Souvik
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
ine on simulator.
>
>Can anyone provide any input on this?
ASCII versus UTF-8 or UTF-16?
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
table, so you
should make (a_id,b_id) the primary key to enforce that
constraint.
>Thanks
>Ralf
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
erested in what happened to sqlite, a weekly
peek at http://www.sqlite.org/cvstrac/timeline
is worth the effort.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
;
UPDATE stock_tab SET . WHERE stock_id = 1;
if sqlite_error()
INSERT INTO stock_tab SET (...) VALUES (...);
endif
COMMIT;
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
in every INSERT
statement, which has implications for your program flow.
http://www.sqlite.org/lang_insert.html
http://www.sqlite.org/lang_conflict.html
(You probably already read those pages, I included the links
for the convenience of other readers)
>Luiz
--
( Kees Nuyt
)
c[_]
_
error message will be cleared.
You can use INSERT ON CONFLICT ABORT ... ;
Catch the constraint error, fetch the sqlite3_errmsg() and
ROLLBACK yourself.
http://www.sqlite.org/lang_conflict.html
(untested)
>Thanks in advance.
>
>Luiz
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
(
(SELECT device_id FROM registrations
WHERE mesg_token = 'aa')
, 1, 2, 2);
SQL error near line 38: 1001: Insert
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
dized).
For ease of use on platforms with a decent C++ compiler,
there are good C++ wrappers. So, there is a choice for
application development.
>I just read the Linus Torvalds comment on the C++ for Git
>What do you think?
>
>Cheers,
>Sylvain
--
( Kees Nuyt
)
c[_]
___
d why it works.
>Thanks a lot,
You're welcome, have fun.
>-B
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
;
>
>
>its showing an error near "if": syntax error
>
>
>Kees Nuyt wrote:
>>
>> On Tue, 2 Jun 2009 03:36:46 -0700 (PDT), robinsmathew
>> <robinsmat...@hotmail.com> wrote:
>>
>>>
>>>hey thanx for the reply... u leave the th
small results sets ... keep in mind, SELECT Count() in
>SQLite is not optimized.
It has recently been optimized, but only for the form:
SELECT count(*) FROM
without WHERE or LIMIT clauses.
http://www.sqlite.org/cvstrac/chngview?cn=6316
>For big result sets, I might want to ju
P
Joannek,
I think this same issue was discussed very recently in the
mailing list. You may want to consult the archives.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
ipp" <d...@hwaci.com>
Date: Fri, 15 May 2009 14:03:05 -0400
Of course you have to search the ticket database.
http://www.sqlite.org/cvstrac/search?t=1=1
Any problem ever reported is registered there.
>
>From: Kees Nuyt <k.n...@zonnet.nl>
>T
Not directly, but you can update "the tables behind" a view
with an INSTEAD OF trigger. The trigger can contain any
update statement you like.
http://www.sqlite.org/lang_createtrigger.html#instead_of_trigger
>Best regards.
>
>Frank
--
( Kees Nuyt
)
c[_]
__
M urls", NULL, NULL, );
>
>How can i save the returned result-table in a C string for further use in
>the program?
Have a look at some sample code:
http://www.sqlite.org/cvstrac/wiki?p=SimpleCode
http://www.sqlite.org/cvstrac/wiki?p=
those
constraints into TRIGGERs that implement them.
http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers
There's also a site that implements it:
http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_trigger_generator
>Simon.
--
( Kees Nuyt
)
c[_]
_
ze
- the number of INSERTs per transaction
- The schema: INDEX PRIMARY KEY on the first column
instead of a non-unique index
(if the application allows it)
- load the database in order of index(es)
Especially a non-unique index with low cardinality has a lot
ll only really help if your system has multiple
processor cores, and if the databases are each on a
different disk.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
in Emacs. There are several database
browsers for SQLite databases though, with an editable grid.
I use Sqlite3explorer, SqliteSpy and SqliteManager. The last
one is a Firefox add-on.
--
( Kees Nuyt
)
c[_]
___
sqlite-users mailing list
On Sun, 21 Jun 2009 12:44:51 -0700, Kelly Jones
<kelly.terry.jo...@gmail.com> wrote:
>On 6/21/09, Kees Nuyt <k.n...@zonnet.nl> wrote:
>> On Sun, 21 Jun 2009 10:01:22 -0700, Kelly Jones
>> <kelly.terry.jo...@gmail.com> wrote:
>>
>>>Emacs' "form
a connection open most of time.
That's a good idea, for at least two reasons:
- opening a connection has to parse the schema,
and though it's fast code, it should be avoided.
- the contents of the page cache aren't wasted,
it may be re-used by subsequent statem
rks when I execute the same request in the sqlite3 shell ...
>
>vw_last_cycles is a view listing the 10 last inserted rows of a table.
>
>any idea ?
Yes, you say you SELECT ... FROM vw_last_cycles ,
but the code above references vw_last_cycles_mapping.
&g
501 - 600 of 849 matches
Mail list logo