Of course, you're right. I would much rather have clean
data in the first place. I'm just starting in this place,
and there are so many things I want to change...
Are you saying that SQL is not appropriate to perform
several updates on all the rows of a big table?
to validate the>-----Original Message----->>> have an Orders table with 1 million rows, and I needrules are for all>values in every column <<
>Considering that we have no idea waht the validationnot do this in>the columns and *all combinations* of columns, I wouldnobody put a>SQL. Find a data scrubbing tool and use it.
>Your example of having an invalid order_type means thatnot do their>CHECK() or REFERENCES clause on that column. Somebody didshoot guy who>job when the schema was designed. First thing, find andplace. This>allowed the database to accept the bad data in the firstwith a tool. And>will help prevent future problems. Scrub the databaseschema to prevent>start adding constraints, checks and defaults to thewhat the keys,>having a repeat of this in the future.
> Please post DDL, so that people do not have to guessdatatypes, etc. in your>constraints, Declarative Referential Integrity,***>schema are.
>*** Sent via Developersdex [url]http://www.developersdex.com[/url]>Don't just participate in USENET...get rewarded for it!