Igor,

Thanks for the correction on that, probably my wording "I don't think" in my 
mind it meant I'm not sure... Lol, but thats another storry. Check constraints 
are a feature I've not used in sqlite, so hence "I don't think", my mistake and 
my applogies.

In the spirit of the conversation the OP wants the DB to strip out white space. 
I contend that this is the applications responsibility either  as DRH suggested 
by using proper sql expressions. Or by using a trigger. Or better yet by 
implementing inside his application if possible adding code to strip white 
space. 

Triggers are another route, but I recommend letting the DB do its job of 
storage. Don't add the overhead of adding data scrubbing as well. Do the 
scrubbing at the application side where it belongs.

Regards,
Ken


Igor Tandetnik <[EMAIL PROTECTED]> wrote: Ken  wrote:
> Some commecial products have "check constraints" that allow you to
> enable a check on a column that can be stored procedural code. That
> could also be another way of keeping "non-trimmed" data out.  
> 
> I don't think sqlite supports column level check contstraints.

Does too.

create table test(txt CHECK(txt = trim(txt)));
insert into test(txt) values(' a '); -- constraint failed

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------


Reply via email to