Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Trigger/character search

RE: Trigger/character search

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Fri, 25 Oct 2002 12:01:39 -0800
Message-ID: <F001.004F4254.20021025120139@fatcity.com>


Mike,

You could try:

  if substr(:new.column_name,-1,1) in
('0','1','2','3','4','5','6','7','8','9') then

      do something;
  end if;

Not sure what you want to do in the trigger if the above condition exists. The
Substr command can look at the last character of the column for you.

Hope this helps.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Friday, October 25, 2002 3:39 PM
To: Multiple recipients of list ORACLE-L

Is there any way to do pattern matching in a PL/SQL trigger? In other words,
if I had two strings and one ended with a character (ie. "g") and one ended with a number, is there a way to search for it so that it would flag if it is
only a number?

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mike Sardin
  INET: cemail2_at_sprintmail.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Oct 25 2002 - 15:01:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US