Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-6) was last changed on 25-Oct-2018 04:31 by Ben Spink

This page was created on 25-Oct-2018 04:31 by Ben Spink

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 277 added 38 lines
CREATE TABLE CRUSHFTP.MODIFIED_TIMES (
SERVER_GROUP VARCHAR2(50),
PROP_NAME VARCHAR2(255),
PROP_VALUE VARCHAR2(255)
)
TABLESPACE CRUSHFTPDATA
;
CREATE SEQUENCE CRUSHFTP.USERS_SEQ
INCREMENT BY 1
NOMAXVALUE
START WITH 1
MINVALUE 1
NOCACHE
NOCYCLE
ORDER;
-- trigger to get the next sequence-value for userid
CREATE OR REPLACE TRIGGER CRUSHFTP.USERS_TRG BEFORE INSERT OR UPDATE ON CRUSHFTP.USERS
FOR EACH ROW
DECLARE
v_newVal NUMBER(12) := 0;
v_incval NUMBER(12) := 0;
BEGIN
IF INSERTING AND :new.USERID IS NULL THEN
SELECT USERS_SEQ.NEXTVAL INTO v_newVal FROM DUAL;
IF v_newVal = 1 THEN
SELECT NVL(max(USERID),0) INTO v_newVal FROM USERS;
v_newVal := v_newVal + 1;
LOOP
EXIT WHEN v_incval>=v_newVal;
SELECT USERS_SEQ.nextval INTO v_incval FROM dual;
END LOOP;
END IF;
:new.USERID := v_newVal;
END IF;
END;
Version Date Modified Size Author Changes ... Change note
6 25-Oct-2018 04:31 5.994 kB Ben Spink to previous
5 25-Oct-2018 04:31 11.069 kB Ben Spink to previous | to last
4 25-Oct-2018 04:31 11.07 kB Ben Spink to previous | to last
3 25-Oct-2018 04:31 12.857 kB Ben Spink to previous | to last
2 25-Oct-2018 04:31 12.486 kB Ben Spink to previous | to last
1 25-Oct-2018 04:31 11.532 kB Ben Spink to last
« This page (revision-6) was last changed on 25-Oct-2018 04:31 by Ben Spink
G’day (anonymous guest)
CrushFTP9 | What's New

Referenced by
LeftMenu

JSPWiki