Re: [sqlite] Advice on using dates and hours for bin counts, time-zone agnostic

2017-01-10 Thread David Raymond
I'm not quite sure on that first update statement, seems like you're not using it right. Otherwise though I think I'd recommend storing things as text "-MM-DD HH:MM:SS" as that's the input type for strftime, which is what would be used for the queries. It also doesn't include the time

Re: [sqlite] Connecting DataBases files into one

2017-01-10 Thread Simon Slavin
On 10 Jan 2017, at 12:08pm, rmroz80 wrote: > I have one question with sqlite database files. In my company (school) there > is an application called SIO (System Informacji Oświatowej - Educational > Information System). This program is running on 2 independent computers. Each

[sqlite] Advice on using dates and hours for bin counts, time-zone agnostic

2017-01-10 Thread Jeffrey Mattox
My application will be counting events and saving the totals for every 15-minute time period over many days -- that table will have an eventCount and a date/time for each bin. I'll be displaying the data as various histograms: the number of events per day over the year (365 values), the number

Re: [sqlite] Simplify multiple use of value in a trigger

2017-01-10 Thread James K. Lowden
On Sat, 7 Jan 2017 17:54:20 -0500 Gan Uesli Starling wrote: > As for the suggestion to 'normalize' my four tables to one ... yes, I > could do that ... but it would make for a LOT of redundant data > duplicated in plural columns, which seems to me in my doubtless > ignorant

[sqlite] Potential small incompatibility 3.15 -> 3.16

2017-01-10 Thread Martin Raiber
Hi, with 3.15: sqlite> PRAGMA quick_check; integrity_check ok with 3.16: sqlite> PRAGMA quick_check; quick_check ok The second one is more intuitive, but existing applications may use the first column name. Regards, Martin Raiber ___ sqlite-users

Re: [sqlite] Potential small incompatibility 3.15 -> 3.16

2017-01-10 Thread Richard Hipp
This is, arguably, a bug fix. On 1/10/17, Martin Raiber wrote: > Hi, > > with 3.15: > > sqlite> PRAGMA quick_check; > integrity_check > ok > > with 3.16: > > sqlite> PRAGMA quick_check; > quick_check > ok > > The second one is more intuitive, but existing applications may

Re: [sqlite] Advice on using dates and hours for bin counts, time-zone agnostic

2017-01-10 Thread Jim Callahan
I agree with Dave Raymond, I would use "-MM-DD HH:MM:SS" format because it is both sortable and comparable as well as an ISO standard (ISO 8601). In addition, you don't have to know the base date the number of days were calculated since. The base date (epoch) for MS Excel Windows, MS Excel

[sqlite] Bug in mkFullPathname

2017-01-10 Thread skywind mailing lists
Assume I have got a zPath like abc.def passed to mkFullPathname. Inside mkFullPathname zPath[0] != '/' will evaluate to true. Assume further that osGetcwd(..) will return '/' (which can actually be the case under Android and theoretically under other systems as well but probably less likely).

Re: [sqlite] Bug in mkFullPathname

2017-01-10 Thread Richard Hipp
On 1/10/17, skywind mailing lists wrote: > zout will contain finally "//abc.def". This is an invalid > pathname, I believe. Actually, //abc.def and /abcdef are equivalent, on every unix system I have ever used. Try it! ls /bin ls //bin ls //bin -- D.

Re: [sqlite] Bug in mkFullPathname

2017-01-10 Thread Warren Young
On Jan 10, 2017, at 3:17 PM, Richard Hipp wrote: > > On 1/10/17, skywind mailing lists wrote: >> zout will contain finally "//abc.def". This is an invalid >> pathname, I believe. > > Actually, //abc.def and /abcdef are equivalent, on every unix system

Re: [sqlite] Foreign key error...

2017-01-10 Thread Keith Medcalf
You are correct, however, if there were a unique constraint placed on tracks.name, then a given track could only appear once (in the first case), or in multiple places (in the second case). > -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]

Re: [sqlite] Foreign key error...

2017-01-10 Thread Simon Slavin
On 11 Jan 2017, at 1:02am, Keith Medcalf wrote: > You are correct, however, if there were a unique constraint placed on > tracks.name, then a given track could only appear once (in the first case), > or in multiple places (in the second case). _The Power of Love_ was

[sqlite] INSERT is corrupting a database

2017-01-10 Thread Kevin O'Gorman
This is a problem I don't quite know how to report in a way that will be useful. I'm using Python 3.5 and its builtin sqlite package. I have a modest amount of data that I'm loading into an SQLite database for the first time. For the moment it contains just two tables and a few indices, nothing

Re: [sqlite] INSERT is corrupting a database

2017-01-10 Thread Simon Slavin
On 11 Jan 2017, at 3:28am, Kevin O'Gorman wrote: > I have a modest amount of data that I'm loading into an SQLite database for > the first time. For the moment it contains just two tables and a few > indices, nothing else. The first table loads okay, and if I stop the

[sqlite] Hello Intro verify

2017-01-10 Thread Robert Eppich
Hello All, I am using SQLite with LiveCode 8.1.2 As per LiveCode recommendations I am moving from a CardBase to an SQLite DataBase. I really like the speed increases I have witnessed and thought I should join this mailing list. Greeting to you from BC Canada. Thanks Rob

[sqlite] About ticket c92ecff2ec5f1784 LEFT JOIN problem

2017-01-10 Thread Domingo Alvarez Duarte
Hello Richard ! Now that you are dealing with this ticket http://www.sqlite.org/src/info/c92ecff2ec5f1784 could be a good moment to acknowledge the problem reported before (see bellow), I'm not sure why you have answered this way without acknowledge any further action on it. I was expecting

Re: [sqlite] Foreign key error...

2017-01-10 Thread James K. Lowden
On Sun, 08 Jan 2017 05:57:46 -0700 "Keith Medcalf" wrote: > artistid integer references artists Hmph. Learn something new every day. Where is that abbreviated form documented? I looked for "references" on the Create Table page, and didn't find anything about its

Re: [sqlite] Need help with System.Data.SQLite

2017-01-10 Thread GB
SQLite does not really care about precision and scale. See https://sqlite.org/datatype3.html for more information. The culprit lies in the use of SqlDecimal which cannot be used by System.Data.SQLite directly and has no implicit conversion to something understandable by System.Data.SQLite

Re: [sqlite] INSERT is corrupting a database

2017-01-10 Thread Clemens Ladisch
Kevin O'Gorman wrote: > If I go on to the second table, it appears to finish normally, but when I > try to look at the database with sqlite3, a command-line tool for > interacting with SQLite, it says the database is corrupt. What version? > If however, I split the program into two programs, one

Re: [sqlite] Connecting DataBases files into one

2017-01-10 Thread Jim Callahan
​​ Agree with Stephen and Dr. Hipp 1. Make copies of the SQLite data files when the SIO program is not in use and without using a network -- use a USB stick or removable disk (prevent corruption, always good to have a backup) 2. Using the SQLite command line interface (CLI)

Re: [sqlite] Need help with System.Data.SQLite

2017-01-10 Thread Burtsev , Dmitriy
Thank you for response. It looks like we are on different pages here. Let me start from the beginning. We are moving data between SQLite database and Microsoft SQL Server. At this time we are using Excel files but we run into some Excel limitation. I am trying to change Excel files to SQLite

Re: [sqlite] Advice on using dates and hours for bin counts, time-zone agnostic

2017-01-10 Thread Simon Slavin
On 10 Jan 2017, at 3:01pm, Jeffrey Mattox wrote: > Pseudo SQL: > UPDATE Events SET count = count + 1 WHERE eventTime = > integer(now_minutes/15) > SELECT TOTAL(count) FROM Events WHERE eventTime is Jan 3 of every year > SELECT TOTAL(count) FROM Events WHERE eventTime

Re: [sqlite] Using CSV.c

2017-01-10 Thread Warren Young
On Jan 10, 2017, at 3:03 AM, tbuck...@frontier.com wrote: > > I can manually do it with the dot (.) tools, but I want to automate this by > executing one exe file. Ah, I see, you want to reinvent the wheel[*] because your platform of choice doesn’t have shell scripts. Got it. In that case,

Re: [sqlite] Foreign key error...

2017-01-10 Thread David Raymond
On the foreign key page (http://www.sqlite.org/foreignkeys.html) at the very end of section 3 is has: CREATE TABLE artist( artistidINTEGER PRIMARY KEY, artistname TEXT ); CREATE TABLE track( trackid INTEGER, trackname TEXT, trackartist INTEGER REFERENCES artist ); CREATE

Re: [sqlite] Using CSV.c

2017-01-10 Thread Edward Lau
Maybe the following example may help: https://github.com/elau1004/TFR4SQLite/blob/master/src/test/031_testColumn.init Check out the wiki too regarding using the "-init" command line option. -Original Message- From: tbuckner To: sqlite-users

[sqlite] Using CSV.c

2017-01-10 Thread tbuck...@frontier.com
Hello,I am having a little trouble implementing the csv.c program for SQLite.  Are their any programming examples available? All I want to do is import a csv file to a database, sort the file and output the results to another csv file all in c code.  I can manually do it with the dot (.) tools,

Re: [sqlite] Using CSV.c

2017-01-10 Thread Don V Nielsen
I would recommend using a script or batch file to automate the process using the command line tool. It would be easier to maintain and remove a level or two of complexity. On Tue, Jan 10, 2017 at 4:03 AM, tbuck...@frontier.com < tbuck...@frontier.com> wrote: > Hello,I am having a little trouble

[sqlite] Connecting DataBases files into one

2017-01-10 Thread rmroz80
Good morningI have one question with sqlite database files. In my company (school) there is an application called SIO (System Informacji Oświatowej - Educational Information System). This program is running on 2 independent computers. Each program has own sqlite file called SIO2.sqlite and

Re: [sqlite] Connecting DataBases files into one

2017-01-10 Thread Stephen Chrzanowski
It is possible, but not automatically, and there are a couple of options available. It also depends on how the data is structured. For any interaction, you'll need to pull the data from the remote machines to the machine you'll be working on. (Do not access the files remotely while there is

Re: [sqlite] Connecting DataBases files into one

2017-01-10 Thread Richard Hipp
On 1/10/17, Stephen Chrzanowski wrote: > (Do not access the files remotely > while there is even a small chance that the remote computers will access > the database -- Corruption can occur) Everything Stephen says is correct. I'd just like to add that the possibility of