On Feb 29, 2008, at 5:21 AM, Ken wrote:
> I wanted to find out if the following is allowed in Sqlite.
>
>sqlite3_prepare_v2
> while ( ) {
>sqlite3_step
> sqlite3_prepare_v2 --- I;m getting a segv here.
> while ( ) {
>sqlite3_step
> }
> }
>
>
> So my questin
You obviously have a set of UID's at the time of the loop, how about
creating a huge select .. from where ...IN (list_of_uids_comma_separated)?
It'll be one single query (or you can break it down into blocks of 50,
or 100, etc).
Will save the overhead of generating the queries over and over again
Store it in '-mm-dd' format, or use the julian date that's suggested at:
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
Yong Zhao wrote:
> It seems that sqlite3 does not support DATETIME data type.
>
> If I have the following data in table t1, how do I select people who is
> older
Here's two suggestions. First the simple suggestion is instead of this..
for (z=0;z wrote:
> Folks.
>
> Looking for some advice from hardened SQliters...
>
> ...
For each twig we have to find all the leaves. The Leaves table has
> maybe 15000 records and we have a query where we search the Le
I apologize if this is a double-post; I just got approved for the mailing
list, and I can't find the older message in the archives, so I'm reposting
it.
I have a table with two columns, the first with a string and the second with
an integer.
Given a set of input strings, I want to perform this o
"Yong Zhao" <[EMAIL PROTECTED]> wrote
in message
news:[EMAIL PROTECTED]
> It seems that sqlite3 does not support DATETIME data type.
>
> If I have the following data in table t1, how do I select people who
> is older than certain date?
>
> create table t1(dob text, name text);
> insert into t1('11/
Thanks John & Dennis;
Looks like I am getting ahead of myself here. I'm just doing a simple
PIM app as a BASH script that uses SQLite to store data. Probably I
can't do this in a script as you could in C.
I find the formating of the text from a file is not saved if I read it
and insert it into
Hi All,
The same problem that I had one of linux server and this server didn't have the
sqlite3 So I couldn't run command sqlite3 :memory to check for the sqllite
version. On this server it has only the sqlite library which is
libsqlite3.so.0.8.6. The question is how to check the sqlite version
Friday, February 29, 2008, 8:29:16 AM, you wrote:
YZ> It seems that sqlite3 does not support DATETIME data type.
YZ> If I have the following data in table t1, how do I select people who is
YZ> older than certain date?
YZ> create table t1(dob text, name text);
YZ> insert into t1('11/12/1930', 'La
Try using the Sqlite date functions.
Yong Zhao wrote:
> It seems that sqlite3 does not support DATETIME data type.
>
> If I have the following data in table t1, how do I select people who is
> older than certain date?
>
> create table t1(dob text, name text);
> insert into t1('11/12/1930', 'Larr
I could swear I've done this type of thing before and am sure I'm
overlooking something simple.
Is this correct syntax?
SELECT im.invoice_date as invoice_date,im.pay_by as
due_date,im.invoice_id as invoice_id, im.invoice_number as
invoice_number,im.invoice_date as created,im.status as status,
im.
On 28-Feb-2008, at 1:29 PM, Yong Zhao wrote:
> It seems that sqlite3 does not support DATETIME data type.
>
> If I have the following data in table t1, how do I select people who
> is
> older than certain date?
Use -MM-DD instead of M/D/Y. Available formats described here
under Time Strin
Folks.
Looking for some advice from hardened SQliters...
- Our application uses an SQLite 3.4.1 database with 8 tables. 1 of
the tables may contain tens or maybe hundreds of thousands of records
with about 30 fields.
- The tables form a linked tree type hierarchy where one table is the
trunk
I wanted to find out if the following is allowed in Sqlite.
sqlite3_prepare_v2
while ( ) {
sqlite3_step
sqlite3_prepare_v2 --- I;m getting a segv here.
while ( ) {
sqlite3_step
}
}
So my questing is, does sqlite allow a prepare to be started while a p
It seems that sqlite3 does not support DATETIME data type.
If I have the following data in table t1, how do I select people who is
older than certain date?
create table t1(dob text, name text);
insert into t1('11/12/1930', 'Larry');
insert into t1('2/23/2003', 'Mary');
select * from t1 where dob
On Thu, Feb 28, 2008 at 9:22 AM, Mahalakshmi.m
<[EMAIL PROTECTED]> wrote:
>
>
> Hi,
> My table looks like:
> IdName
> 1 1aaa
> 2 01345
> 3 1asdf
>
> I want to bind unsigned short as text. i.e, If the Unsighed short i
[resending, with small clarification edits, since I didn't see it,
probably because I wasn't yet subscribed, I hope it won't appear twice]
Hello,
I'm using sqlite 3.3.8 under linux (mandriva 2007.1).
Maybe it's something that's not advisable (I don't know) but in my
program I have various threads
On Thu, Feb 28, 2008 at 11:48 AM, Lars Aronsson <[EMAIL PROTECTED]> wrote:
> Gilles Ganault wrote:
>
> > But then, how many people use SQLite to handle 68 milions rows
> > in a table?
I've got 60 million in one table, and this is with an sqlite2
database. Works just fine, BTW.
Derrell
Simon Davies
<[EMAIL PROTECTED]> wrote:
> You need a placeholder in the SQL in order to bind a value.
>
> "SELECT id, Name FROM MUSIC WHERE Name >= '?' LIMIT 1;",
'?' is a string literal consisting of a single question mark character -
_not_ a parameter placeholder. You want ? without quotes.
I
Gilles Ganault wrote:
> But then, how many people use SQLite to handle 68 milions rows
> in a table?
That's a good question. I don't know. And I don't know if there
is a recommended size for SQLite databases. But I was able to
create the index in 12 minutes after I set the right cache_size.
On 28-Feb-2008, at 6:22 AM, Mahalakshmi.m wrote:
> if ( sqlite3_prepare(gpst_SqliteInstance,"SELECT id, Name FROM MUSIC
> WHERE
> Name >= '%d%c' LIMIT 1;",-1,&pst_SearchPrepareStmt,0)!= SQLITE_OK)
That's not what a bind point looks like. Take a look here:
http://www.sqlite.org/c3ref/bind_blob
On 2/28/08, John Elrick <[EMAIL PROTECTED]> wrote:
> I've poked around the SQLite website and found nothing really definitive
> so I am asking here.
>
>
> At one point, the FTS3 extension was listed on the download page,
> however, it is not any longer. Based on a few Google hits, I attempted
>
You misunderstand binding. You use it like this -
sql - "SELECT name FROM customers WHERE cust_id = ?";
this_cust_id - "CUST1275";
sqlite3_prepare_v2(...);
sqlite3)bind_text(..., 1, this_cust_id, ...);
You bind a value to the data represented by the ?. Then you reuse the
compiled
Just get a pointer to the data in the file and the number of bytes and
use the sqlite API call to transfer it into the DB. You can get the
pointer by either reading the file into local memory or by mmap'ing it.
Also look at the API calls which let you process a blob in chunks.
A BLOB is call
On Feb 27, 2008, at 7:35 PM, Mike McGonagle wrote:
> Wow, Peter, didn't expect that anyone would go to the trouble of
> writing a
> program on the spot
I didn't. :-) That was just a snippet of something I wrote for myself
when I first started playing with SQLite.
> Just curious, but fro
Rather than doing malloc you can mmap the file and then copy it into the
blob.
Peter A. Friend wrote:
> On Feb 27, 2008, at 4:48 PM, Mike McGonagle wrote:
>
>> Hello all,
>> I was hoping that someone might share some tips on working with
>> Blobs? I
>> would like to be able to store some image
You need a placeholder in the SQL in order to bind a value.
The following is untested but shows the sort of approach...
Unsigned char u8_ClassificationCode=1;
Unsigned short u16_Input=0x0061;
if ( sqlite3_prepare(
gpst_SqliteInstance,
"SELECT id, Name FROM MUSIC WHERE Name >= '?'
Sqlite does not have a built in procedural language like PL/SQL. For
certain applications we just added Javascript to cover that requirement.
It was straightforward using Spidermonkey and had the advantage of
being the same language used by the AJAX applications backended by
Sqlite so applic
Mahalakshmi.m
<[EMAIL PROTECTED]>
wrote:
> I want the statement to be like:
>
> "SELECT id, Name FROM MUSIC WHERE Name >= '1a' LIMIT 1;"
>
> But using prepare I could not able to get the desired statements.
>
> I want to bind unsigned short as text.
There are no parameters in your statement. What
Fred J. Stephens wrote:
> For instance, how can I store a file in a table?
> Not read the file and store the text, but the binary file itself?
Fred,
You can't do anything with the contents of a file until you read in into
memory.
To store a 1MB file in a database you need to decide if you will
I've poked around the SQLite website and found nothing really definitive
so I am asking here.
At one point, the FTS3 extension was listed on the download page,
however, it is not any longer. Based on a few Google hits, I attempted
an experiment to see if it was included in the amalgamation.
Neville Franks wrote:
> I want to insert a row if its key clm doesn't exist otherwise update
> it. I can search for the row and then do either an insert or update
> accordingly. However I was wondering whether the SQLite Conflict
> Resolution: INSERT OR REPLACE would be more efficient (faster). The
Hi,
My table looks like:
IdName
1 1aaa
2 01345
3 1asdf
I want the statement to be like:
"SELECT id, Name FROM MUSIC WHERE Name >= '1a' LIMIT 1;"
But using prepare I could not able to get the desired
your code worked perfectly, thx once more!
vl.pavlov wrote:
>
> thank u very much,
>
> i'll try :)
>
>
>
> Dennis Cote wrote:
>>
>> vl.pavlov wrote:
>>> hello & thanks 4 reply
>>>
>>> ok, i think i understand,
>>> i would like that you, if not prob., write the whole solution once with
>>
34 matches
Mail list logo