Re: [sqlite] select from commandprompt with output to file

2006-11-17 Thread Dan Kennedy
What sqlite versions, OS etc.? This worked for me: $ sqlite3 SQLite version 3.2.8 Enter .help for instructions sqlite create table abc(a, b, c); sqlite .output out.txt sqlite select * from sqlite_master; sqlite .quit $ cat out.txt table|abc|abc|2|CREATE TABLE abc(a, b, c) How do I do this:

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
Yes, from a DOS command shell, but when I get it working I would like to avoid the DOD box. I have been trying your suggestion in various forms, but sofar no success yet. Something is happening though, so it looks like it might work. I get various error messages: path can't be found, incomplete

[sqlite] Date and time comparison

2006-11-17 Thread Karthick V - TLS , Chennai
Hello everyone, I am trying to retrieve some records from the database using date and time comparison. The table has three columns, Row Id, Start Time and end Time. I need to get the row id for a time which falls within the start and end time. I am using this query. select RowID,

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
Latest SQLite, 2000 to XP. I have the output to text working now when I type it at the command prompt, but I now need to figure out how to do the whole sequence without any user action. I has to run from VB or maybe a VBS file or anything that can be initiated from VB/VBA. RBS -Original

[sqlite] Need help - Missing extension for native

2006-11-17 Thread Cécilia Vigny
Hi, I'm working with Php4, SQLite and ADOdb. I'm trying to open a database. See my code : $db = ADONewConnection('sqlite'); $db-debug = true; $db- connect('','','','test.sdb'); $rs = $db-Execute('select * from table_test'); print_r($rs-getRows()); The

[sqlite] Re: Date and time comparison

2006-11-17 Thread Igor Tandetnik
Karthick V - TLS , Chennai [EMAIL PROTECTED] wrote: I need to get the row id for a time which falls within the start and end time. I am using this query. select RowID, strftime('%Y-%m-%dT%H:%M:%S',starttime), strftime('%Y-%m-%dT%H:%M',endtime) from History where

RE: [sqlite] Re: Date and time comparison

2006-11-17 Thread Karthick V - TLS , Chennai
Thanks Igor. It works fine. With Regards Karthick V The secret of being miserable is to have leisure to bother about whether you are happy or not. The cure for it is occupation. George Bernard Shaw (1856-1950) -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED]

Re: [sqlite] select from commandprompt with output to file

2006-11-17 Thread Dennis Cote
RB Smissaert wrote: How would I run these 4 commands via a .bat file or via whatever means: cd c:\test\ReadCodes c:\test\Program\sqlite3 c:\test\ReadCodes\ReadCode.db .output testfile.txt select * from readcode where read_code glob 'G2*'; It must be simple, but I can't see it. RBS, You

Re: [sqlite] beginner question

2006-11-17 Thread Dennis Cote
Qiang wrote: hello, two questions.. 1. comparing select one or two columns from one row from a bigger table ( 20,000 - 30,000 rows, 20 columns ). with select the same column from one row from a smaller table (20,000 - 30,000 rows, 2 columns). does it make much different on

Re: [sqlite] Question on JAVA and Sqlite DB

2006-11-17 Thread Benedetta . Turchi
Hi, which are the recommended JAVA wrapper APIs/JDBC driver to be used to connect to an SQLite DB? Thank you Benedetta Turchi Engineering Tools Engineering Tools Website - *** ***

Re: [sqlite] Date and time comparison

2006-11-17 Thread John Stanton
Karthick V - TLS , Chennai wrote: Hello everyone, I am trying to retrieve some records from the database using date and time comparison. The table has three columns, Row Id, Start Time and end Time. I need to get the row id for a time which falls within the start and end time. I am using

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
Dennis, Thanks for that. Will try it later and let you know. Definitely one I couldn't have figured out myself. RBS -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: 17 November 2006 15:04 To: sqlite-users@sqlite.org Subject: Re: [sqlite] select from commandprompt

RE: [sqlite] select from commandprompt with output to file

2006-11-17 Thread RB Smissaert
Have tried this now and working beautifully. One thing I couldn't figure out is how to set the row delimiter. I can set the column delimiter fine with .mode csv, but couldn't see something similar for the rows. The delimiter for rows should be vbCrLf. As SQLite is written in C does it have the

[sqlite] Design of application using embedded database

2006-11-17 Thread jon
Hi, I would like a bit of advice before starting to make changes to my application. I've written a program in C# for personnel departments and at present all of the data is stored in memory until the user saves and then it is written to disk as an XML file. I'd like to switch to an embedded

Re: [sqlite] Design of application using embedded database

2006-11-17 Thread drh
[EMAIL PROTECTED] wrote: Hi, I would like a bit of advice before starting to make changes to my application. I've written a program in C# for personnel departments and at present all of the data is stored in memory until the user saves and then it is written to disk as an XML file. I'd

Re: [sqlite] Question on JAVA and Sqlite DB

2006-11-17 Thread David Crawshaw
Benedetta.Turchi wrote: which are the recommended JAVA wrapper APIs/JDBC driver to be used to connect to an SQLite DB? I would happily recommend my own, though I may be a little biased http://www.zentus.com/sqlitejdbc There are a list of others on the SQLiteWrappers page of the main wiki. d

Re: [sqlite] beginner question

2006-11-17 Thread Qiang
--- Dennis Cote [EMAIL PROTECTED] wrote: Qiang wrote: hello, two questions.. 1. comparing select one or two columns from one row from a bigger table ( 20,000 - 30,000 rows, 20 columns ). with select the same column from one row from a smaller table (20,000 -

[sqlite] Basic query slower with index?

2006-11-17 Thread Seth Falcon
Hi all, I'm working with a table with ~3 million rows and 7 columns. Recently, I found that a simple query takes longer _after_ adding an index. I find this surprising. Can someone provide some insight? Here are some details: The schema: CREATE TABLE pmfeature ( fid integer not

[sqlite] Re: Basic query slower with index?

2006-11-17 Thread Igor Tandetnik
Seth Falcon [EMAIL PROTECTED] wrote: I'm working with a table with ~3 million rows and 7 columns. Recently, I found that a simple query takes longer _after_ adding an index. I find this surprising. Can someone provide some insight? Here are some details: The schema: CREATE TABLE

Re: [sqlite] Re: Basic query slower with index?

2006-11-17 Thread Seth Falcon
Igor Tandetnik [EMAIL PROTECTED] writes: This is not unusual when you index a field with low cardinality (number of distinct values). To illustrate, imagine that allele=0 in all rows. A simple scan without using an index would look once at each row, for a complexity of O(N) (where N is the