Home » SQL & PL/SQL » SQL & PL/SQL » not equal- != or <>
not equal- != or <> [message #37692] Thu, 21 February 2002 08:24 Go to next message
Jeff Lassen
Messages: 2
Registered: February 2002
Junior Member
I have been getting variable results with != within a number of ORACLE procedures I have written. I can't seem to find a pattern to when it doesn't work. Do I need to change all occurrences of != to <>, or are there some specific types of uses for which it will not work.
Current example:

IF v_mins_done != 'T'
THEN
v_mins_appl_priv_other := '1';
v_mins_done := 'T';
END IF;

does not do the desired action when v_mins_done = 'F'.

Thanks for the help!
Re: not equal- != or <> [message #37693 is a reply to message #37692] Thu, 21 February 2002 11:09 Go to previous message
Jon
Messages: 483
Registered: May 2001
Senior Member
It works for me. What is the datatype of v_mins_done?

16:04:03 ==> declare
16:07:51 2 v_mins_done varchar2(1) := 'F';
16:07:51 3 begin
16:07:51 4 if v_mins_done != 'T' THEN
16:07:51 5 dbms_output.put_line ('!= worked');
16:07:51 6 else
16:07:51 7 dbms_output.put_line ('!= did not work');
16:07:51 8 end if;
16:07:51 9 end;
16:07:52 10 /
!= worked
Previous Topic: create sql to add indexes to all foreign keys
Next Topic: help with some DBMS_SQL Code
Goto Forum:
  


Current Time: Fri Mar 29 05:17:25 CDT 2024