Re: [SQL] Tidying values on variable instantiation

2005-08-26 Thread Chris Browne
[EMAIL PROTECTED] ("Bath, David") writes: > Question(s): > * Am I being realistic, or should I grit my teeth and clone code from > trigger to trigger and column to column? > * Is this something I should try and do using domains, types and > cast functions from "text" or some horrible combinatio

Re: [SQL] Tidying values on variable instantiation

2005-08-26 Thread Chris Browne
[EMAIL PROTECTED] ("Greg Patnude") writes: > Data validation and purification should be performed at the > application layer -- you should format your data appropriately > BEFORE trying any INSERT/UPDATE operations. It seems to me that one might create some stored functions that can do some valida

Re: [SQL] Tidying values on variable instantiation

2005-08-26 Thread Bruno Wolff III
On Fri, Aug 26, 2005 at 13:04:10 +1000, > Desired Outcome(s): > * I would like to have the convenience of declaring a column that obeys > a constraint (similar to using a domain), but allows a "tidy-up" as the > value is created BEFORE asserting the constraint. This *might* be > termed a "do

Re: [SQL] Tidying values on variable instantiation

2005-08-26 Thread Greg Patnude
IMHO: It's not necessarily the job of the RDBMS to be responsible for formatting and cleaning of your data... This is a job better suited for the application layer and the data model... The RDBMS should only be responsible for enforcing constraints on the data... not validating or purifying the d

Re: [SQL] Tidying values on variable instantiation

2005-08-26 Thread Russell Simpkins
Desired Outcome(s): * I would like to have the convenience of declaring a column that obeys a constraint (similar to using a domain), but allows a "tidy-up" as the value is created BEFORE asserting the constraint. This *might* be termed a "domain trigger". (Perhaps even a WORM is possible!).

Re: [SQL] Tidying values on variable instantiation

2005-08-25 Thread Michael Glaesemann
On Aug 26, 2005, at 12:04 PM, Bath, David wrote: Desired Outcome(s): * I would like to have the convenience of declaring a column that obeys a constraint (similar to using a domain), but allows a "tidy-up" as the value is created BEFORE asserting the constraint. This *might* be term