Re: [sqlite] retrieving data from multiple tables

2007-03-14 Thread T
Hi Kirrthana, I have created a database with four tables,i have to search and retrieve data from all the four tables based on the entry i get from the previous table and display all the entries,could anybody tell how to do it. I'm not sure what you mean. If you mean you have four

RE: [sqlite] retrieving data from multiple tables

2007-03-14 Thread Kirrthana M
I have four tables like Mytable1,Mytable2,Mytable3,Mytable4 Mytable1 and Mytable2 have one similar field rest al different, Mytable2 and Mytable3 have one similar field rest al different, Mytable3 and Mytable4 have one similar field rest al different, i have to select from four tables by matching

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-14 Thread Stef Mientki
COS wrote: Hi, - Original Message - From: "Stef Mientki" <[EMAIL PROTECTED]> To: Sent: Tuesday, March 13, 2007 3:47 PM Subject: Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT You should also consider how your change might

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-14 Thread Eric Bohlman
COS wrote: A small opinion on that matter: what I would really like to see is something like system tables. Today sqlite uses only sqlite_master to keep information about its objects and parsing is required to getter better info of each object (if one needs to). Using other system tables to keep

Re: [sqlite] FTS: index only, no text storage - Was: [sqlite] FTS: Custom Tokenizer / Stop Words

2007-03-14 Thread Ralf Junker
Scott Hess wrote: >>I am optimistic that the proper implementation will use even less than 50%: > >Indeed :-). Glad to read this ;-) >>I found that _not_ adding the original text turned out to be a great time >>saver. This makes sense if we know that the original text is about 4 times >>the

Re: [sqlite] retrieving data from multiple tables

2007-03-14 Thread T
I have four tables like Mytable1,Mytable2,Mytable3,Mytable4 Mytable1 and Mytable2 have one similar field rest al different, Mytable2 and Mytable3 have one similar field rest al different, Mytable3 and Mytable4 have one similar field rest al different, i have to select from four tables by

Re: [sqlite] retrieving data from multiple tables

2007-03-14 Thread T
Oops, I meant: CREATE VIEW MyTables AS SELECT Field1 AS MyField, otherFields1 FROM MyTable1 UNION ALL SELECT Field2, otherFields2 FROM MyTable2 UNION ALL SELECT Field3, otherFields3 FROM MyTable3 UNION ALL SELECT Field4,

RE: [sqlite] retrieving data from multiple tables

2007-03-14 Thread Kirrthana M
By getting the search string from previous table im not only retrieving data from the table4,at each step i have to retrieve data from 3 tables and store it in the data structure. -Original Message- From: T [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 3:35 PM To:

RE: [sqlite] date/time implementation question

2007-03-14 Thread Rafi Cohen
Thanks Denis for your detailed explanation. My needs differ from the example you gave. I need to compare the date on each row with the current date, if the rowdate has passed then I either insert or update this row on a specific table, otherwise I leave this row for a future check. So, the

[sqlite] results from a prepared select statement

2007-03-14 Thread Rafi Cohen
Hi, I read the documentation but still miss this, so basic information. I have a prepared select statement which should be executed in a later state using sqlite3_step in my application. For a very simple example, suppose the statement is: select * from tbl where col1 = ?. Now my question is how

[sqlite] Re: results from a prepared select statement

2007-03-14 Thread Igor Tandetnik
Rafi Cohen <[EMAIL PROTECTED]> wrote: Now my question is how do I know, after sqlite3_step, if I got results at all. sqlite3_step returns SQLITE_ROW if you got a row of results, SQLITE_DONE if no more rows, and SQLITE_ERROR in case of error. If resultset is empty, you'll just get SQLITE_DONE

[sqlite] DB recovery

2007-03-14 Thread Pavan
Hi, In a situation where if the sqliteDB gets corrupted is there a way to recover the data ? I understand that the word *corrupted* is too generic from technical point of view. But, still would like to know if anyone has faced a situation where indirect methods are used to retrieve data from DB.

Re: [sqlite] Degrouping, desummarizing or integrating headings

2007-03-14 Thread Dennis Cote
T wrote: It comes as a CSV or tabbed text file, then into a table in my database. So, it's in a table in my database, eg: CREATE TABLE Shopping_Grouped(Aisle TEXT, Product TEXT, Cost REAL) But the Aisle entries are in records by themselves, and apply to the subsequent records containing

RE: [sqlite] DB recovery

2007-03-14 Thread Griggs, Donald
Hi, Pavan, Regarding: "In a situation where if the sqliteDB gets corrupted is there a way to recover the data ? I understand that the word *corrupted* is too generic from technical point of view. But, still would like to know if anyone has faced a situation where indirect methods are used to

Re: [sqlite] date/time implementation question

2007-03-14 Thread Dennis Cote
Rafi Cohen wrote: Thanks Denis for your detailed explanation. My needs differ from the example you gave. I need to compare the date on each row with the current date, if the rowdate has passed then I either insert or update this row on a specific table, otherwise I leave this row for a future

Re: [sqlite] DB recovery

2007-03-14 Thread Pavan
Hi Donald, Thanks, that was indeed a detailed explanation. The scenrio is an embedded device with sqlite in it and user does not have direct access to the DB. So, are there any Sqlite interfaces which do the recovery job mentioned in your email ? Thanks, Pavan. On 3/14/07, Griggs, Donald

RE: [sqlite] DB recovery

2007-03-14 Thread Griggs, Donald
Regarding: "In a situation where if the sqliteDB gets corrupted is there a way to recover the data ?" "...The scenrio is an embedded device with sqlite in it and user does not have direct access to the DB. So, are there any Sqlite interfaces which do the recovery job mentioned in your

[sqlite] Link error with -DSQLITE_OMIT_TRIGGER

2007-03-14 Thread Ken
Compile error with -DSQLITE_OMIT_TRIGGER I get a link error when using: -DSQLITE_OMIT_TRIGGER === gcc -g -DSQLITE_DEFAULT_PAGE_SIZE=8192 -DSQLITE_DEFAULT_CACHE_SIZE=4000 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_AUTHORIZATION -DSQLITE_OMIT_VIRTUAL_TABLE

RE: [sqlite] date/time implementation question

2007-03-14 Thread Rafi Cohen
Dennis, I really appreciate your patience and willingness to help. Unfortunately, this still did not bring me to the expected solution. I will give you a small algorithm of what I need to do and I'm sure after this you'll know how to assist me. 1. I read a .csv file into a linked list of

Re: [sqlite] results from a prepared select statement

2007-03-14 Thread John Stanton
Rafi Cohen wrote: Hi, I read the documentation but still miss this, so basic information. I have a prepared select statement which should be executed in a later state using sqlite3_step in my application. For a very simple example, suppose the statement is: select * from tbl where col1 = ?. Now

Re: [sqlite] Link error with -DSQLITE_OMIT_TRIGGER

2007-03-14 Thread drh
Ken <[EMAIL PROTECTED]> wrote: > Compile error with -DSQLITE_OMIT_TRIGGER > > I get a link error when using: -DSQLITE_OMIT_TRIGGER > > And also from an application link: > /home/ixion/LIB/sqlite3/.libs64/libsqlite3.a(parse.o): In function > `yy_destructor': You have to pass the

Re: [sqlite] Re: Meta Information: How to retrieve the column names of a table ?

2007-03-14 Thread Stef Mientki
How can I get all the names of a table without doing a query against the table ? PRAGMA table_info(table-name); And it also works for views, as just found out by trial and error ;-) Is this standard SQL behavior ? -- cheers, Stef Mientki http://pic.flappie.nl

Re: [sqlite] date/time implementation question

2007-03-14 Thread Dennis Cote
Rafi Cohen wrote: Dennis, I really appreciate your patience and willingness to help. Unfortunately, this still did not bring me to the expected solution. I will give you a small algorithm of what I need to do and I'm sure after this you'll know how to assist me. 1. I read a .csv file into a

[sqlite] Format lf csv file RE: [sqlite] date/time implementation question

2007-03-14 Thread Rafi Cohen
Hi Dennis, the first approach is clear now and I may proceed with it. The second approach is interesting and chalenging, but leaves some issues to clarify and in case I find solutions to those issues I well may adopt it. 1. format of csv file: I have no idea how this csv file is created and which

Re: [sqlite] Format lf csv file RE: [sqlite] date/time implementation question

2007-03-14 Thread Dennis Cote
Rafi Cohen wrote: Hi Dennis, the first approach is clear now and I may proceed with it. Good to hear. The second approach is interesting and chalenging, but leaves some issues to clarify and in case I find solutions to those issues I well may adopt it. 1. format of csv file: I have no idea

Re: [sqlite] Format lf csv file RE: [sqlite] date/time implementation question

2007-03-14 Thread Clark Christensen
Hi Rafi, If it were mine to do, I would concentrate on getting the data into a table where I can work with it using SQL. It sounds like your best bet is to write some simple code to read through your CSV, validate its consistency (ignore the dates), and insert it into a table. Then use

Re: [sqlite] retrieving data from multiple tables

2007-03-14 Thread T
Hi Kirrthana, I have created a database with four tables,i have to search and retrieve data from all the four tables based on the entry i get from the previous table and display all the entries,could anybody tell how to do it. I'm not sure what you mean. If you mean you have four tables

[sqlite] Re: Re: Meta Information: How to retrieve the column names of a table ?

2007-03-14 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: PRAGMA table_info(table-name); And it also works for views, as just found out by trial and error ;-) Is this standard SQL behavior ? PRAGMA statement is not part of standard SQL. I don't believe there is a standardized way to access metadata. Every

[sqlite] to quote or not ?

2007-03-14 Thread Stef Mientki
I've a problem with finding the correct algorithm for quoting. When I've a view in the database, where 2 tables have the same field names "PatNr", doing a pragma to get the fields of the view, I get: PatNr PatNr:1 For quering the data from that view, I don't ask for the view, but generate

[sqlite] API enhancement

2007-03-14 Thread Ken
Question for the list, I'd like to optimize my code, using the following pseudo code as an example. === int i = 0 ; char str[20]; sqlite3_prepare_v2( "insert into t1 values (?,?)" ) sqlite3_bind_int ( i ) sqlite3_bind_text(str) BEGIN TRANSACTION

Re: [sqlite] Re: Re: Meta Information: How to retrieve the column names of a table ?

2007-03-14 Thread Dennis Cote
Igor Tandetnik wrote: I don't believe there is a standardized way to access metadata. Igor, The SQL:1999 and later standards define a standardized Definition Schema and Information Schema to allow users to get the meta information from a database. From the SQL:1999 standard: The views

[sqlite] Re: to quote or not ?

2007-03-14 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: So I would expect that I now can always double quote the selection fields, but unfortunately that doesn't seem to be true. From a graphical design, I get for instance: SELECT "Opnamen.PatNr", "Opnamen.Datum" Opnamen, PatNr and Datum are three separate

[sqlite] Schema

2007-03-14 Thread Shilpa Sheoran
All, Are there database schema's (eg. for Phonebook ) available on the net? Thanks Shilpa - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] database is locked error on Mac OS X

2007-03-14 Thread T
Hi Richard and Puneet, I just wanted to say thanks, and to record your combined advice that worked. Much of this may be superfluous or painfully obvious, but it worked: 1. In the sqlite-3.3.13 downloaded source directory, execute: ./configure 2. That creates a new file "MakeFile". Edit

Re: [sqlite] notice: embedded system and locked database

2007-03-14 Thread Jakub Ladman
Dne pondělí 12 březen 2007 18:04 Martin Jenkins napsal(a): > Jakub Ladman wrote: > > Problem is, that this is pretty obscure system. Renesas SuperH SH4 > > CPU Heavily patched 2.4.18 kernel. (patches will be presented on > > internet, but not at this time) Gentoo-embedded linux, based on > >