Q
Problem solve Get help with specific problems with your technologies, process and projects.

What is the REPLACE function?

I encountered an Oracle function that is new to me. It is used in a where clause/join definition:
FROM T_NIS A, T_MEMBERS B
WHERE A.F_POSTCODE(+) = REPLACE(B.F_POSCOD, ' ')
This REPLACE -- what does it do? Is it similar to NVL?
REPLACE function replaces the occurrence of a sub-string in a string with a specified second sub-string. In the event the second sub-string is not specified, then it removes the occurrence of the first sub-string.

In your example all white spaces will be removed from the valid in B.F_POSCOD column before the equality is verified.

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close