Re: [sqlite] regarding internal design of SQLite

2008-07-08 Thread Nicolas Williams
On Tue, Jul 08, 2008 at 07:44:03PM -0400, Alex Katebi wrote: > No I don't mean offline use. I mean it would be nice to have links on the > sqlite.org for all documents and resources. I thought there was: http://sqlite.org/docs.html (which is linked to from the home page). Nico -- _

Re: [sqlite] regarding internal design of SQLite

2008-07-08 Thread Alex Katebi
No I don't mean offline use. I mean it would be nice to have links on the sqlite.org for all documents and resources. On Tue, Jul 8, 2008 at 1:42 PM, Mihai Limbasan <[EMAIL PROTECTED]> wrote: > Alex Katebi wrote: > > Is there any way to get to all of these docs you mentioned from the home > > pag

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Dennis Cote
Andrea Connell wrote: > > I am still holding a shred of hope for a trigger that can > recreate the view whenever the questions table is modified > I wouldn't hold much hope for that. Triggers can only execute insert, update, delete, or select SQL statements. There is no way to execute a creat

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Tom Epperly
Using Mihai's suggestion, I determined the list of options turned on for -O2 that aren't turned on for -O. Trying each of the additional flags one by one showed that only -finline-small-functions causes the bug to appear. Here is sqlite3 compiled with '-g -O2 -fno-inline-small-functions". $ ma

Re: [sqlite] Clear Screen Command

2008-07-08 Thread Fred J. Stephens
Mihai Limbasan wrote: > I don't think it's too OS-specific - I think it's really outside the > scope of the sqlite3 shell. The shell is really not intended to be a > presentation layer, it's supposed to be a demo application, debugging > helper, and quick-and-dirty manipulation tool. If a clear

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Harold Wood
if sqlite supported the pivot command   Woody --- On Tue, 7/8/08, Andrea Connell <[EMAIL PROTECTED]> wrote: From: Andrea Connell <[EMAIL PROTECTED]> Subject: Re: [sqlite] View with Dynamic Fields ? To: "General Discussion of SQLite Database" Date: Tuesday, July 8, 2008, 3:27 PM Thanks Chris

Re: [sqlite] Clear Screen Command

2008-07-08 Thread Samuel Neff
I've wished there was a ".clear" command often. And I'm sure it's much easier to implement than output coloring. :-) Sam - We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in the Washington D.C. Contact [EMA

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Igor Tandetnik
Andrea Connell <[EMAIL PROTECTED]> wrote: > Here is the view I have come up with so far, which would require > editing whenever an insert or delete is done on tblQuestions. > > CREATE VIEW allanswers as > SELECT applicantid, > (select answer from tblanswers Z where questionid = 1 and >

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Nicolas Williams
On Tue, Jul 08, 2008 at 09:09:05AM -0700, Andrea Connell wrote: > I'm not sure if what I want is possible to do in SQL, but I -am- sure > that one of you will know. > Given two tables - one with questions to ask applicants and one with an > applicant's answer to a particular question - I want to m

Re: [sqlite] Clear Screen Command

2008-07-08 Thread Mihai Limbasan
Keith Goodman wrote: My guess is that that is too OS specific to add to sqlite. If you are using linux you could try control-l to clear the screen. I don't think it's too OS-specific - I think it's really outside the scope of the sqlite3 shell. The shell is really not intended to be a present

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Andrea Connell
Thanks Chris & Dennis for the group_concat tip... It is an interesting idea but I don't think it makes sense to use this time. If I have to parse the results in my code, I might as well just get the answers in separate rows and group them together in code without having to worry about returning v

Re: [sqlite] Clear Screen Command

2008-07-08 Thread Keith Goodman
On Mon, Jul 7, 2008 at 7:07 PM, Akbar Anderson <[EMAIL PROTECTED]> wrote: > Is there a command to clear the screen, or will there be one? > when line wrapping happens at the bottom of the screen, it looks as > if it wraps over on the same line. just would like to see a .clear > or .windex command.

[sqlite] Clear Screen Command

2008-07-08 Thread Akbar Anderson
Is there a command to clear the screen, or will there be one? when line wrapping happens at the bottom of the screen, it looks as if it wraps over on the same line. just would like to see a .clear or .windex command. thanks ___ sqlite-users mailing

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread cmartin
This gives the same result set you got and does not need to be edited: select applicantid, group_concat(answer, '|') from (select applicantid, answer from tblanswers order by questionid) group by applicantid; The group_concat() function is part of recent versions of SQLite. It i

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Dennis Cote
Andrea Connell wrote: > > I want one row with all answers for an applicant, and I want it to work > for an arbitrary number of rows in tblQuestions or be able to update > itself on an insert or delete. Any ideas? > If you want each answer in it's own column, I don't think it can be done without

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Andrea Connell
Harold Wood wrote: >my approah would be a table for applicants, then the table for answers would have the applicantid and the questionid as well as the answer. > >CREATE TABLE tblApplicants (applicantid int, applicantname varchar(100)); >now just do a select joining the tables > >select ap.applic

Re: [sqlite] Date and time in RFC 822

2008-07-08 Thread Dennis Cote
Wojciech wrote: > I would ask, if there is any possibility to sort data in sqlite tables by > date, which is stores in RFC 822 format. I have data in this format, which > comes from RSS channels - in RSS specification RFC 822 it's required. > > Sample date looks like that: Sat, 07 Sep 2002 00:00:0

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Mihai Limbasan
Tom Epperly wrote: > [EMAIL PROTECTED]/tmp/sqlite-amalgamation-3.5.9]>gcc --version > gcc (Debian 4.3.1-4) 4.3.1 > Copyright (C) 2008 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A

[sqlite] Date and time in RFC 822

2008-07-08 Thread Wojciech
Hi, I would ask, if there is any possibility to sort data in sqlite tables by date, which is stores in RFC 822 format. I have data in this format, which comes from RSS channels - in RSS specification RFC 822 it's required. Sample date looks like that: Sat, 07 Sep 2002 00:00:01 GMT I tried with s

Re: [sqlite] regarding internal design of SQLite

2008-07-08 Thread Mihai Limbasan
Alex Katebi wrote: > Is there any way to get to all of these docs you mentioned from the home > page of the sqlite.org? > Thanks, > -Alex You mean, for offline use? If yes, then I'd click on Download, then scroll down to Documentation, then I'd clock on sqlite_docs_3_5_9.zip: http://sqlite.org/sq

Re: [sqlite] regarding internal design of SQLite

2008-07-08 Thread Alex Katebi
Is there any way to get to all of these docs you mentioned from the home page of the sqlite.org? Thanks, -Alex On Tue, Jul 8, 2008 at 2:31 AM, Roger Binns <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Aditya Bhave (adbhave) wrote: > > I am interested in learnin

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Shane Harrelson
I'm not a very knowledgeable on Debian distributions, but http://packages.qa.debian.org/g/gcc-4.3.html indicates that gcc (Debian 4.3.1-4) which you posted that you are using was only made available 2008-07-01, is marked as "unstable", and hasn't even made it to their testing stage yet. Is there a

[sqlite] multithreaded app and reload from disk for second db handle?

2008-07-08 Thread xu123
hi, Despite the threads-are-evil claim... What happens with respect to the page cache if I have an application (= one multi-threaded process) opening two DB handles (sqlite3_open()) - one DB handle dedicated to one thread. Do multilpe db handles in the same process cause sqlite to reload th

Re: [sqlite] View with Dynamic Fields ?

2008-07-08 Thread Harold Wood
my approah would be a table for applicants, then the table for answers would have the applicantid and the questionid as well as the answer.   CREATE TABLE tblApplicants (applicantid int, applicantname varchar(100));   now just do a select joining the tables   select ap.applicantname, qu.question,

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Tom Epperly
Shane Harrelson wrote: > Try > make CFLAGS="-g -O2 -fno-fast-math" > and see if that fails like your test case 2. I *think* this will turn on > the -O2 optimizations and disable fast-math. > Other than that, I don't have any other suggestions. > Thanks for the suggestion. The results are belo

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Shane Harrelson
Try make CFLAGS="-g -O2 -fno-fast-math" and see if that fails like your test case 2. I *think* this will turn on the -O2 optimizations and disable fast-math. Other than that, I don't have any other suggestions. HTH. -Shane On 7/8/08, Tom Epperly <[EMAIL PROTECTED]> wrote: > > Shane Harrelson wr

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Tom Epperly
Shane Harrelson wrote: > You can find the same issue reported for Fedora from a few weeks ago: > > http://www.sqlite.org/cvstrac/tktview?tn=3186 > > Here's the original thread from the mailing list discussion: > > http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-dev/2008-June/000172.html > > -

[sqlite] View with Dynamic Fields ?

2008-07-08 Thread Andrea Connell
I'm not sure if what I want is possible to do in SQL, but I -am- sure that one of you will know. Given two tables - one with questions to ask applicants and one with an applicant's answer to a particular question - I want to make a flattened view with all of an applicant's answers in one row. This

Re: [sqlite] Bad UPDATE Problems in Mobile6 device

2008-07-08 Thread Bob Dennis
I can also get it to work with a small application on my machine, against the same database/table. Also it works sometimes in the main application. I thought I had it working last night but it was just a fluke compile success I think. I suspect it might be the size of the application that is causi

Re: [sqlite] Setting empty blob data (not NULL)

2008-07-08 Thread D. Richard Hipp
On Jul 8, 2008, at 11:21 AM, John Petrangelo wrote: > I am using the C/C++ API for sqlite. I am using sqlite3_bind_blob() to > insert data into the DB. The call typically looks like the following: > > > >rv = sqlite3_bind_blob(pStmt, 3, pBuffer, bufLen, > SQLITE_TRANSIENT); > > > > For my p

[sqlite] Setting empty blob data (not NULL)

2008-07-08 Thread John Petrangelo
I am using the C/C++ API for sqlite. I am using sqlite3_bind_blob() to insert data into the DB. The call typically looks like the following: rv = sqlite3_bind_blob(pStmt, 3, pBuffer, bufLen, SQLITE_TRANSIENT); For my purposes, I prefer that these empty blobs be stored in the DB as "" (i

Re: [sqlite] Bad UPDATE Problems in Mobile6 device

2008-07-08 Thread Harold Wood
similar statements work fine on my pda, ipaq 210 with min mobile6.  can you paste your code? --- On Tue, 7/8/08, Bob Dennis <[EMAIL PROTECTED]> wrote: From: Bob Dennis <[EMAIL PROTECTED]> Subject: Re: [sqlite] Bad UPDATE Problems in Mobile6 device To: sqlite-users@sqlite.org Date: Tuesday, July

Re: [sqlite] How can i use sqlite's fts3 to support full text search of gb2312(chinese)?

2008-07-08 Thread Dennis Cote
wenhm wrote: > Anyone can give me a hint, thanks so much. Hint: Read http://www.sqlite.org/cvstrac/wiki?p=FullTextIndex and search the archives. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailma

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Shane Harrelson
You can find the same issue reported for Fedora from a few weeks ago: http://www.sqlite.org/cvstrac/tktview?tn=3186 Here's the original thread from the mailing list discussion: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-dev/2008-June/000172.html -ffast_math was the culprit in this ca

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread D. Richard Hipp
On Jul 8, 2008, at 1:13 AM, Cory Nelson wrote: > On Mon, Jul 7, 2008 at 9:06 PM, Shane Harrelson <[EMAIL PROTECTED]> > wrote: >> Make sure SQLite isn't being compiled with -ffast_math on the the >> Debian >> side. That might cause problems. > > -ffast-math would not cause sqlite to bug out l

Re: [sqlite] Bad UPDATE Problems in Mobile6 device

2008-07-08 Thread Bob Dennis
Bob Dennis wrote: > > I have tried with and without the single quotes(Saw them in an example > somewhere), > makes no difference(Why do I not get an error if it is wrong?) > Yes I want to set all flags in this VERY SIMPLE test , just to get > something to happen. > > Can things be left in a loc