Hello
I am working on a Application in Oracle Apex 4.2
i want to compare two tables with the same collums but with different Data and count the differences.
I am using test environment of Scott Tiger.
i got this code and it works fine, especially when there is a ORDER BY in the select statement.
any ideas how to fix this?
pls help me ! (:
I am working on a Application in Oracle Apex 4.2
i want to compare two tables with the same collums but with different Data and count the differences.
I am using test environment of Scott Tiger.
i got this code and it works fine, especially when there is a ORDER BY in the select statement.
any ideas how to fix this?
pls help me ! (:
Code:
CREATE OR REPLACE FUNCTION checkSQL (fragenID IN NUMBER, v_statement IN VARCHAR)
RETURN NUMBER IS
v_frage VARCHAR(1000);
v_ID NUMBER(4);
v_Statement VARCHAR(1000);
v_erg NUMBER(2);
BEGIN
v_ID := fragenID;
SELECT FRAGE into v_frage
FROM tb_frage
WHERE v_id = v_ID;
EXECUTE IMMEDIATE('SELECT COUNT(*) FROM ('||v_frage||' MINUS '||v_statement||')') INTO v_erg;
RETURN v_erg;
END;