All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.harness.data.expectedSql.oracle.loadUpdateData.sql Maven / Gradle / Ivy

There is a newer version: 1.0.10
Show newest version
DECLARE
v_reccount NUMBER := 0
BEGIN
SELECT COUNT(*) INTO v_reccount FROM "C##LIQUIBASE".authors WHERE id = 1
IF v_reccount = 0 THEN
INSERT INTO "C##LIQUIBASE".authors (id, first_name, last_name, email, birthdate, added) VALUES (1, 'Adam', 'Gods', '[email protected]', TO_DATE('1000-02-27', 'YYYY-MM-DD'), TO_DATE('2000-02-04 02:32:00', 'YYYY-MM-DD HH24:MI:SS'))
ELSIF v_reccount = 1 THEN
UPDATE "C##LIQUIBASE".authors SET added = TO_DATE('2000-02-04 02:32:00', 'YYYY-MM-DD HH24:MI:SS'), birthdate = TO_DATE('1000-02-27', 'YYYY-MM-DD'), email = '[email protected]', first_name = 'Adam', last_name = 'Gods' WHERE id = 1
END IF
END
DECLARE
v_reccount NUMBER := 0
BEGIN
SELECT COUNT(*) INTO v_reccount FROM "C##LIQUIBASE".authors WHERE id = 7
IF v_reccount = 0 THEN
INSERT INTO "C##LIQUIBASE".authors (id, first_name, last_name, email, birthdate, added) VALUES (7, 'Noah', 'Lamekhs', '[email protected]', TO_DATE('2000-02-27', 'YYYY-MM-DD'), TO_DATE('1994-12-10 01:00:00', 'YYYY-MM-DD HH24:MI:SS'))
ELSIF v_reccount = 1 THEN
UPDATE "C##LIQUIBASE".authors SET added = TO_DATE('1994-12-10 01:00:00', 'YYYY-MM-DD HH24:MI:SS'), birthdate = TO_DATE('2000-02-27', 'YYYY-MM-DD'), email = '[email protected]', first_name = 'Noah', last_name = 'Lamekhs' WHERE id = 7
END IF
END
DECLARE
v_reccount NUMBER := 0
BEGIN
SELECT COUNT(*) INTO v_reccount FROM "C##LIQUIBASE".authors WHERE id = 8
IF v_reccount = 0 THEN
INSERT INTO "C##LIQUIBASE".authors (id, first_name, last_name, email, birthdate, added) VALUES (8, 'Muhammad', 'Ibn Abdullah', '[email protected]', TO_DATE('3000-02-27', 'YYYY-MM-DD'), TO_DATE('2000-12-10 01:00:00', 'YYYY-MM-DD HH24:MI:SS'))
ELSIF v_reccount = 1 THEN
UPDATE "C##LIQUIBASE".authors SET added = TO_DATE('2000-12-10 01:00:00', 'YYYY-MM-DD HH24:MI:SS'), birthdate = TO_DATE('3000-02-27', 'YYYY-MM-DD'), email = '[email protected]', first_name = 'Muhammad', last_name = 'Ibn Abdullah' WHERE id = 8
END IF
END




© 2015 - 2024 Weber Informatics LLC | Privacy Policy