On 12 Aug 2013, at 10:51am, Stephen Hughes <ri...@cix.co.uk> wrote: > SQLite Input with validation and lookup > This may be a FAQ, if so please point me in the right direction, but if > not what I am looking for is a BROWSE style INPUT which will:- > - allow me to force UPPER case. > - set MAXIMUM/MINIMUM values.
You can define your column schema so that values which break the above requirements will not be allowed into that column. Look at CHECK constraints in <http://www.sqlite.org/lang_createtable.html> > - LOOKUP and retrieve data from a masterfile. No. You can define a FOREIGN KEY which will only allow only values stored in another table (i.e. entering a new Book, allowing an author only if already entered into your Authors table). But you can't do a lookup as part of an INSERT purely by writing SQL. You will need to do something inside your programming language. Hmm. Come to think of it it may be possible using a TRIGGER. I do not know what you want for your overall post. Are you asking for examples in a particular programming language ? If not, just read the SQLite documentation. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users