Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Difference between decode nad replace

626981Mar 27 2008 — edited Mar 27 2008
can you plz highlight the difference between decode and replace.. am using oracle10g r2 on solaris....

these r the 2 quereies...


select count(DECODE(EMAIL_L,'%@yahoo.com%','%@thoyahoo.com%')) FROM SIEBEL.MAIL

i understand here if EMAIL_L is like @yahoo.com then it returns @thoyahoo.com

select count(REPLACE(EMAIL_L,'%@yahoo.com%','%@thoyahoo.com%')) FROM SIEBEL.MAIL

and here also if EMAIL_L has @yahoo.com then it returns @thoyahoo.com

But when i try and execute each of them i dont get any output in the decode query....




Any explainations???
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2008
Added on Mar 27 2008
6 comments
1,768 views