All,
In the link mentioned it says: "If the largest ROWID is equal to the
largest possible integer (9223372036854775807 in SQLite version 3.0.0
and later) then the database engine starts picking candidate ROWIDs at
random until it finds one that is not previously used". I want to
understand the alg
On Mar 11, 2008, at 7:36 AM, [EMAIL PROTECTED] wrote:
>
>
> I'm trying to get the concat operator to work with my user-defined
> function. This works fine:
>
> SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM Employees
>
> But this doesn't work:
>
> SELECT FORMAT_DATE(login_time)
Yes, this works fine. I get three columns: login date, empty
column, login time
Quoting Stephen Oberholtzer :
> On Mon, Mar 10, 2008 at 7:36 PM, wrote:
>>
>>
>> I'm trying to get the concat operator to work with my
user-defined
>> function. This works fine:
>>
>> SELECT UPPER
Sorry, I forgot to answer your question about using other Sqlite
built-in functions for date and time. I need my own custom version
because my database dates can be stored as either a double value (OLE
Date scheme) or as text representation. My custom functions can also
accept a format templ
Here is what the code does. I set up the UDF after I open a file,
like this:
� sqlite3_create_function( pDb, "format_time", -1,
SQLITE_UTF16, 0, format_time, 0, 0 );
The format_time function formats the time according to a template and
calls sqlite3_result_text16, like this:
sqlit
Thanks Tom. Yes, I have tried that. The function definitely
returns a valid string.
Quoting BareFeet :
> Hi Brett,
>
>> I'm trying to get the concat operator to work with my
user-defined
>> function. This works fine:
>>
>> SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM
Em
Hello drh,
Monday, March 10, 2008, 8:50:54 PM, you wrote:
dhc> "software.simian" <[EMAIL PROTECTED]> wrote:
>>
>> Just step-in; I'm studying the sqlite code and it would be easier if I could
>> see the internal in action.
>>
dhc> * Compile with -DSQLITE_DEBUG=1
dhc> * PRAGMA vdbe_trace=O
Hello
I'd like to save the output of SELECT into a tab-delimited text
file, and noticed that there are two commands that seem to do the same
thing:
sqlite> .mode tabs
sqlite> .separator \t
sqlite> .output myfile.tsv
sqlite> select * from mytable;
sqlite> .exit
What's the difference betwe
On Mon, Mar 10, 2008 at 7:36 PM, <[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to get the concat operator to work with my user-defined
> function. This works fine:
>
> SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM Employees
>
> But this doesn't work:
>
> SELECT FORMAT_DATE(login_
Hi Brett,
> I'm trying to get the concat operator to work with my user-defined
> function. This works fine:
>
> SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM Employees
>
> But this doesn't work:
>
> SELECT FORMAT_DATE(login_time) || ' ' || FORMAT_TIME(login_time)
> FROM Session
<[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> I'm trying to get the concat operator to work with my user-defined
> function. This works fine:
>
> SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM Employees
>
> But this doesn't work:
>
> SELECT FORMAT_DATE(login_time) || ' '
Tuesday, March 11, 2008, 11:10:03 AM, you wrote:
ss>> I am trying to setup a very basic system for just tracing the sqlite
ss> code,
ss>> but I didn't have any luck.
ss>> Code::Blocks compiles everything, but when it comes to tracing, it
ss> traces
ss>> even through comments.
ss>> Eclipse CDT inc
Hi John,
Tuesday, March 11, 2008, 11:51:57 AM, you wrote:
JS> Neville Franks wrote:
>> Hi John,
>>
>> Tuesday, March 11, 2008, 10:18:30 AM, you wrote:
>>
>> JS> Neville Franks wrote:
>>
Tuesday, March 11, 2008, 8:48:05 AM, you wrote:
JAK> On Tue, Mar 11, 2008 at 08:37:27AM +1100,
The problem appears to be in your function. Post the code for it.
[EMAIL PROTECTED] wrote:
>
> I'm trying to get the concat operator to work with my user-defined
> function. This works fine:
>
> SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM Employees
>
> But this doesn't work:
Neville Franks wrote:
> Hi John,
>
> Tuesday, March 11, 2008, 10:18:30 AM, you wrote:
>
> JS> Neville Franks wrote:
>
>>>Tuesday, March 11, 2008, 8:48:05 AM, you wrote:
>>>
>>>JAK> On Tue, Mar 11, 2008 at 08:37:27AM +1100, Neville Franks scratched on
>>>the wall:
>>>
>>>
>If I use sqlite3_g
"software.simian" <[EMAIL PROTECTED]> wrote:
>
> Just step-in; I'm studying the sqlite code and it would be easier if I could
> see the internal in action.
>
* Compile with -DSQLITE_DEBUG=1
* PRAGMA vdbe_trace=ON;
* PRAGMA vdbe_listing=ON;
--
D. Richard Hipp <[EMAIL PROTECTED]>
__
I'm trying to get the concat operator to work with my user-defined
function. This works fine:
SELECT UPPER(FirstName) || ' ' || UPPER(LastName) FROM Employees
But this doesn't work:
SELECT FORMAT_DATE(login_time) || ' ' || FORMAT_TIME(login_time)
FROM Sessions
I get only the form
ss> I am trying to setup a very basic system for just tracing the sqlite
code,
ss> but I didn't have any luck.
ss> Code::Blocks compiles everything, but when it comes to tracing, it
traces
ss> even through comments.
ss> Eclipse CDT includes the sqlite3.h, and accepts the *sqlite3 pointer,
but
ss>
Hi John,
Tuesday, March 11, 2008, 10:18:30 AM, you wrote:
JS> Neville Franks wrote:
>> Tuesday, March 11, 2008, 8:48:05 AM, you wrote:
>>
>> JAK> On Tue, Mar 11, 2008 at 08:37:27AM +1100, Neville Franks scratched on
>> the wall:
>>
If I use sqlite3_get_table() and update/insert/delete one
SOLVED!
Thanks to all and expecially to Dennis
I've found MY
MISTAKE!!! :-)
My head is safe ;-)
The error was in
my_custom_function.
Inside this function I need to query the same table
to retrieve some values needed to calculate the float value.
Inside
my_custom_function I use the prepare
Neville Franks wrote:
> Tuesday, March 11, 2008, 8:48:05 AM, you wrote:
>
> JAK> On Tue, Mar 11, 2008 at 08:37:27AM +1100, Neville Franks scratched on
> the wall:
>
>>>If I use sqlite3_get_table() and update/insert/delete one of the tables
>>>in the original query, does the results set get updat
Tuesday, March 11, 2008, 9:42:37 AM, you wrote:
ss> I am trying to setup a very basic system for just tracing the sqlite code,
ss> but I didn't have any luck.
ss> Code::Blocks compiles everything, but when it comes to tracing, it traces
ss> even through comments.
ss> Eclipse CDT includes the sql
Tuesday, March 11, 2008, 8:48:05 AM, you wrote:
JAK> On Tue, Mar 11, 2008 at 08:37:27AM +1100, Neville Franks scratched on the
wall:
>> If I use sqlite3_get_table() and update/insert/delete one of the tables
>> in the original query, does the results set get updated. ie. If I
>> iterate through t
[EMAIL PROTECTED] wrote:
> I've found what's matter, but I don't understand why ?
Can you add the following line to dump the SQL string just before you
call sqlite3_exec()?
printf("%s\n", zSQL);
Now run the program with and without the commented assignment and report
the two strings back here.
I am trying to setup a very basic system for just tracing the sqlite code,
but I didn't have any luck.
Code::Blocks compiles everything, but when it comes to tracing, it traces
even through comments.
Eclipse CDT includes the sqlite3.h, and accepts the *sqlite3 pointer, but
doesn't accept the func
[EMAIL PROTECTED] wrote:
>
> I don't know where I must crash my head :-(
>
It looks like the database is fine.
Are you certain that you are using the same database file from the
command line and in your program? Your program uses the file test.db in
the current directory when it runs (unless
I've found what's matter, but I don't understand why ?
I've tried to
use the sqlite3_mprintf() to prepare my sql.
If my numeric fValue is
integer the SQL works fine, but if I've got a floating value the sql
doesn't update the table.
And the bad is that I can get any error
I'll try to expla
On Tue, Mar 11, 2008 at 08:37:27AM +1100, Neville Franks scratched on the wall:
> If I use sqlite3_get_table() and update/insert/delete one of the tables
> in the original query, does the results set get updated. ie. If I
> iterate through the original results from sqlite3_get_table() will I
> see
If I use sqlite3_get_table() and update/insert/delete one of the tables
in the original query, does the results set get updated. ie. If I
iterate through the original results from sqlite3_get_table() will I
see the changes, or do I need to run the sqlite3_get_table() query
anew?
If I do see the ch
>The code looks OK except for the typo (i.e. sPre[2048[ should be
>
sPre[2048]).
Yes, It's a mistype on the mailinglist, the code it's ok!
> I assume that your real table isn't named "table" since that is a
keyword.
The real table name is "inputai"
> Can you open the database
file using the s
David McDivitt <[EMAIL PROTECTED]> wrote:
> Is there a function that will return the most recent unique value
> created on the database connection similar to DB2 or NS SQL Server?
sqlite3_last_insert_rowid
Igor Tandetnik
___
sqlite-users mailing lis
David McDivitt <[EMAIL PROTECTED]> wrote:
> The database I'm reading has not been set up to collate without case.
> What functions are available? Is there a ucase or lcase such as:
>
>ORDER BY UCASE(LastName)
order by LastName collate NOCASE;
Igor Tandetnik
___
When adding a row to a table the ROWID may or may not be the highest value of
the table. This can be found with MAX(ROWID) if it is the last. Two problems:
what if not last, what if more than one thread. Is there a function that will
return the most recent unique value created on the database co
The database I'm reading has not been set up to collate without case. What
functions are available? Is there a ucase or lcase such as:
ORDER BY UCASE(LastName)
Thanks
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-
Brad Stiles wrote:
>
>
>>> I wanted to know the algorithm used by sqlite to generate the new
>>> rowid. Assume there can be N distinct rowid's possible, now insert N
>>> records, followed by random deletion of some records. Now what rowid
>>> will be assigned to a new row that is added?
>>
> > I wanted to know the algorithm used by sqlite to generate the new
> > rowid. Assume there can be N distinct rowid's possible, now insert N
> > records, followed by random deletion of some records. Now what rowid
> > will be assigned to a new row that is added?
> http://www.sqlite.org/au
Scott Baker <[EMAIL PROTECTED]> wrote:
> If a large amount of records are DELETED and
> then a VACUUM is run do the rowids change?
http://www.sqlite.org/lang_vacuum.html
"The VACUUM command may change the ROWID of entires in tables that do
not have an explicit INTEGER PRIMARY KEY."
Igor Tandetn
Igor Tandetnik wrote:
> B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
>> I wanted to know the algorithm used by sqlite to generate the new
>> rowid. Assume there can be N distinct rowid's possible, now insert N
>> records, followed by random deletion of some records. Now what rowid
>> will be ass
B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> I wanted to know the algorithm used by sqlite to generate the new
> rowid. Assume there can be N distinct rowid's possible, now insert N
> records, followed by random deletion of some records. Now what rowid
> will be assigned to a new row that is a
The journal file is created when you begin a transaction and has nothing to do
with in memory. (memory db's do not have journal files).
When your application commits the journal file is delete! This is the atomicity
part of ACID.
Verify upon exit that you are performing a commit. If your not
On Mon, Mar 10, 2008 at 11:35:23PM +0530, B V, Phanisekhar scratched on the
wall:
> All,
>
> I wanted to know the algorithm used by sqlite to generate the new
> rowid. Assume there can be N distinct rowid's possible, now insert N
> records, followed by random deletion of some records. Now wh
All,
I wanted to know the algorithm used by sqlite to generate the new
rowid. Assume there can be N distinct rowid's possible, now insert N
records, followed by random deletion of some records. Now what rowid
will be assigned to a new row that is added?
Regards,
Phanisekhar
Hi there,
I have a small issue and I was hoping that someone
might be able to point me in the right direction.
I am trying to build a C/C++ application using the
amalgamation version without having the
file.db-journal created. I am using version 3.5.3.
My understanding is that in order to do tha
Thanks Igor. That solved my problem.
>From: [EMAIL PROTECTED]
>To:
>Date: 3/10/2008 11:53:47 AM
>
>http://sqlite.org/lang_createtable.html
>Search this page for ROWID.
>Igor tandetnik
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqli
David McDivitt <[EMAIL PROTECTED]> wrote:
> The question I have is in regard to the iPhone note database. There's
> a [Note] table and [note_bodies] table. The designer should have made
> just one table since [Note] and [note_bodies] are one-to-one, but
> didn't. The [note_bodies] table has an inte
I just began using SQLite. I have an iPhone and want to write a Windows
application to edit the database. After finding the database to be SQLite and
researching SQLite, I made a good start at the application. I really like
SQLite! It's the first alternative I've seen to Microsoft Jet, which is
If your synchronization logic is sound Sqlite will not ignore inserts.
Tore Austraatt wrote:
> I find sqlite3 as the perfect choice for our embedded application - if it
> hasn't been for the
> issues concering concurrency.
> My questions are;
> 1. is the "default behaviour" from sqlite3 to si
1. Inserts are not ignored. You can ignore inserts in your app if the db is
busy/locked etc..
2. Test the return code for success/failure.
Tore Austraatt <[EMAIL PROTECTED]> wrote: I find sqlite3 as the perfect choice
for our embedded application - if it
hasn't been for the
issues concering c
Hello Shailesh,
Seems like you may be trying to put a square peg into a round hole.
Sqlite is an embedded database. Meaning it is not "distributed" as such unless
you build the distribution and 2 phase commit logic yourself.
Let me just clarify for a moment, by distributed you mean.
a. 2 dat
I find sqlite3 as the perfect choice for our embedded application - if it
hasn't been for the
issues concering concurrency.
My questions are;
1. is the "default behaviour" from sqlite3 to simply ignore inserts if
the concurrency gets to high?
2. is there anything (C API) I can do to at le
vl.pavlov wrote:
>
> i wander how to do this query:
>
> insert into tablename values ('word')
> but if does not exist the same word in other table
>
I'm not sure if this is what you are asking, but you can try this:
insert into tablename
select :word
where not exists (select word from other_t
On Mar 10, 2008, at 6:44 PM, thomas Armstrong wrote:
> Hi.
>
> I've just installed 'sqlite' (version 2.8.16) and 'sqlite-devel'
> (version 2.8.16) from RPMs on my Linux Fedora Core, but I get this
> error message when installing a software:
Looks like you need to install version 3.
Dan.
>
> --
Hi.
I've just installed 'sqlite' (version 2.8.16) and 'sqlite-devel'
(version 2.8.16) from RPMs on my Linux Fedora Core, but I get this
error message when installing a software:
--
-
gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../include
-I../../../include/sandesha2 -I.
-I/root/ins
hello once more
i wander how to do this query:
insert into tablename values ('word')
but if does not exist the same word in other table
i suppose that with combination of your answers to this and my other post
solution can be created, but i do not know how exactly :)
thanx
vl.pavlov wrote:
The problem was solved by Shibu Narayanan that gave me a link to older
versions of sqlite.
Thanks to you all for the effort.
I guess that beginners do have good luck after all.
Aharon
- Original Message -
From: "Robert L Cochran" <[EMAIL PROTECTED]>
To: "General Discussion of SQLite Data
55 matches
Mail list logo