[sqlite] regular expression in check constraint?

2015-11-25 Thread R Smith
On 2015/11/25 1:44 AM, Igor Tandetnik wrote: > On 11/24/2015 6:07 PM, Richard Hipp wrote: >> On 11/24/15, James Hartley wrote: >>> I would like to add a check constraint which determines if a string >>> contains all digits, ie. >>> >>> sqlite> select zip_code from zip_codes where

[sqlite] regular expression in check constraint?

2015-11-25 Thread Keith Medcalf
gt; To: General Discussion of SQLite Database > Subject: [sqlite] regular expression in check constraint? > > I would like to add a check constraint which determines if a string > contains all digits, ie. > > sqlite> select zip_code from zip_codes where regexp(zip_code, > '^[[:dig

[sqlite] regular expression in check constraint?

2015-11-24 Thread Igor Tandetnik
On 11/24/2015 6:07 PM, Richard Hipp wrote: > On 11/24/15, James Hartley wrote: >> I would like to add a check constraint which determines if a string >> contains all digits, ie. >> >> sqlite> select zip_code from zip_codes where regexp(zip_code, >> '^[[:digit:]]+$'); >> >> However, this generates

[sqlite] regular expression in check constraint?

2015-11-24 Thread Richard Hipp
On 11/24/15, James Hartley wrote: > I would like to add a check constraint which determines if a string > contains all digits, ie. > > sqlite> select zip_code from zip_codes where regexp(zip_code, > '^[[:digit:]]+$'); > > However, this generates the error: > > Error: no such function: regexp

[sqlite] regular expression in check constraint?

2015-11-24 Thread James Hartley
I would like to add a check constraint which determines if a string contains all digits, ie. sqlite> select zip_code from zip_codes where regexp(zip_code, '^[[:digit:]]+$'); However, this generates the error: Error: no such function: regexp Searching through sqlite.org points that this