If you want to write a function to do it, here's an example. FUNCTION check_valid_zipcode (zipcode IN VARCHAR2 ) RETURN NUMBER IS tempnum number; my_sqlcode NUMBER; BEGIN BEGIN tempnum := TO_NUMBER(SUBSTR(zipcode,1,5),'99999'); RETURN 0; EXCEPTION WHEN OTHERS THEN my_sqlcode := SQLCODE; -- IF my_sqlcode < -01800 AND my_sqlcode > -01899 THEN RETURN -1; -- END IF; END; END;
-----Original Message----- From: Misty Woodward [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 1:07 PM To: [EMAIL PROTECTED] Subject: Re: [KCFusion] Numeric Check in PL/SQL This doesnt work in a block of code. Here is what I am going for, FN_ISNUMERIC is a function I am working in now having not found a standard Numeric check type function.So if you know of something a little easier to work with I would greatly appreciate it BEGIN SELECT SF_INTRANSIT(TRIM(V_DEST), TRIM(V_ORIG), TRIM(V_SHIPPER), TRIM(V_TRACKNUMBER), TRIM(V_TICKETNUM), TRIM(V_CONTACT)) AS V_SYSTEM_RESULT FROM DUAL; IF FN_ISNUMERIC(LEFT(V_SYSTEM_RESULT, 2)) THEN -- IF NUMERIC THEN THERE IS AN ERROR CODE V_RETURN := V_SYSTEM_RESULT; GOTO RETURN_VALUE; ELSE -- GOOD TO GO AND GOT A SYSTEM BACK V_RETURN := 'Finally!' EXCEPTION END; ---------- Original Message ---------------------------------- From: "Solution Hatch" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Tue, 3 Sep 2002 12:16:27 -0500 >LIKE >Any single character within the specified range ([a-f]) or set ([abcdef]). >WHERE foo LIKE '[abcdefghijklf]' > >Determines whether or not a given character string matches a specified >pattern. A pattern can include regular characters and wildcard characters. >During pattern matching, regular characters must exactly match the >characters specified in the character string; wildcard characters, however, >can be matched with arbitrary fragments of the character string. Using >wildcard characters makes the LIKE operator more flexible than using the = >and != string comparison operators. If any of the arguments are not of >character string data type, Microsoft® SQL ServerT converts them to >character string data type, if possible. > >Syntax >match_expression [NOT] LIKE pattern [ESCAPE escape_character] > >Arguments > match_expression > Is any valid SQL Server expression of character string data type. > pattern > Is the pattern to search for in match_expression, and can include these >valid SQL Server wildcard characters. > \ >Not sure if it will work within Oracle.... > > >----- Original Message ----- >From: "Misty Woodward" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Tuesday, September 03, 2002 12:06 PM >Subject: [KCFusion] Numeric Check in PL/SQL > > >> Does anyone know of a function using PL/SQL that checks the value of a >variable to see if it contains all numbers or number and alpha. I originally >planned on doing this in CF with the IsNumeric check but just got shot down >to do it the oracle Function Im writing. >> >> Thanks, >> Misty >> >> >> ______________________________________________________________________ >> The KCFusion.org list and website is hosted by Humankind Systems, Inc. >> List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org >> Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] >> To Subscribe.................... mailto:[EMAIL PROTECTED] >> To Unsubscribe................ mailto:[EMAIL PROTECTED] >> > > > >______________________________________________________________________ >The KCFusion.org list and website is hosted by Humankind Systems, Inc. >List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org >Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] >To Subscribe.................... mailto:[EMAIL PROTECTED] >To Unsubscribe................ mailto:[EMAIL PROTECTED] > > ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]