Re: Question about check contraints
From: Narayana Vyas Kondreddi (answer_me_at_hotmail.com)
Date: 06/03/04
- Next message: Satya Prakash Arya: "Bulk Insert on an Partitioned view"
- Previous message: Anith Sen: "Re: SELE£CT 1 <> 2"
- In reply to: Pro: "Re: Question about check contraints"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Jun 2004 16:10:29 +0100
That is not something recognized by LIKE. In this case, it is just a pattern
that CHECK constraint is looking for.
-- HTH, Vyas, MVP (SQL Server) http://vyaskn.tripod.com/ Is .NET important for a database professional? http://vyaskn.tripod.com/poll.htm "Pro" <nospam@nospam.net> wrote in message news:%23EEZz9SSEHA.2408@tk2msftngp13.phx.gbl... What is the meaning of \d{3}? I search the online book but cannot locate the information. "Narayana Vyas Kondreddi" <answer_me@hotmail.com> wrote in message news:Oba5lHJSEHA.3528@TK2MSFTNGP09.phx.gbl... > That CHECK constraint is validating the data that is being stored in the > column colorId, to make sure it is entered in a specific format. For > example, the following are the valid values for that column: > > '\d{3}|(A){3}' > '\d{3}|(1){3}' > '\d{3}|(Z){3}' > > You could SELECT the data out from that column and see what other values are > accepted. > > Look up LIKE in SQL Server Books Online for more iformation on pattern > matching. > -- > HTH, > Vyas, MVP (SQL Server) > http://vyaskn.tripod.com/ > Is .NET important for a database professional? > http://vyaskn.tripod.com/poll.htm > > > "Pro" <nospam@nospam.net> wrote in message > news:OOJf1sISEHA.2000@TK2MSFTNGP11.phx.gbl... > Hi, > > I'm viewing the setting in a table and find an expression in check > contraints. > > ([colorId] like '\d{3}|([A-Z0-3]){3}') > > May I know the meaning for this expression? > > Thx > Charles > > >
- Next message: Satya Prakash Arya: "Bulk Insert on an Partitioned view"
- Previous message: Anith Sen: "Re: SELE£CT 1 <> 2"
- In reply to: Pro: "Re: Question about check contraints"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|