Home » SQL & PL/SQL » SQL & PL/SQL » Need help on Triggers
Need help on Triggers [message #234864] Thu, 03 May 2007 06:18 Go to next message
saifu
Messages: 2
Registered: May 2007
Location: India
Junior Member

Hi All,

I want to write some Triggers on the following:-

1) Phone No should be inserted in format
<STD Code in 3 digit> -2 <Any 7 digit no>

Ex:- 011-26107221

2) Email ID should be inserted in a proper format.

- It should not start with a no.
- Only single @ is allowed.
- No special characters #, ^, {, ?, ) are allowed.

Pls help me out in writing these triggers.

Regards.
Re: Need help on Triggers [message #234883 is a reply to message #234864] Thu, 03 May 2007 07:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Database Application Developer's Guide - Fundamentals, Chapter 9 "Coding Triggers".

SQL Reference, SUBSTR, INSTR, REGEXP_LIKE functions.

Regards
Michel

[Updated on: Thu, 03 May 2007 07:03]

Report message to a moderator

Re: Need help on Triggers [message #235008 is a reply to message #234864] Thu, 03 May 2007 13:42 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Hi,
the given rules seem simple to me, so that CHECK constraints could enforce them too.
Re: Need help on Triggers [message #235015 is a reply to message #235008] Thu, 03 May 2007 14:03 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And you're perfectly right.

Regards
Michel
Previous Topic: Some questions in pl/sql
Next Topic: Query Help
Goto Forum:
  


Current Time: Sun Dec 04 04:24:33 CST 2016

Total time taken to generate the page: 0.14155 seconds