Home » RDBMS Server » Server Utilities » Using LIKE operator in DECODE
Using LIKE operator in DECODE [message #71224] Thu, 26 September 2002 06:39 Go to next message
Choon
Messages: 1
Registered: September 2002
Junior Member
Is it possible to use LIKE operator in a DECODE statement in a query
Re: Using LIKE operator in DECODE [message #71233 is a reply to message #71224] Fri, 27 September 2002 07:38 Go to previous messageGo to next message
Saravanakumar
Messages: 8
Registered: September 2002
Junior Member
no. if u have 9i, u can use CASE expressions. See the Oracle documents. Or u can use Substr command in the Decode. Give the situation where u want to use the LIKE in Decode. There can be some other options.
Re: Using LIKE operator in DECODE [message #71947 is a reply to message #71233] Mon, 10 February 2003 14:51 Go to previous message
Derrick Roberts
Messages: 1
Registered: February 2003
Junior Member
I want to SELECT the last 4 chars of my zip_code column if the entire contents of the column (for a given row) is LIKE '_____-____' ...that is, matches the pattern: 5 characters then a dash then 4 characters. That is enough validation that it would fit a zip + 4 format for this particular scenario.

How do you accomplish this otherwise?
Previous Topic: Move Tables to Correct user(schema)
Next Topic: User defined function in SQL*LOADER
Goto Forum:
  


Current Time: Tue Dec 24 08:14:04 CST 2024