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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Help with first PL/SQL procedure... last error

Re: Help with first PL/SQL procedure... last error

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Fri, 15 Sep 2000 20:56:38 GMT
Message-ID: <8pu2dp$nj9$1@nnrp1.deja.com>

Put semicolon (;) after the SQL statement. Then remove parentheses around IF statement. PL/SQL doesn't allow them here.

In article <8pu0t9$lnv$1_at_nnrp1.deja.com>,   bassgrrl_at_my-deja.com wrote:
> Hi -
>
> I'm trying to debug my first real PL/SQL procedure in Procedure
 Builder,
> and I keep getting this error:
>
> Error at line 9, column 1
> PLS00103: Encountered symbol "(" when expecting one of the following:
> *&-+;/ for mod rem an exponent (**) and or group having intersect
 minus
> order start union where connect ||
>
> I have tried several different ways of trying to write this same
> procedure, but I think I'm stuck at this point. This version has
> the least errors, so I am leaning towards this one. Would anyone have
> an idea of what I'm missing here in my logic?
>
> The basic idea is to take a file of email addresses that is currently
> case sensitive, make it all lower case, find the duplicates, search
 the
> modification date to find the most current record, save it, and delete
> the others. If modification date is blank, creation date is used
> instead.
>
> Any help would be greatly appreciated!
>
> Thanks
>
> PROCEDURE cleandupes
> (v_lem in mem_sub_table.email%TYPE,
> v_rem in mem_sub_table.email%TYPE)
> IS
> BEGIN
> SELECT count(*), LOWER(email.mem_sub_table) into v_lem
> FROM mem_sub_table GROUP BY LOWER(email)
> WHERE count > 1
> (IF TO_DATE([m_date,'nls_lang']) != NULL,
> THEN ORDER BY m_date
> ELSE
> IF TO_DATE([m_date,'nls_lang']) = NULL,
> THEN ORDER BY TO_DATE([c_date,'nls_lang'])
> ELSE
> IF TO_DATE([c_date,'nls_lang']) = NULL,
> THEN ORDER BY LOWER(email))
> ORDER BY rownum DESC
> IF rownum = 1
> THEN LOWER(email) = v_rem
> SAVE RECORD
> ELSE
> DELETE * from mem_sub_table
> WHERE rownum != 1
> And LOWER(email) != v_rem
> ELSE
> UPDATE email.mem_sub_table
> SET email := LOWER(email)
> END IF
> END cleandupes
> ;
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Sep 15 2000 - 15:56:38 CDT

Original text of this message

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