RE: Trigger/character search

2002-10-25 Thread Mirsky, Greg
Something like this??? DECLARE --x VARCHAR2 (128) := 'abcdefg'; x VARCHAR2 (128) := 'abcdefg123'; BEGIN DBMS_OUTPUT.ENABLE (100); IF SUBSTR (x, LENGTH (x) - 1, 1) IN ('1', '2', '3', '4', '5',

RE: Trigger/character search

2002-10-25 Thread Mercadante, Thomas F
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 h

RE: Trigger/character search

2002-10-25 Thread Balaraman, Arvind
Hi You can do something like this no number(10) ; begin no := to_number(substr(character_with_pattern, length(character_with_pattern),1); -- if the control comes here it is a number -- flag it -- exception when value_error then do not flag it; -- end; -Original Message

Trigger/character search

2002-10-25 Thread Mike Sardina
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://w