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 -> Help with first PL/SQL procedure... last error

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

From: <bassgrrl_at_my-deja.com>
Date: Fri, 15 Sep 2000 20:30:32 GMT
Message-ID: <8pu0t9$lnv$1@nnrp1.deja.com>

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. Received on Fri Sep 15 2000 - 15:30:32 CDT

Original text of this message

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