When the user fills out a form, a column picks up the most recent data from certain columns and concatenates the columns into a new column (the record's id). Now I have the right columns being selected, but the issue I'm having is that for every form that is filled the code only gets the row from the very first record that was ever filled out. Apparently TOP
and LIMIT
don't work on Oracle Apex 5, and it seems that ROWNUM = 1
is what is causing the problem here.
DECLARE
IDENTITY VARCHAR2(40);
BEGIN
SELECT CONCAT(COL1, CONCAT('-', CONCAT(COL2, COL3)))
INTO IDENTITY FROM TABLE
WHERE ROWNUM = 1;
RETURN IDENTITY;
END;