Home » SQL & PL/SQL » SQL & PL/SQL » Function To Reverese The Phone Number
Function To Reverese The Phone Number [message #659926] Sun, 05 February 2017 14:49 Go to next message
Hemanth319
Messages: 3
Registered: February 2017
Junior Member
I am new to plsql and I came across to this problem I am unable to adddress it.

the data has employeeid, firstname, lastname, phoneno, email, sal, manageid.... etc.

Write a function to reverse the phone number if the 3rd last character of full name (first name + last
name) is #e#


Thanks for your help.
Re: Function To Reverese The Phone Number [message #659927 is a reply to message #659926] Sun, 05 February 2017 15:16 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I may be wrong, but this problem looks like a homework. Is it?

Anyway: what code did you manage to write so far in order to solve the problem? Would you mind to post it? Someone will certainly assist to help you make it work or - if it works - make it better (if possible).
Re: Function To Reverese The Phone Number [message #659929 is a reply to message #659927] Sun, 05 February 2017 16:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Welcome to this forum

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read
Re: Function To Reverese The Phone Number [message #659935 is a reply to message #659929] Sun, 05 February 2017 19:30 Go to previous messageGo to next message
Hemanth319
Messages: 3
Registered: February 2017
Junior Member
Not exactly home work but sort of
Re: Function To Reverese The Phone Number [message #659942 is a reply to message #659926] Mon, 06 February 2017 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Re: Function To Reverese The Phone Number [message #659969 is a reply to message #659942] Mon, 06 February 2017 14:54 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
update my_table
set phone_number = reverse(phone_number)
where first_name||last_name like '%#e#';
Previous Topic: Writing multiple Files using UTL_FILE
Next Topic: Cursor Program To Find Tax Amount
Goto Forum:
  


Current Time: Fri Apr 19 18:20:02 CDT 2024