r table is large this will be a lot faster.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ond sets the encoding to its default value,
UTF-8, and shouldn't be needed. The second last (vdbe_trace) is also
setting the value to its default. Furthermore this pragma can only be
turned on in a special debug build of the sqlite dll. Increasing the
cache and page size will speed up your code safely i
m when the user
moves an item. This is somewhat like the Dewey decimal system used by
libraries to order books on shelves. Using a separate table would also
allow multiple users to each have their own preferre
you go through
with each release, but suspect that a release after each crash or
corruption bug is fixed, or new feature addition, would not be too onerous.
Dennis Cote
-
To unsubscribe, send email to [EMAIL
with statistics about your indexes which sqlite uses to select the
optimal index when it prepares a query.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ve. Th
tclConfig.sh is a shell script that will provide additional information
to locate other parts of your TCL installation (like the tcl.h header file).
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
read most of the documentation from this
script file directly, or if you have TCL installed you can probably
expand this file into the desired HTML.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
Year. ;-)
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
nd line. Note,
you must quote the command so it gets passed to sqlite as a single string.
sqlite3 newdatabase.db ".read schemafile.txt"
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ing or error and produces the correct result 4
Other than that it uses the reverse logic of my case statement. Get the
difference of the years and subtract 1 or 0 depending upon the actual date.
Dennis C
when date('2002-12-22', '+' ||
(strftime('%Y', 'now') - strftime('%Y', '2002-12-22')) ||
' years') <= date('now')
then strftime('%Y', 'now') - strftime('%Y', '2002-12-22')
else strftime('%Y', 'now') - strftime('%Y', '2002-12-22') -1
end
as age
HTH
when date(dob, '+' ||
strftime('%Y', 'now') - strftime('%Y', dob) ||
' years') >= date('now')
then strftime('%Y', 'now') - strftime('%Y', dob)
else strftime('%Y', 'now') - strftime('%Y', dob) - 1
end
as age
from t;
HTH
Dennis C
.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
://www.tcl.tk/community/tcl2004/Papers/D.RichardHipp/drh.html
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
arty tools can do).
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
extensions it should load when it opens a database.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
. This connection can batch its writes based on time as
I suggested before.
If you really need multiple writers you should probably look at a
different database engine like PostgreSQL.
Dennis Cote
-
To unsubscribe, send email
Rashmi Hiremath wrote:
Can anyone send me the code of C++ API for
SQLite3.3.8.
Check out http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers in
particular the section on C++.
I would suggest CppSQLite as it provides full access to sqlite with a
very thin interface.
HTH
Dennis Cote
t transaction open to false
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
their tables and
indexes without redundant data being stored.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
/tktnew.
SQLite should be able to execute these queries without even accessing
the Posts table itself since all the required data is available in the
index in the correct order.
Dennis Cote
-
To unsubscribe, send email
-- --
0 sqlite_autoindex_t_1 1
sqlite> pragma index_info('sqlite_autoindex_t_1');
seqno cid name
-- -- ------
0 1 b
HTH
Dennis Cote
--
@sqlite.org/msg19148.html
I believe Igor's suggestion is optimal for SQLite. It may be faster to
add a limit clause to the subquery for other database engines.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
fter I do this I get a similar unresolved external
error for _sqlite3_libversion. I'm trying to see what might be causing
this, but the generated sqlite3.lib file looks OK on first inspection.
HTH
Dennis Cote
-
To un
with Borland IMPLIB. The fix I found is
described under ticket 1291 at http://www.sqlite.org/cvstrac/tktview?tn=1291
For some reason implib doesn't generate the correct symbols when
converting directly from the dll file.
HTH
Dennis Cote
.
Normalization like this works just as well for non blob data.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
#, but that is not required to
the best of my knowledge.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
RB Smissaert wrote:
Thanks for the tip. It sounds promising and I will try that out.
Oops. I forgot to add the link
http://www.borland.com/us/products/turbo/index.html to speedup locating it.
Good Luck.
Dennis Cote
SQLite
directly, or through one of the C++ wrappers. I suspect that this will
produce an application that is about as fast a you will get for moving
data from Interbase to SQLite.
HTH
Dennis Cote
-
To unsubscribe
t; 16) +
(substr(ip, 9, 2) << 8) +
substr(ip, 12, 3)
else -- 3 digit third quad
(substr(ip, 1, 3) << 24) +
(substr(ip, 5, 3) << 16) +
(substr(ip, 9, 3) << 8) +
substr(ip, 13, 3)
end
end
end
from t;
Boy was I pissed the first time I typed that in and all I got was "SQL
error: near "when": syntax error". ;-)
FYI, this expression produces a VDBE program with 895 instructions.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
, that julian
day numbers can express dates back to 4700 BC, but Excel can't.
The testing needed to fix the dates for excel's bug only applies to
dates in the first two month of the year 1900, so it can probably be
safely skipped.
Dennis Cote
safely skip the test
and use only the later base date.
select julianday('now') - julianday('1899-12-30') as excel_date;
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
) || '-' ||
substr('00' || (cast(20061204 / 100 as integer) % 100), -2,
2) || '-' ||
substr('00' || (20061204 % 100), -2, 2)
) - julianday('1900-01-01')
as integer
) as excel_date
;
HTH
Dennis Cote
urable speed difference.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
[EMAIL PROTECTED] wrote:
Thanks , will try that.
What is as excel_date?
Is this a variable or is this jus plain SQL against SQLite?
Bart,
excel_date is just a normal SQL alias name for the complicated
expression. The string 'execl_date' will be returned as the name of this
result column.
) as excel_date
from mytable;
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
to detect if your database has been initialized
(search for previous posts).
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
atabase to hold the
table that contains the password. In any case the saved password is
available to your encrypt and decrypt functions.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
your inserts in a transaction.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
n a
database to see if the user_version has the expected value. If not you
know you have some other kind of file, if the file existed before you
did the sqlite3_open, or a newly created empty database file that needs
to be initialize
return rc;
}
This way you are sure you have all the functions registered with each
connection you use. Now you can safely execute any SQL statement. If it
causes the trigger to fire, it will have the correct user defined
functio
the bar are scattered around with different value of p.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
strftime('%H:%M', '12:00', 'localtime') < '12:00'
then strftime('-%H:%M', '00:00', 'utc')
else strftime('+%H:%M', '00:00', 'utc')
end;
When I run this here I get:
2006-11-28T10:29:51.091-07:00
Which is the correct timezone offset for MST.
HTH
Dennis C
--
To unsubscribe, send email to [EMAIL PROTECTED]
-
See this thread
http://www.mail-archive.com/sqlite-users@sqlite.org/msg14937.html for
some example programs that
it will give the
same results.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
file, which will write its output to the file testfile.txt in
the current directory (which will be C:\test\ReadCodes).
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
to produce an indented report from the tree.
Alternatively, you could create a user defined function that simply
counts the number of / separator characters in the path string to
determine the depth of a node. This would almost certainly be faster and
easier to use.
HTH
D
of such triggers.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
/pragma.html.
David,
You should create a documentation bug ticket so these things will get fixed.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
strings in your database you can do this:
select * from t where date < '2006-07-04 18:00:10';
If you store the julian day numbers in your database you can do this:
select * from t where date < julianday('2006-07-04 18:00:10');
HTH
Denni
will open (or create) the database file and then execute all the
SQL statements in the file mysql.txt.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
julianday(datestring) will return a julian
day number for a suitably formatted date string. The supported date
formats are from ISO-8601, or -MM-DD, so you will have to use substr
and concatenation (||) to rearrange your dates.
HTH
Dennis Cote
to pay the cost of the
additional storage overhead.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
a lot of potential customers
is very persuasive to a commercial enterprise.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
le has any records.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
conditions on your queries.
If your query returns a subset of the rows in a table this carefully
maintained count of all the rows in the table is useless.
Dennis Cote.
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
to matlab formats.
It also opens and closes the database file for each query which can be
expensive.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
o
prepare and execute a second count query unless the result set is very
large. With large results the execution time of the count query
dominates, and the overhead time to prepare the query becomes
insignificant. It really doesn't take that long to prepare a count query.
HTH
D
[EMAIL PROTECTED] wrote:
There is good reason for this, actually.
And that pretty definitively answers the question of whether or not this
is a bug. :-)
Dennis Cote
-
To unsubscribe, send email to [EMAIL
finalize(s);
switch (sync) {
case 0: // off
case 1: // normal
case 2: // full
}
It simply executes the PRAGMA and collects the result.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
from t;
blob
text
sqlite> select count(*) from t where cast(a as blob) = 'test';
0
sqlite> select count(*) from t where cast(a as blob) = X'74657374';
2
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
sqlite3_column_text(s, 1);
char* barval = sqlite3_column_text(s, 2);
// foo and var bound to current values
}
sqlite3_finalize(s);
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
is a unit in a traditional number
system, still widely used in India and Bangladesh, equal to a hundred
thousand. A hundred lakhs make a crore.
So Lloyd is doing 3M insert or ignores.
Lloyd,
What do you mean by "130 seconds of overhead
would be sure. :-)
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
, tblLarger.* from ...
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ction available.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
se the API
functions. You haven't said what language you are programming in.
Perhaps you need some help using the C API from your chosen language.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
s by changing the
bound value at runtime.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
for FULL synchronous operation.
The SQLITE_NO_SYNC flag is a define that can be passed to the compiler
while buiding your code. Look in your makefile or your compiler's
options setting dialog for -DSQLITE_NO_SYN
be added to the documentation.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
are using with the like operator for the
columns that you are trying to match.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ind_text(query, idx, users_album, -1, SQLITE_STATIC);
}
... // repeat for all columns
// execute the query
do {
rc = sqlite3_step(query);
if (rc == SQLITE_ROW) {
// use sqlite3_column_* to retrieve results
}
} while rc != SQLITE_DONE
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
have to do it yourself.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
sqlite> select * from t;
_
sqlite> insert into t values ('_2_');
sqlite> insert into t values ('__4__');
sqlite> select * from t;
_
_2_
__4__
sqlite>
HTH
Dennis Cote
-
To unsubscribe,
's comapre
function whenever it needs to compare two values while sorting or indexing.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ion on sqlite3_interrupt API function.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
]
-
It works from here (western Canada) at 10:45 MDT. I also see this name
resolved to IP address 62.104.138.84. It's a little slow, taking about
10 seconds to load, but not too bad.
Dennis Cote
as ();
attach database 'DB.db3' as V1;
begin;
insert into table1 select * from V1.table1;
commit;
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
of inserts it is still important to ensure
they are done inside a transaction to get good performance.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
uotes in quoted strings) that would also be a good enhancement to
sqlite. You should also submit a patch if you do this.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
don't think you can change the output handling (by
default a NULL and an empty string look the same). There would also need
to be a mechanism to set the .nullvalue string back to NULL to turn off
the input substitution.
Dennis Cote
that it does
recognize the .nullvalue string on input, and binds a null value for
that column. If you do you should submit a patch, others may find this
useful.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL
and
additional information you might want to consider. This info is at
http://www.sqlite.org/faq.html#q10
First, the maximum record size is 2^30 bytes not 2^31 bytes.
Second, only the first 31 columns of a table are are candidates for
certain optimizations.
HTH
Dennis Cote
BEGIN", NULL, NULL, NULL);
for (...) {
}
sqlite3_exec(db, "COMMIT", NULL, NULL, NULL);
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
they
appear in the create statement.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
, if it existed, would
mention this sort of detail anyway.
When all else fails, the source is the ultimate documentation. :-)
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
11 2.000 0.025 6.000
I suspect you may have trailing spaces at the ends of your lines. The
.import command isn't very smart about things like that. Your separator
is set to one space, not arbitrary whitespace. It there is another
_function(db, "point_in_rect", 6,
SQLITE_UTF8, NULL, point_in_rect, NULL, NULL);
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
sqlite_master where type = 'view';
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
.
Dennis Cote
P.S. Attaching files to email is getting to be a real pain. On my first
attempt I attached the raw text files. That message was rejected by the
qmail-send program at sqlite.org because it was too big (> 30K). My
second attempt packed all the text files into a single zip f
will be flatter than those on the inner
cylinders, but they are still definitely curved. ;-)
Of course, this doesn't apply to files stored in flash memory. Those
files are really very "flat" unless you have an electron microscope to
look at the
, not by naming the trigger in the table's create statement.
create table component(comp_id integer primary key, comp_cat text,
comp_name text);
create trigger fki_comp after insert on component begin ... end;
create trigger fku_comp after update on component begin ... end;
HTH
Dennis Cote
that want to store data using other types should use the
new
sqlite_prepare/sqlite_bind_*/sqlite_step/slite_column_*/sqlite_finalize
APIs. It is much easier than trying to undo the string conversions that
sqlite does using the old APIs.
HTH
Dennis Cote
ue.
Note that standard SQL does not reorder the limits in the between clause
if they are given in reverse order (even though it could).
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
ut the first parameter's value
is changed. The third parameter was never bound with a value, so NULL
is inserted in both rows.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
).
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
value returned by the subquery that is getting data from the view.
Given these errors, I don't think you tested the statements you posted.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
with
"begin transaction" and "end transaction" commands.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
a table listing the tables and
indexes that will be used to implement your query.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
701 - 800 of 1177 matches
Mail list logo