mardi 2 mai 2017

String Comparision in If condition in PL/SQL

I have the following code

create or replace procedure deact_user (i_email in varchar2
                                               ) is

var1 varchar2(200);
begin
  for em_id in (select abc.emai_id from abc)
    LOOP
      if (i_email <> em_id) then

        dbms_output.put_line('Not working');
        else
          dbms_output.put_line('Working');
          end if;
          end loop;
            end;

I need to compare the i_email which is a input parameter with em_id which is a for loop which loops the table abc having field as emai_id. Iam facing error PLS=00306 wrong type of arguments in call to '!=' Please help

Aucun commentaire:

Enregistrer un commentaire