Home » RDBMS Server » Server Administration » Difference between Select Decode.... and Select Replace...
Difference between Select Decode.... and Select Replace... [message #374178] Tue, 29 May 2001 12:36 Go to next message
Arvind Bhaskar
Messages: 1
Registered: May 2001
Junior Member
Hi friends

Any body who can elaborate on the difference between the decode and replace function in sql
Re: Difference between Select Decode.... and Select Replace... [message #374179 is a reply to message #374178] Tue, 29 May 2001 12:46 Go to previous message
Jon
Messages: 483
Registered: May 2001
Senior Member
DECODE returns alternative values based upon what is return. For example, if "A" or "T" is returned from the query, "Active" or "Terminate" could be displayed. REPLACE replaces character strings within the return value with an alternative character string, or optionally NULL. so that REPLACE('Hello Fred',' ','') becomes HelloFred.
Previous Topic: Leading Zeros
Next Topic: dual
Goto Forum:
  


Current Time: Mon Dec 23 13:39:20 CST 2024