The following code run well in a development environment
CREATE COLUMN TABLE place.employees (employee_id INTEGER, employee_name VARCHAR(30));
INSERT INTO place.employees VALUES (1, 'John');
INSERT INTO place.employees VALUES (20010, 'Sam');
INSERT INTO place.employees VALUES (21, 'Julie');
INSERT INTO place.employees VALUES (10005, 'Kate');
DO BEGIN
DECLARE CURSOR cur FOR SELECT * FROM place.employees FOR UPDATE;
FOR r AS cur DO
IF r.employee_id < 10000 THEN
UPDATE place.employees SET employee_id = employee_id + 10000
WHERE CURRENT OF cur;
ELSE
DELETE FROM place.employees WHERE CURRENT OF cur;
END IF;
END FOR;
END;
But when I move the code to a production environment I get the above error Linked DataBase error.
What it could be different on both environment????
Request clarification before answering.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.