query function or procedure ouput doesn’t existing in dbeaver version 24
CREATE OR REPLACE PROCEDURE display_employees2 IS
CURSOR emp_cursor IS
SELECT
FIRST_NAME || ‘ ‘ || LAST_NAME AS full_name,
PHONE_NUMBER,
HIRE_DATE,
SALARY
FROM employees2;
v_full_name varchar(100);
v_phone_number employees2.phone_number%TYPE;
v_hire_date employees2.hire_date%TYPE;
v_salary employees2.salary%TYPE;
BEGIN
OPEN emp_cursor;
LOOP
FETCH emp_cursor INTO
v_full_name,
v_phone_number,
v_hire_date,
v_salary;
EXIT WHEN emp_cursor%NOTFOUND;
dbms_output.put_line(‘Name : ‘ || v_full_name);
dbms_output.put_line(‘Phone number : ‘ || v_phone_number);
dbms_output.put_line(‘Hire Date : ‘ || v_hire_date);
dbms_output.put_line(‘Salary : ‘ || v_salary);
dbms_output.put_line(‘——————–‘);
END LOOP;
CLOSE emp_cursor;
END display_employees2;
Oracle – How to build a dynamic query for use in DBeaver
I come from a SQL Server background. How should I write the below to be able to run in DBeaver against an oracle database? I got bits of it from other questions here but cannot make it work in full.