List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:May 3 2007 12:41pm
Subject:Re: Enforcing Data Format
View as plain text  

>
> > > Is it possible to enforce data formatting in fields using
> > something like
> > > a regular expression?
> > > varchar is great but does not stop someone putting in the wrong
> > > reference number.
> >
> > Dates should be in a DATE column, not a varchar.
>
> The OP says 'data' not 'date' :) He is talking about a reference number
that
> needs to be in a certain format.

Woops, I stand corrected :-)

Dang, I really should stop reading data as date. I do that quite often.

> I too would argue that this requirement is more application layer than in
> the database. Surely anyone editting the tables directly should know what
> they're doing and adhere to the correct format.


Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

Thread
Enforcing Data FormatTim Milstead3 May
  • Re: Enforcing Data FormatBaron Schwartz3 May
  • Re: Enforcing Data FormatMartijn Tonies3 May
    • RE: Enforcing Data FormatEdward Kay3 May
      • Re: Enforcing Data FormatMartijn Tonies3 May
  • Re: Enforcing Data FormatMogens Melander3 May
    • Re: Enforcing Data FormatStephen Cook3 May
  • Re: Enforcing Data FormatMartijn Tonies3 May
Re: Enforcing Data FormatB. Keith Murphy3 May