Re: [sqlite] creating a table

2016-11-21 Thread Rob Willett
John, There is a lot of documentation on the SQLite website. Here's the 'official' docs on creating a table https://www.sqlite.org/lang_createtable.html A Sqlite database consists of many tables. I am unsure if there is an upper limit, if there is, its more tables than I have ever created.

Re: [sqlite] SQLite binary with Math Functions for OS-X?

2016-11-21 Thread David Goldwich
On Mon, Nov 21, 2016 at 1:12 PM, Ronald Gombach wrote: > > Is there a pre-c binary of SQLIte available for down load that includes a > math library. I particularly need the “median” function. > > If not, can someone point me to instructions on compilation command line to >

[sqlite] creating a table

2016-11-21 Thread John R. Sowden
First of all, I come from the dBASE/Foxpro world. There is no distinction between a table and a database. I understand that with Sqlite a database includes tables and other items. The scenario that I do not understand, is: say I have a log file with about 7 fields totaling about 80

Re: [sqlite] creating a table

2016-11-21 Thread Igor Korot
Hi, John, On Mon, Nov 21, 2016 at 12:29 PM, John R. Sowden wrote: > First of all, I come from the dBASE/Foxpro world. There is no distinction > between a table and a database. I understand that with Sqlite a database > includes tables and other items. The scenario

Re: [sqlite] I keep getting seg faults building my database using python sqlite3

2016-11-21 Thread Roger Binns
On 19/11/16 08:08, Kevin O'Gorman wrote: > System with problems: Running Xubuntu Linux 16.04.1, Python 3.5.2. [...] > System without this problem: Running Ubuntu Linux 14.04.5, Python 3.4.3. You are good on Python versions then. My remaining recommendation is to make the process that does SQLite

Re: [sqlite] I keep getting seg faults building my database using python sqlite3

2016-11-21 Thread Kevin O'Gorman
On Mon, Nov 21, 2016 at 9:41 AM, Roger Binns wrote: > On 19/11/16 08:08, Kevin O'Gorman wrote: > > System with problems: Running Xubuntu Linux 16.04.1, Python 3.5.2. > [...] > > System without this problem: Running Ubuntu Linux 14.04.5, Python 3.4.3. > > You are good on

Re: [sqlite] creating a table

2016-11-21 Thread John R. Sowden
Thank you all for your answers and direction for further information. Hopefully, I will not bring these subjects up again. :) John On 11/21/2016 09:29 AM, John R. Sowden wrote: First of all, I come from the dBASE/Foxpro world. There is no distinction between a table and a database. I

Re: [sqlite] creating a table

2016-11-21 Thread Niall O'Reilly
On 21 Nov 2016, at 17:29, John R. Sowden wrote: First of all, I come from the dBASE/Foxpro world. There is no distinction between a table and a database. I understand that with Sqlite a database includes tables and other items. The scenario that I do not understand, is: say I have a log

Re: [sqlite] creating a table

2016-11-21 Thread Jens Alfke
> On Nov 21, 2016, at 10:08 AM, John R. Sowden > wrote: > > Thank you all for your answers and direction for further information. > Hopefully, I will not bring these subjects up again. :) Some of what you’re asking applies to any SQL database. The SQLite docs do

[sqlite] Table name syntax

2016-11-21 Thread David Raymond
Basic syntax question on qualified table names in a select. I've got 2 attached databases, say db1 and db2, and I try to run... insert into main.foo select db1.foo.* from db1.foo left outer join db2.bar on db1.foo.pk = db2.bar.pk where db2.bar.pk is null; and I get "Error: near "*": syntax

[sqlite] Copying from one table to another

2016-11-21 Thread Vikas Aditya
Hi everyone, I have a DB migration question. I have a table called "employees" and it has a UNIQUE constraint on "employee_email". With some new features being requested, I need to relax the constraint and have a new constraint on "employee_email" + "employee_number". Since SQLite ALTER table

Re: [sqlite] Copying from one table to another

2016-11-21 Thread Richard Hipp
On 11/21/16, Vikas Aditya wrote: > > Currently we are using: > > sql = "INSERT INTO {} SELECT * FROM {}".format(totable, fromtable) > cur.execute(sql) > > So, a single line statement can copy from old to new. But will this work > fine even if I have 100s of thousands of

Re: [sqlite] Copying from one table to another

2016-11-21 Thread Vikas Aditya
Hi Ryan, Thanks for the transaction suggestion. We will do that. I provided a simplistic example for constraints, but I think I have an answer now. Thanks, Vikas On Nov 21, 2016, at 12:24 PM, R Smith wrote: > > > On 2016/11/21 9:57 PM, Vikas Aditya wrote: >> Hi

Re: [sqlite] Copying from one table to another

2016-11-21 Thread R Smith
On 2016/11/21 9:57 PM, Vikas Aditya wrote: Hi everyone, I have a DB migration question. I have a table called "employees" and it has a UNIQUE constraint on "employee_email". With some new features being requested, I need to relax the constraint and have a new constraint on "employee_email"

Re: [sqlite] Table name syntax

2016-11-21 Thread Don V Nielsen
> And since the "*" forms are considered bad style I have done this, not knowing it is bad style. Can you provide some reasons why it is bad? I can assume, "Applications are supposed to be controlled environments, and using tbl.* introduces uncertainty outside the applications control." But are

Re: [sqlite] Table name syntax

2016-11-21 Thread Richard Hipp
On 11/21/16, Don V Nielsen wrote: >> And since the "*" forms are considered bad style > > I have done this, not knowing it is bad style. Can you provide some reasons > why it is bad? Years later when somebody does "ALTER TABLE ... ADD COLUMN" your application will begin

Re: [sqlite] Copying from one table to another

2016-11-21 Thread Vikas Aditya
Thank You! Vikas On Nov 21, 2016, at 12:09 PM, Richard Hipp wrote: > On 11/21/16, Vikas Aditya wrote: >> >> Currently we are using: >> >> sql = "INSERT INTO {} SELECT * FROM {}".format(totable, fromtable) >> cur.execute(sql) >> >> So, a single

Re: [sqlite] When does SQLite open/create files?

2016-11-21 Thread Richard Hipp
On 11/21/16, Jens Alfke wrote: > Does SQLite ever open or create files while a database connection is already > open? (1) When you run ATTACH. (2) The open/create of the original database is deferred until you actually need to read or write the database, so the open/create

Re: [sqlite] Table name syntax

2016-11-21 Thread Richard Hipp
On 11/21/16, David Raymond wrote: > > Following the nice SQL diagrams it looks like in a select you can only have > * or table-name.*, whereas in other places you can have > schema-name.table-name. Granted, the second version can be made prettier and > more readable, but

[sqlite] When does SQLite open/create files?

2016-11-21 Thread Jens Alfke
Does SQLite ever open or create files while a database connection is already open? Or does that only happen while creating the connection? (I'm using WAL mode, if it makes a difference.) --Jens [via iPhone] ___ sqlite-users mailing list

Re: [sqlite] creating a table

2016-11-21 Thread Niall O'Reilly
On 21 Nov 2016, at 21:55, Igor Korot wrote: > You are of course correct. It does depend on an application. > However, I tried to explain the SQLite and its paradigm in terms of > the dBase/FoxPro. You were correct also, Igor, and gave good advice. Best regards, Niall

Re: [sqlite] creating a table

2016-11-21 Thread Igor Korot
Hi, Niall, On Mon, Nov 21, 2016 at 12:52 PM, Niall O'Reilly wrote: > On 21 Nov 2016, at 17:29, John R. Sowden wrote: > >> First of all, I come from the dBASE/Foxpro world. There is no distinction >> between a table and a database. I understand that with Sqlite a database

[sqlite] ANN: SQLite Maestro 16.11 released

2016-11-21 Thread SQL Maestro Group
Hi! SQL Maestro Group announces the release of SQLite Maestro 16.11, a complete Windows GUI solution for SQLite database management. The new version is immediately available at http://www.sqlmaestro.com/products/sqlite/maestro/ Top 10 new features = 1. Support for the FTS5

Re: [sqlite] SQLite binary with Math Functions for OS-X?

2016-11-21 Thread Roman Fleysher
Can't you count how many rows there are and then sort by the variable of interest, limiting output to half the count, all within SQL? Roman Sent from my T-Mobile 4G LTE Device Original message From: Ronald Gombach Date: 11/21/16 7:12 AM (GMT-05:00) To:

[sqlite] SQLite binary with Math Functions for OS-X?

2016-11-21 Thread Ronald Gombach
Is there a pre-c binary of SQLIte available for down load that includes a math library. I particularly need the “median” function. If not, can someone point me to instructions on compilation command line to include the math library (OS-X). Thanks for any info you can share. Ron Gombach

Re: [sqlite] Setting up SQLite for VB6

2016-11-21 Thread J Trahair
Thank you, it's working now. Regards Jonathan On 21/11/2016 09:19, Bart Smissaert wrote: I think you will need this ODBC driver: http://www.ch-werner.de/sqliteodbc/ RBS On Mon, Nov 21, 2016 at 8:12 AM, J Trahair wrote: Hi everyone I am trying to link a

[sqlite] Setting up SQLite for VB6

2016-11-21 Thread J Trahair
Hi everyone I am trying to link a VB6 project to SQLite. (I can do this fine in VB.Net.) I am using System.Data.SQLite.dll file version 1.0.66.0, and the following connection properties: Option Explicit Public grsUtilities As ADODB.Recordset Public gconn As ADODB.Connection Public mstrSQL As

Re: [sqlite] Setting up SQLite for VB6

2016-11-21 Thread Bart Smissaert
I think you will need this ODBC driver: http://www.ch-werner.de/sqliteodbc/ RBS On Mon, Nov 21, 2016 at 8:12 AM, J Trahair wrote: > Hi everyone > > I am trying to link a VB6 project to SQLite. (I can do this fine in > VB.Net.) I am using System.Data.SQLite.dll