Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-8) was last changed on 05-Dec-2023 05:32 by Ada Csaba

This page was created on 05-Dec-2023 05:32 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
8 05-Dec-2023 05:32 6.214 kB Ada Csaba to previous
7 05-Dec-2023 05:32 6.025 kB Ben Spink to previous | to last
6 05-Dec-2023 05:32 5.994 kB Ben Spink to previous | to last
5 05-Dec-2023 05:32 11.069 kB Ben Spink to previous | to last
4 05-Dec-2023 05:32 11.07 kB Ben Spink to previous | to last
3 05-Dec-2023 05:32 12.857 kB Ben Spink to previous | to last
2 05-Dec-2023 05:32 12.486 kB Ben Spink to previous | to last
1 05-Dec-2023 05:32 11.532 kB Ben Spink to last
« This page (revision-8) was last changed on 05-Dec-2023 05:32 by Ada Csaba
G’day (anonymous guest)
CrushFTP11 | What's New

Referenced by
LeftMenu

JSPWiki