March 25, 2009 at 3:46 am
All,
I am not feeling well.so i wanted to know whom should i contact to get good tablets. Also if anybody suggest some good tablets it will be good. 🙂
Doctor 1:
create table t1
(
eno char(2) COLLATE SQL_Latin1_General_Cp437_CS_AS not null constraint c1 Check ( eno like '[A-Z][A-Z]')
)
insert into t1 values ('Aa')
insert into t1 values ('AA')
Doctor 2:
create table departments
( location CHAR(2) COLLATE SQL_Latin1_General_Cp437_CS_AS not null constraint D_LOC_CHK check (location = upper(location))
)
insert into departments values ('Aa')
insert into departments values ('AB')
Good Tablets are welcome!
🙂
karthik
March 25, 2009 at 7:28 am
Your departments table will allow the following:
insert into departments values ('12')
I'm guessing you only want it to allow uppercase characters A-Z?
March 25, 2009 at 10:05 am
you can specify the collation in a LIKE clause.
Best wishes,
Phil Factor
March 25, 2009 at 11:17 am
The Happy Pill
[font="Courier New"]
CREATE TABLE t1
(
eno CHAR(2) COLLATE SQL_Latin1_General_Cp437_CS_AS NOT NULL
CONSTRAINT c1 CHECK
( eno LIKE
'[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]'
COLLATE SQL_Latin1_General_Cp437_CS_AS)
)
INSERT INTO t1 VALUES ('dF')
INSERT INTO t1 VALUES ('AA')[/font]
Best wishes,
Phil Factor
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply