Re: [sqlite] Prevent non-Integers going into int fields.

2014-08-02 Thread Peter Aronson
If you don't mind requiring that the value being inserted be typed integer, you can use: create table t1 (c1 integer check (typeof(c1) = 'integer')); But this means that values that could be converted to integers by the integer affinity of the column, like 4.0 or '1' will be cause a check

[sqlite] Prevent non-Integers going into int fields.

2014-08-02 Thread Richard Warburton
Whilst any type going into a field is often seen as a big plus, there are occasions where this may be undesirable. For such occasions, I'm currently thinking that: NOT NULL CHECK( ROUND(fieldname)=fieldname ) looks ok, but I'm wondering if there's a case that still gets through or if there's a

Re: [sqlite] Only allow child record if another field in parent is false.

2014-08-02 Thread Richard Warburton
Hi, Thanks to those who gave feedback. It looks like that it will be best left to business rules. In the event that enrolmentItems are attached to leaver enrolments (due to a coding error), they will be ignored. Thanks. ___ sqlite-users mailing list

Re: [sqlite] Views as Virtual Tables -- Command line vs. Called Interface

2014-08-02 Thread Jim Callahan
Keith, I got apsw to work, but it had a curious side-effect -- it clobbered my IPython prompt (replaced prompt with smiley faces). For those who are interested. 1. downloaded apsw -- does not work with Python's package manager pip

Re: [sqlite] Handling Timezones

2014-08-02 Thread Jim Callahan
I assume you know about the timezone (tz) database maintained by the Internet Assigned Numbers Authority (IANA) -- it is sometimes referred as the Eggert/Olson database -- after its code and data maintainers. http://www.iana.org/time-zones "The tz database is published as a set of text files

[sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-02 Thread 王庆刚
hi , Can Sqlite3.c and sqlite.h be compiled in Workbench3.2 for Vxworks6.8 ? When I compile them , there have so many problems . ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Views as Virtual Tables -- Command line vs. Called Interface

2014-08-02 Thread Jim Callahan
THANK YOU!!! On Fri, Aug 1, 2014 at 6:17 PM, Keith Medcalf wrote: > Works just fine. The SQL adaption layer in your chosen Python -> SQLite > interface must be doing something wacky. Thank you for demonstrating that alternative packages do work. apsw looks good and a

Re: [sqlite] Handling Timezones

2014-08-02 Thread Tim Streater
On 02 Aug 2014 at 00:27, Stephen Chrzanowski wrote: > I understand that with routing and such, you can end up outside where you > really are (With my IP, I'm shown just outside of Toronto when I'm actually > two hours out), but the chances of showing up in Taiwan when