Home » SQL & PL/SQL » SQL & PL/SQL » String Comparasition
String Comparasition [message #642505] Sun, 13 September 2015 12:28 Go to next message
steek12
Messages: 2
Registered: September 2015
Junior Member
Hello,

i try to compare one string(first name+last name) with one combined name:

if(l.Name = (l.firstname||' '||l.lastname)) then
v_used_id :=v_t_id;
end if;

(l.Name is 'Tana Myer'; l.firstname is 'Tana' and l.lastname is 'Myer'). The problem is that the v_used_id
will never assigned. The both strings are equal but the v_used_id is never assigned.

Please help me to understand this problem.

Thank you.
Re: String Comparasition [message #642506 is a reply to message #642505] Sun, 13 September 2015 12:43 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

I suspect the Problem Exists Between Keyboard And Chair.

How can we reproduce what you report?
Re: String Comparasition [message #642507 is a reply to message #642505] Sun, 13 September 2015 12:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Quote:
Please help me to understand this problem.


You did not do what you think you did.
Retry or show us what you actually did.

Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Use SQL*Plus and copy and paste what you already tried.
Also always post your Oracle version, with 4 decimals.

Example:
SQL> select 'OK' from dual
  2  where 'Tana Myer' = 'Tana'||' '||'Myer'
  3  /
'O
--
OK

Re: String Comparasition [message #642536 is a reply to message #642507] Mon, 14 September 2015 03:42 Go to previous message
steek12
Messages: 2
Registered: September 2015
Junior Member
you are right the problem was in me. This if-statement was never read. I am sorry for silly question.
Previous Topic: how to write this unpivot query
Next Topic: Display the range wise column names
Goto Forum:
  


Current Time: Tue Aug 04 11:36:50 CDT 2026