Re: [sqlite] Looking for SQLite schema doc generator (in HTML) for tables, fields, etc

2015-02-03 Thread Rich Shepard
On Tue, 3 Feb 2015, Gerald Bauer wrote: I'm looking for a little tool that reads in an SQLite schema (e.g. beer.db, football.db, etc.) and outputs (generates) documentation for tables, fields etc. as a single HTML page or as HTML pages. Any insight appreciated? Gerald, While not in html

Re: [sqlite] ORDER BY and LIMIT regression

2015-01-19 Thread Rich Shepard
On Mon, 19 Jan 2015, Richard Hipp wrote: Thank you for reporting the problem. Certainly! We always fix every problem that we are aware of in SQLite. But this problem had not been previously reported to us, and did not occur in any of the 168 million test cases that we ran prior to

Re: [sqlite] PK References One of Two Other Tables

2015-01-11 Thread Rich Shepard
On Sun, 11 Jan 2015, Simon Slavin wrote: You can't do the latter. Foreign keys can reference only one table. You could create yet another table, which just supplies primary keys, but it would seem that this would just duplicate a function of your 'items' table. Simon, That's what I

[sqlite] PK References One of Two Other Tables

2015-01-11 Thread Rich Shepard
Items to be raffled can be donated or purchased. The Donations and Purchases tables each have the item ID as their PK. The Raffles table should have the PK as either the Donations or the Purchases item ID. How do I write the DDL creating the Raffles table so that the PK is either a donated

[sqlite] SQLite-3.7.4 Amalgamation?

2010-12-07 Thread Rich Shepard
What happened to the souce tarball of the amalgamation? I'm wondering if the change to the autoconf version will break the Slackbuild script I use. Was there something wrong with the tarballs of previous versions? Rich ___ sqlite-users mailing

Re: [sqlite] SQLite-3.7.4 Amalgamation?

2010-12-07 Thread Rich Shepard
On Tue, 7 Dec 2010, Richard Hipp wrote: I changed to a more consistent naming scheme for all of the build products: sqlite-PRODUCT-OS-ARCH-VERSION.zip with the OS and ARCH being omitted for source-code products. In your case, you probably are looking for Richard, That's how it's

Re: [sqlite] Multiple databases vs. Multiple tables.

2010-10-26 Thread Rich Shepard
On Tue, 26 Oct 2010, Dariusz Matkowski wrote: in your opinion is it better (performance, maintainability etc...) to have multiple databases or multiple tables. The problem I am facing is as follows. I have many media servers containing a large amount of images music and videos, let's assume

Re: [sqlite] Multiple databases vs. Multiple tables.

2010-10-26 Thread Rich Shepard
On Tue, 26 Oct 2010, Dariusz Matkowski wrote: Only one user (the browser). The DB is on a device the same place where the user (Browser) is. A process will collect the information about the servers and their contents and story it to the DB at the same time the user may ask for the contents to

Re: [sqlite] Multiple databases vs. Multiple tables.

2010-10-26 Thread Rich Shepard
On Tue, 26 Oct 2010, Dariusz Matkowski wrote: Queries will be done across the servers to aggregate the content. I am concern about the locking mechanism, if I write to the single database and I represent the servers as tables I will have no access to read the other servers/tables, but if I

Re: [sqlite] Query to compare two sqlite databases

2010-09-24 Thread Rich Shepard
On Fri, 24 Sep 2010, John Reed wrote: I compare an application every few days which has sqlite as it's client database. I look at the content and check whether documents have made it into the application after it has been built. I also check the metadata in the sqlite client database for

Re: [sqlite] Query to compare two sqlite databases

2010-09-24 Thread Rich Shepard
On Fri, 24 Sep 2010, luuk34 wrote: you mean something like: select id1, id2 from callprog a where id1 not in (select b.id1 FROM callprog b where b.id1=a.id1 ); Yeah; much better. But what is there is more than 1 column? it will grow in complexity when you have a lot of columns.

Re: [sqlite] Import and export databases from/to SQL dump files

2010-09-22 Thread Rich Shepard
On Wed, 22 Sep 2010, Nimish Nayak wrote: I saw the shell.c file in src and figured out how exactly it exports databases to SQL dump files and implemented the same in C. But i could not find anything for importing the databases to SQL dump files. I've not looked at the source code, but the

[sqlite] Syntax for Counting Rows By Multiple Groups

2010-09-21 Thread Rich Shepard
I've a table with 15 columns, including industry number, industry description, and state. I'm trying to formulate the proper SELECT statement to return the count of rows for each industry number/description in each of the 5 states. I've looked at the aggregate function chapter in Rick van der

[sqlite] WHERE Clause Not Working On Database

2010-09-14 Thread Rich Shepard
I cannot select rows from a table using the WHERE clause and cannot find my error. Perhaps others will see what I miss. The table, Companies, has 1500+ rows. One column is defined as state CHAR(2), but the select statement seeking all rows where state = 'OR' for example returns

Re: [sqlite] Importing csv to SQLite

2010-09-13 Thread Rich Shepard
On Mon, 13 Sep 2010, Mithun Nair wrote: When i try importing it into a SQLite table, i get some errors like expected 2 columns of data but found 1. Later i found that importing a comma separated file into SQlite wont work because a comma is considered as a delimiter by the the SQLite engine

Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Rich Shepard
On Sat, 11 Sep 2010, Melton Low wrote: When you saved the spreadsheet as a csv file, you probably took the default delimiter which happens to be a comma. You should check for a cell with data that has a comma in it. The embedded comma would be treated as a column separator which would result

Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Rich Shepard
On Sun, 12 Sep 2010, Simon Slavin wrote: Any commas in it ? Any single or double quotes ? Simon, Probable. I need to look. There are apostrophe's in a long text column that I thought might be interpreted as single quotation marks. Thanks, Rich

Re: [sqlite] New to SQLite and I have a question

2010-09-12 Thread Rich Shepard
On Sat, 11 Sep 2010, Bob Keeland wrote: While I greatly appreciate the help I've gotten on SQLite in general, I still wonder about the last part of my questions below. Can anyone recommend a good book for learning to use SQLite? What about these that I found on Amazon.com The Definitive

Re: [sqlite] New to SQLite and I have a question

2010-09-12 Thread Rich Shepard
On Sat, 11 Sep 2010, Sam Carleton wrote: If you need to learn the basics of SQL, I would highly recommend the book SQL For Smartieshttp://www.amazon.com/gp/product/0123693799?ie=UTF8tag=miltonstreetlinkCode=as2camp=1789creative=9325creativeASIN=0123693799. It covers all the basics and a lot

Re: [sqlite] New to SQLite and I have a question

2010-09-12 Thread Rich Shepard
On Sun, 12 Sep 2010, Bob Keeland wrote: Access may not be the best database for my programs, but then again my needs are not that great. I just need to search a database and then search the results of the first search, then search the results of the second search, etc. That sounds simple to

Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Rich Shepard
On Sun, 12 Sep 2010, Simon Slavin wrote: That's one danger, depending on how you have set up your delimiters. I think your earlier post about commas is more likely to solve your problem. Simon, Yup. It did. Thanks, Rich ___ sqlite-users

[sqlite] Issues .import(ing) a .csv file

2010-09-11 Thread Rich Shepard
I cannot see what's wrong with a line in a .csv file. SQLite tells me it expected 14 columns of data, but found 15. No matter how many times I count the columns (exported in .csv from an OpenOffice.org Calc spreadsheet with 14 columns), that's all I find. Nothing appears wrong with the

[sqlite] ADOdb with SQLite-3.7.2

2010-09-02 Thread Rich Shepard
I've not before dealt with ADOdb, but a CMS I'm considering using to change my company web site uses that. My Google search found one reference (from 2009) suggesting that ADOdb does not play well with sqlite3. Is this true (still)? If I can use it, I'll take a deeper look at the CMS.

Re: [sqlite] database development - correct way?

2010-06-09 Thread Rich Shepard
On Wed, 9 Jun 2010, Tim Romano wrote: Typically, Orders are divided into OrderHeader and OrderDetail tables: OrderHeader id integer primary key orderdate customerid OrderDetail id orderid references OrderHeader(id) articleid references article(id) quantity int And you could then

Re: [sqlite] database development - correct way?

2010-06-09 Thread Rich Shepard
On Wed, 9 Jun 2010, Oliver Peters wrote: So I assume that it is not(!) a mistake not(!) to use a composite PK in my table customer (customernumber,customerorigin) and to refer to it from the table order where I had to use these fields as a composite FK? Oliver, Too many negatives there

Re: [sqlite] copy data from one db to another

2010-06-09 Thread Rich Shepard
On Wed, 9 Jun 2010, Vivien Malerba wrote: I forgot to mention, the source is a PostgreSQL db, not SQLite, so there's no source file to copy.  Though a backup might be interesting ... You can use Libgda's gda-sql tool in which you can: * open a connection to the PostgreSQL db (for example

Re: [sqlite] SQLite template files

2010-04-06 Thread Rich Shepard
On Tue, 6 Apr 2010, BareFeet wrote: Thanks to those who replied on this topic, but no-one offered any repository of SQLite template files. Does that mean there aren't any available? Tom, That's because what you seek does not exist. User interfaces are separate from the rdbms back end. The

Re: [sqlite] SQLite version 3.6.23

2010-03-09 Thread Rich Shepard
On Tue, 9 Mar 2010, D. Richard Hipp wrote: The download page no longer mentions any version of SQLite: Oops. Does now. And I thought it was me! I got lost in the repository, started over, tried a different route, and suddenly the familiar download page appeared. Whew! Rich

Re: [sqlite] Newbie question - SQLite the best choice?

2010-03-06 Thread Rich Shepard
On Sat, 6 Mar 2010, Richard Cooke wrote: Our application could have up to 10,000 users via a public facing web site. As a first stab at the schema, I thought I'd have one Master User database which will probably look like this: Richard, If I recall correctly, SQLite does not do well with

[sqlite] Aggregate From Two-Table SELECT

2010-02-17 Thread Rich Shepard
I'd appreciate learning how to correctly write a SELECT statement that reports the SUM of one returned column. I can select all relevant rows, but don't know where to put the SUM(distance) phrase: SELECT l.llid, l.name, s.endKM - s.beginKM AS distance FROM lotic AS l,

Re: [sqlite] Aggregate From Two-Table SELECT

2010-02-17 Thread Rich Shepard
On Thu, 18 Feb 2010, P Kishor wrote: SELECT l.llid, l.name, SUM(s.endKM - s.beginKM) AS distance FROM lotic AS l JOIN streamlength AS s ON l.llid = s.llid WHERE l.llid = '1226038453652' GROUP BY l.llid, l.name Thank you. Now I know. Much appreciated, Rich

Re: [sqlite] SQLite Training

2010-01-27 Thread Rich Shepard
On Thu, 28 Jan 2010, nyetngoh wong wrote: I'm currently working on a project that uses SQLite and would like to know if there is any SQLite certification available in Singapore. Do you provide any forms of technical training or courses on using SQLite efficiently ? All you need is to know

Re: [sqlite] SQLite Training

2010-01-27 Thread Rich Shepard
On Thu, 28 Jan 2010, Simon Slavin wrote: ... but that requires that you understand at least a bit of relational databases theory. We've recently had questions from people who don't understand an INDEX, or what you would want one, or how to make one which is useful for a particular query. So

Re: [sqlite] SQLite Training

2010-01-27 Thread Rich Shepard
On Wed, 27 Jan 2010, Roger Binns wrote: The main drawback is that the book hasn't been revised since 2006 since when the virtual machine has changed, foreign key support is present, you can use threading freely, there is incremental Blob I/O, virtual tables are available, VFS is available,

Re: [sqlite] SQLite Version 3.6.22

2010-01-05 Thread Rich Shepard
On Tue, 5 Jan 2010, D. Richard Hipp wrote: It has been our habit for the past several years to do at least one SQLite release per month. However, we are thinking of backing off from that schedule and releasing every other month. If we stick to this plan, it means the next release (3.6.23)

Re: [sqlite] SQL question

2009-12-11 Thread Rich Shepard
On Fri, 11 Dec 2009, Florian Schricker wrote: Schema of DB (simplified): - Oper (string) - Product (string) - Category (string) - Name (string) - CreateTS (Timestamp) - Value (Double) Florian, The schema refers to the set of tables, and the attributes within each table. Is the above

Re: [sqlite] It's done, except for this nit:

2009-11-29 Thread Rich Shepard
On Sun, 29 Nov 2009, Ted Rolle, Jr. wrote: I need for computed total price to display with leading and trailing zeros. E.g. 1 - 1.00 2.5 - 2.50 .9 - 0.90 Ted, It is most common to handle display issues in the UI component. _Most_ applications have three components: a database back end

Re: [sqlite] Converting .dbf to SQLite

2009-11-13 Thread Rich Shepard
On Thu, 12 Nov 2009, Alex Mandel wrote: Using R might actually be a convenient way to do it all in essentially one step, and technically batch scriptable. I found a perl script that converts .dbf to .csv. It's then trivial to import the .csv into SQLite. Rich

Re: [sqlite] Output in currency format

2009-11-13 Thread Rich Shepard
On Thu, 12 Nov 2009, Dan Bishop wrote: Microsoft Excel has a similar problem. I ran into it back when I was working in a credit union and tried to import a CSV file containing credit card numbers. Wouldn't have noticed except that credit card numbers are 16 digits long and double only has

Re: [sqlite] ogr2ogr

2009-11-12 Thread Rich Shepard
On Thu, 12 Nov 2009, stormtrooper wrote: There is a command line tool (ogr2ogr) that runs on linux or windows that converts dbf to sqlite, csv, xml, etc. It is primarily a converter for geographic data but supports tabular data as well. OGR is part of fwtools. Keith, Thank you. I'm

[sqlite] Converting .mdb Files

2009-11-11 Thread Rich Shepard
I have a 12.1M .mdb file (soils data) that I want to convert to SQLite. I downloaded, built, and installed mdbtools-0.5 but it segfaults when I try to run mdb-schema and mdb-export on the soils data. The -0.6pre1 won't build because the backend.c file is declared both static and dynamic. I

Re: [sqlite] Converting .mdb Files

2009-11-11 Thread Rich Shepard
On Wed, 11 Nov 2009, Jan wrote: I am using this one: http://code.google.com/p/mdb-sqlite/ Have not tried it on linux though. Jan, It's a java app so it should run on anything. What I need to do now is find the java ant tool on my system. Thanks, Rich

[sqlite] Converting .dbf to SQLite

2009-11-11 Thread Rich Shepard
Now that I have a working tool to convert from Access .mdb to sqlitedb files, I need one for dBASE .dbf files. Or, a conversion to .csv will work, too. Needs to run on linux, of course. My Google searches turned up a bunch of tools for the Windows platforms, supposedly free converters that

Re: [sqlite] Converting .dbf to SQLite

2009-11-11 Thread Rich Shepard
On Thu, 12 Nov 2009, dave lilley wrote: Not trying to be silly here but why not write a wee program that reads in the dbf file and for each row read in write the data into an sql file? Because I'd have to research the format of the .dbf file and I'd probably be re-inventing the wheel. Rich

Re: [sqlite] Converting .dbf to SQLite

2009-11-11 Thread Rich Shepard
On Thu, 12 Nov 2009, Jean-Christophe Deschamps wrote: I'm pretty sure OpenOffice can do a number of such conversions, free and portable. About command-line tools for linux, I just don't know. Perhaps. I learned today that only the Winduhs version of OO.o can import .mdb files; the linux

Re: [sqlite] Output in currency format

2009-11-10 Thread Rich Shepard
On Tue, 10 Nov 2009, Peter Haworth wrote: Is there a way to do this or should I plan on handling it within the application? Pete, The latter. Display formatting is not part of SQL. You might also consider using integer values for money because the math is more accurate. Rich

Re: [sqlite] .import on a .csv file

2009-10-22 Thread Rich Shepard
On Thu, 22 Oct 2009, Simon Davies wrote: One solution is to replace your existing separators (,) with a character that does not exist in your data, specify that character as the separator to sqlite, and you should be good to go .import. I found the solution was to change all field

Re: [sqlite] Order of operations when using TRIGGERs

2009-10-22 Thread Rich Shepard
On Thu, 22 Oct 2009, Simon Slavin wrote: I'm using a TRIGGER that is triggered AFTER INSERT. The INSERT commands do not know or set the value for the ROWID column. Can I reliably fetch the value for this column from 'NEW.' ? Or can I rely only on values which are explicitly set in the

Re: [sqlite] Problem about write data into the DB

2009-10-21 Thread Rich Shepard
On Wed, 21 Oct 2009, ?? wrote: I deployed a django app on my laptop, the whole environment is like this: the OS is UBUNTU904, the web server is Apache, and the database is sqlite3. The deployment is success, but when I try to write some data into the database, I get the HTTP 500 error. And I

Re: [sqlite] how to represent a tree in SQL

2009-10-14 Thread Rich Shepard
On Wed, 14 Oct 2009, Michael Chen wrote: I am developing a numerical application, where a single rooted dynamic tree is the main data structure. I intended to use SQLite for this purpose and also for other data as well. However I have no reference how to represent a tree using tables. I need

Re: [sqlite] Need Help SQL

2009-10-12 Thread Rich Shepard
On Sun, 11 Oct 2009, Igor Tandetnik wrote: I simply combine (month, day) pair into a single number - the same way you combine two digits of a decimal number by multiplying the first by 10 and adding the second. The multiplier doesn't have to be 100 - any number greater than 31 will do. Igor,

[sqlite] DELETE FROM Not Working

2009-10-08 Thread Rich Shepard
This must be my error, but I am not seeing it. Your input is requested. I have a table named Penalties with a column named DateIssued and a datatype of DATE. A select operation shows dates such as 4/6/1992 and 12/15/1993. To delete all rows with dates earlier than 1/1/2005 I used the

Re: [sqlite] DELETE FROM Not Working

2009-10-08 Thread Rich Shepard
On Thu, 8 Oct 2009, Pavel Ivanov wrote: And the main problem: SQLite doesn't have such type as date. All types it supports are listed here: http://www.sqlite.org/datatype3.html. Pavel, We can use DATE, TIME, and DATETIME column types; they all have TEXT storage class. Bottom line: change

Re: [sqlite] DELETE FROM Not Working

2009-10-08 Thread Rich Shepard
On Thu, 8 Oct 2009, Igor Tandetnik wrote: Actually, columns with these declared types will have NUMERIC affinity. Thanks, Igor. I missed that. Realize that -MM-DD format works not because SQLite treats it somehow specially, but because for strings in this format, alphabetical order

Re: [sqlite] DELETE FROM Not Working

2009-10-08 Thread Rich Shepard
On Thu, 8 Oct 2009, Pavel Ivanov wrote: Your dates are compared as simple strings. Thus with your statement you're trying to delete all rows where DateIssued is January, 1 of any year earlier than 2005. Bottom line: change the way you store your dates if you really want to compare them in sql

Re: [sqlite] DELETE FROM Not Working

2009-10-08 Thread Rich Shepard
On Thu, 8 Oct 2009, Igor Tandetnik wrote: Show what the data looks like now, show the statement you are running, and define not working. Igor, Here are two records: sqlite select * from Penalties limit 2; 2009-071|Water Quality, Storm Water|NWR|205 Auto Salvage,

Re: [sqlite] DELETE FROM Not Working

2009-10-08 Thread Rich Shepard
On Thu, 8 Oct 2009, Igor Tandetnik wrote: Well, do you actually have rows that you believe should satisfy the condition? Show one of those. Oh, rats! I messed up the table when converting the dates. Guess I need to start the process over. Will report results when I'm done. Rich

Re: [sqlite] DELETE FROM Not Working -- FIXED

2009-10-08 Thread Rich Shepard
On Thu, 8 Oct 2009, Rich Shepard wrote: Oh, rats! I messed up the table when converting the dates. Guess I need to start the process over. Will report results when I'm done. Amazing! When the dates are correct, and not all the same, the delete statement works as intended on the table

Re: [sqlite] Comparing two tables?

2009-09-30 Thread Rich Shepard
On Wed, 30 Sep 2009, Joe Bennett wrote: Have two tables that have the same columns, but different number of rows (rows do not match but columns do. 86 matching columns in each table): That's to be expected; why would the rows match? Now, I'm looking to do this: Find the first row of

Re: [sqlite] TH3 license

2009-09-25 Thread Rich Shepard
On Fri, 25 Sep 2009, Clifford Hung wrote: How do I obtain a TH3 license? Perhaps go to the local DMV office and wait in line for several hours? I've no idea what a TH3 license is, and Google didn't help any. If you want to use SQLite for some purpose read

Re: [sqlite] Tedious CSV import question

2009-09-24 Thread Rich Shepard
On Thu, 24 Sep 2009, C. Mundi wrote: I just bit the bullet and did it. Python has an excellent csv module, capable of handling just about any dialect you're likely to encounter. I am so grateful I did not have to write a parser for CSV. In just a few lines I can read the csv right into

Re: [sqlite] SQL language question

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, D. Richard Hipp wrote: The question is this: Should the no-op UPDATE statement (x=x) cause the ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or not? PostgreSQL says no - the t2.y value is not nulled unless the t1.x value really does change values.

[sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
I've downloaded data in .csv format from an agency's Web site and want to put it in a sqlite database. I created the table as a .sql file and read that into sqlite. It's fine. However, when I try to import the csv file sqlite balks: sqlite .import all-deq-contacts-fixed.csv Permits

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Pavel Ivanov wrote: Could you show us this line 1? Pavel, Sure. I think the issue is that the file uses double quotation marks rather than single ones. But, in that case, how do I mark an embedded apostrophe? Line 1: 117172,Engineered Structures, Inc.,Brockway

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Pavel Ivanov wrote: No, the problem is that sqlite3 command line utility doesn't parse quotes in csv files. It gets line, splits it using comma as delimiter, disregarding any quotes and then inserts resulting strings into database. So you'll have to use something else for

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Pavel Ivanov wrote: AFAIK, you can do only the first - remove all quotes and make sure that no commas met in field values. Pavel, I've just tried this and the command line processor still finds 26 columns instead of the counted 25. Sigh. Thanks, Rich

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Simon Slavin wrote: Use a text editor on the file and change all occurrences of (including the quotes) , to | then set .separator to the single character | before you import the file. Simon, The default separator is '|' (as confirmed by the .show command) so I

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Simon Davies wrote: Remove the trailing pipe character Did that as soon as I learned it made no difference. Each line should be clean and there are 25 columns defined in it. Quite frustrating. Rich ___ sqlite-users mailing

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Simon Davies wrote: 117172|Engineered Structures Inc.|Brockway Center|10875 SW Herman Rd|Tualatin|97062-8033|Washington|NWR|45.3834|-122.7882|1542|Nonresidential Construct NEC|Gen12c(Agent)|Stormwater; NPDES Construction More Than 1 Acre Disturbed Ground|Issued By

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Wed, 23 Sep 2009, Simon Davies wrote: You seem to have translated one of your data commas into a separator pipe: Stormwater; NPDES Construction More Than 1 Acre Disturbed Ground, Issued By Agent - Stormwater; NPDES Construction More Than 1 Acre Disturbed Ground|Issued By Agent Simon,

Re: [sqlite] Importing data into SQLite - text files are not really portable

2009-09-08 Thread Rich Shepard
On Tue, 8 Sep 2009, Ribeiro, Glauber wrote: Unfortunately, the 3 main families of small computer operating systems have 3 different definitions of what a text file is... This causes no end of trouble when moving text files between these kinds of systems. I've never worked with a Mac so I

Re: [sqlite] Booleans in SQLite

2009-09-07 Thread Rich Shepard
On Mon, 7 Sep 2009, Jim Showalter wrote: Oracle doesn't have a native boolean type. You have to use INTEGER and interpret it. MySQL doesn't have a boolean type (it's just a synonym for TINYINT). SQL Server doesn't have a boolean type. You have to use BIT and interpret it. PostgreSQL

Re: [sqlite] Using SQLite for GIS Application

2009-08-23 Thread Rich Shepard
On Sun, 23 Aug 2009, Itzchak Raiskin wrote: I want to use SQLite in a GIS application where I create a database containing terrain data (coordinates, height). I would like to query this database with start and end points of a line and get a vector with all heights point along this line. I

Re: [sqlite] A problem with versions of SQLite

2009-08-10 Thread Rich Shepard
On Mon, 10 Aug 2009, Rod Dav4is wrote: Perhaps the version 3.6 db manager will automatically convert my 2.1 to the new 3.6 format (or is that too much to hope for?). Knowing nothing about any version of Windows, I suggest that you make a copy of the exiting file and try opening it in the

[sqlite] SQLite-3.6.17 for Slackware-12.2

2009-08-10 Thread Rich Shepard
We had a thread not long ago about pre-built packages for SQLite. I just downloaded the 3.6.17 source, built it, and upgraded from 3.6.16. Works fine. So, if anyone wants a package for Slackware-12.2, ask and ye shall receive. Rich -- Richard B. Shepard, Ph.D. | Integrity

Re: [sqlite] sqlite database signature ?

2009-08-06 Thread Rich Shepard
On Thu, 6 Aug 2009, luc.moulinier wrote: I'd like to know what is the best way to know if a file is a sqlite DB or not (without launching sqlite of course) ? For example, is the first line of the file unambiguously a signature of sqlite ? If so, what is its structure ? Many thanks in advance

Re: [sqlite] Data synchronization between two offices

2009-08-04 Thread Rich Shepard
On Tue, 4 Aug 2009, Rstat wrote: But today we sell more and more books and the addition of a database means we need to synchronize our data from the warehouse database to the main office one, mainly to be able to know what kind of stock we have. I think we will have to go with a batch syncing

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rich Shepard
On Mon, 3 Aug 2009, Rick Ratchford wrote: The native Date in a table without any additional expressions is '-mm-dd 00:00:00'. Rick, That's a timestamp format. Did you specify the column as date or timestamp? Rich -- Richard B. Shepard, Ph.D. | Integrity

Re: [sqlite] Date Comparisons SQL

2009-08-03 Thread Rich Shepard
On Mon, 3 Aug 2009, Rick Ratchford wrote: It was set as String actually. Rick, That's the storage class; well, TEXT is the storage class. I believe this is a WRAPPER thing though. I'm programming in VB6 and using Olaf's VB wrapper. Oh. I know nothing about Microsoft languages (or

[sqlite] [OpenSQL Camp] OpenSQL Camp, November 2009 in Portland, OR (fwd)

2009-07-30 Thread Rich Shepard
For those who are interested. Rich -- Richard B. Shepard, Ph.D. | IntegrityCredibility Applied Ecosystem Services, Inc.|Innovation http://www.appl-ecosys.com Voice: 503-667-4517 Fax: 503-667-8863 -- Forwarded message --

Re: [sqlite] Subtotal SQL

2009-07-29 Thread Rich Shepard
On Wed, 29 Jul 2009, Adler, Eliedaat wrote: SQL/sqlite challenge for all: No challenge for anyone who knows SQL. I need a running sum of size that works regardless of what order the objects are in. User Function/Aggregates welcome! _All_ implementations of SQL include a suite of

Re: [sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Rich Shepard
On Tue, 28 Jul 2009, Shaun Seckman (Firaxis) wrote: Looking at the SQL syntax chart it doesn't seem like this is possible. In other SQL servers I'm able to use the statement insert into foo('col1', col2') values ('1', '1'), ('2', '2'), ('3', '3');. Is this possible in SQLite or must I

Re: [sqlite] What is a Relation?

2009-07-27 Thread Rich Shepard
On Mon, 27 Jul 2009, Darren Duncan wrote: Object orientation has nothing to do with all this per se, though objects can easily be mapped to tuples. Darren, A related issue is that object orientation is almost always used in the context of procedural languages (e.g., C++, Python, Ruby)

Re: [sqlite] What is a Relation?

2009-07-27 Thread Rich Shepard
On Mon, 27 Jul 2009, Beau Wilkinson wrote: I am dealing with such a project now. The schema consists of time stamp plus blob, where the blobs map directly to C++ structs. Of course, there are all sorts of useful data items in those blobs, and many of the capabilities of SQL are lost by

Re: [sqlite] What is a Relation?

2009-07-27 Thread Rich Shepard
On Mon, 27 Jul 2009, Paul Claessen wrote: So .. would anyone know a good book for seasoned programmers, who are new to databases, that addresses all these issues? Paul, Any of Joe Celko's books. His SQL Programming Style is particularly good for an overview. The amazon.com listing lets you

Re: [sqlite] Denormalisation

2009-07-27 Thread Rich Shepard
On Mon, 27 Jul 2009, CityDev wrote: Over the intervening years I can't ever remember denormalising data (even when dealing with eg 13 million insurance customers in a table). Is it OK nowadays to say always aim to be fully normalised - modern RDBMSs are usually powerful enough to cope with

Re: [sqlite] DATETIME and storage type

2009-07-27 Thread Rich Shepard
On Mon, 27 Jul 2009, Rael Bauer wrote: If I declare a field as DATETIME default 2001-01-01, ( e.g. alter table notes add column last_modified DATETIME default 2001-01-01;) will the declared default value be stored as a string or real value? Rael, String (the actual data storage type name

Re: [sqlite] DATETIME and storage type

2009-07-27 Thread Rich Shepard
On Mon, 27 Jul 2009, Rael Bauer wrote: If I declare a field as DATETIME default 2001-01-01, ( e.g. alter table notes add column last_modified DATETIME default 2001-01-01;) will the declared default value be stored as a string or real value? Rael, What you have above is data type DATE.

Re: [sqlite] Installing SQLite

2009-07-24 Thread Rich Shepard
On Fri, 24 Jul 2009, Simon Slavin wrote: SQLite has enough fans that people are happy to build binaries for major platforms. I have a SlackBuild script that I've used since sqlite-3.3.1 on June 15, 2006. It builds a Slackware package (*.tgz) on my standard system (currently -12.2). In the

Re: [sqlite] SQLite: Porting to another Operating system.

2009-07-24 Thread Rich Shepard
On Fri, 24 Jul 2009, CityDev wrote: I'm only familiar with DB2, Access Jet and Focus. In each case I would expect to reorganise the physical database on a regular basis - maybe daily or weekly. What's the best way of doing that with SQLite? Vacuum. Rich -- Richard B. Shepard, Ph.D.

Re: [sqlite] Defining a table that starts rowid as 0

2009-07-23 Thread Rich Shepard
On Thu, 23 Jul 2009, Shaun Seckman (Firaxis) wrote: Is it possible in the create a table where the rowid will start at 0 instead of 1 prior to inserting a row and explicitly stating that the rowid is 0? Shaun, Using rowid for anything is not a good idea. There's no

Re: [sqlite] Installing SQLite

2009-07-23 Thread Rich Shepard
On Fri, 24 Jul 2009, Dan wrote: There is an amalgamation package that includes a supported configure script. ./configure make install and you're away. Er, Dan, ... without the build step there's nothing to install. The usual sequence is ./configure make make install. Or, you build a

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, P Kishor wrote: Sure it is possible. You will have to choose your favorite programming language, write a program to locate and import the local text file, and set up a scheduler to do so periodically. Lots of third-party applications. You might end up writing your own to

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: Do you know of any third party applications that i could use to build the front end? This will need to run on local machines, not on servers. So, some sort of desktop application i would imagine Scott, Each language has its own. However, from your

Re: [sqlite] Ability to convert Access to SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: The OS is Windows XP. I know some VB script, some pearl and i'v used Visual VB and C# as well. I was thinking that the script would called from a windows scheduled task and the script would then import the text file into the table in SQLite...Sounds

Re: [sqlite] Installing SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: does someone have 'good' instructions on what i need and how i need to install SQLite on Windows XP? Scott, I don't do Windows; haven't for more than a dozen years. However, it doesn't look too hard. the instructions on the SQLite website are pretty

Re: [sqlite] Installing SQLite

2009-07-22 Thread Rich Shepard
On Wed, 22 Jul 2009, scabral wrote: When i download the sqlite-amalgamation-3_6_16.zip i get 3 text files: sqlite3 C File sqlite3 H File sqlite3ext H File what am i supposed to do with those? Well, based on what others wrote about your initial comments, I suggest that you replace

[sqlite] SQLite Books

2009-07-21 Thread Rich Shepard
My copy of The SQL Guide to SQLite arrived yesterday and I spent some of the evening with it. Because I've read Rick's Introduction to SQL, 4th Ed. and Mike Owens' The Definitive Guide to SQLite I'll be presumptuous enough to think someone here would appreciate my thoughts on the new book.

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Rich Shepard
On Sun, 19 Jul 2009, Roger Binns wrote: Bringing things full circle, that is exactly what the genfkey functionality does. It parses the foreign key constraints and generates a set of triggers to ensure they are enforced. It used to be a separate program until it was moved into the shell and

Re: [sqlite] How do bitwise operators work?

2009-07-20 Thread Rich Shepard
On Mon, 20 Jul 2009, Le Hyaric Bruno wrote: But is there someone who can tell me where can I plug my specific operators? And even is that feasible? Bruno, Can you provide examples of your schema, data, and the types of queries you want to run? This would make it easier to offer

  1   2   3   >