Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
swekik
Posting Yak Master
126 Posts |
Posted - 2008-06-24 : 23:28:45
|
| Hello Everyone, I am new to this (especially T-sql).I need to define a column in a table.What is the condition do i need to give if one of my column has a length 12 and positions 1-4 alpha prefix,position 5-8 numeric,9-12 alphabetic?? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-06-24 : 23:34:56
|
create the column as varchar(12) or char(12) and perform the required validation / constraint in your front end during data entry. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
swekik
Posting Yak Master
126 Posts |
Posted - 2008-06-24 : 23:42:41
|
| Thanks for the reply khtan,I need to create constraint at the column level while defining the column.I need the specific constraint that is going to be defined. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-25 : 01:19:23
|
quote: Originally posted by swekik Thanks for the reply khtan,I need to create constraint at the column level while defining the column.I need the specific constraint that is going to be defined.
I think its better to write a CLR function if you reuire some complex string validations. |
 |
|
|
swekik
Posting Yak Master
126 Posts |
Posted - 2008-06-25 : 12:36:21
|
| 'I think its better to write a CLR function if you reuire some complex string validations.'Can you help me in writing that? |
 |
|
|
swekik
Posting Yak Master
126 Posts |
Posted - 2008-06-25 : 23:15:01
|
| Can any body tell me how to write that?? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-26 : 10:38:32
|
quote: Originally posted by swekik Can any body tell me how to write that??
You may need to post at .NET ForumMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|