Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> procedure won't accept IF

procedure won't accept IF

From: Michelle <michellesihdu_at_hotmail.com>
Date: 19 Oct 2004 10:45:57 -0700
Message-ID: <10de379.0410190945.4f7befaa@posting.google.com>


Hi
I am creating a DAD and I have a stupud problem that I don't understand.
It works fine until I put a line that says IF something THEN

--
END IF

I have been working with oracle for quite some time and created
many regular procedures with IF-statements, so I don't understant
this.

Here's the errors I get when I add the IF-statements:
43/5     PLS-00103: Encountered the symbol "if

44/15    PLS-00103: Encountered the symbol "
         expected:
         end not pragma final instantiabl
         member constructor map

The error-lines are marked with err>, almost at the end.

I would be VERY grateful if someone could help me.
please answer to mailto:michellesihdu_at_hotmail.com

Regards

/Michelle
create or replace package login_info as procedure loginform; procedure loginform(user IN varchar2, fr_date IN varchar2); end login_info;
/
create or replace package body login_info as procedure loginform is begin htp.p('<html><head><title>Kontroll när användarna varit inloggningsstatus</title></head><body>'); htp.p('<h2>Kontroll när användarna varit inloggade</h2>'); htp.p('<form method="GET" action=login_info.loginform>'); htp.p('<p>Fyll i Användarnamn'); htp.p('<p>'); htp.p('<input type="text" maxlength="30" name="user">'); htp.p('<p>fr.o.m datum'); htp.p('<p>'); htp.p('<input type="text" maxlength="30" name="fr_date">'); htp.p('<p>'); htp.p('<input type="submit" value="Skicka">'); htp.p('</form>'); htp.p('</body></html>'); end loginform; procedure loginform (user IN varchar2, fr_date IN varchar2) is namn varchar2(10); indate varchar2(10); startdate varchar2(10); outdate date; ddat varchar(10); CURSOR c2 is select anv, login_tid, logout_tid into namn, indate, outdate from anv_log where login_tid >= trunc(to_date(startdate, 'YYYY-MM-DD')) and anv=user; begin ddat := fr_date; startdate := to_date(fr_date, 'YYYY-MM-DD'); err>if ddat = NULL then err> htp.p('tjo'); err>endif; htp.p('<pre>'); htp.p(startdate); FOR i IN c2 LOOP htp.p('user: ' || i.anv ||' '|| i.login_tid); END LOOP; htp.p('</pre>'); end loginform; end login_info;
/
Received on Tue Oct 19 2004 - 12:45:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US