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 |
sacko_ax
Starting Member
21 Posts |
Posted - 2006-11-30 : 07:55:15
|
this is what i am looking for, A client with an email address that does not end in uk cannot make a room bookingAny ideas |
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2006-11-30 : 08:02:08
|
right(emailaddress, 2) <> 'UK'Duane. |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-30 : 08:02:20
|
Why do you need trigger for this? Column level CHECK constraint will serve your purpose.CREATE TABLE ROOMS(COL1 ...COL2 ...,EMAIL VARCHAR(50) CHECK (EMAIL LIKE '%.UK')) Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-11-30 : 08:11:03
|
"Why do you need trigger for this?"I read it as a constraint on the ROOM_BOOKING table which joins to the CLIENT table (and needs to check the CLIENT.EMAIL_ADDRESS column)Kristen |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-30 : 08:15:05
|
You can read between the lines, Kristen! Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
sacko_ax
Starting Member
21 Posts |
Posted - 2006-11-30 : 08:18:17
|
anyone fancy doin it for me if i send you the source code |
 |
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2006-11-30 : 08:23:20
|
I'll do it - send you salary along with the source code to me.Duane. |
 |
|
sacko_ax
Starting Member
21 Posts |
Posted - 2006-11-30 : 08:24:02
|
sounds like a plan if you ask me how much |
 |
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2006-11-30 : 08:27:08
|
Just to clear things up, before people think that I am using this as an advertising medium.I WAS JOKING - You know that Right?Post the Table layout/s and sample data - and I'm sure that somebody can help/guide you.Duane. |
 |
|
sacko_ax
Starting Member
21 Posts |
Posted - 2006-11-30 : 08:30:59
|
Think we know your jokin lol |
 |
|
|
|
|