Skip to content

Instantly share code, notes, and snippets.

View ciurca's full-sized avatar
🧠
Learning

radu ciurca

🧠
Learning
View GitHub Profile
syntax on
set tabstop=4 softtabstop=4
set smartindent
set nu
set smartcase
set noswapfile
set incsearch
set colorcolumn=80
-- Exercitiul 1 (Salariul Mediu)
DECLARE
v_functie angajati.job_id%TYPE:='SA_REP';
v_salariu_mediu angajati.salary%TYPE;
BEGIN
SELECT AVG(salary) INTO v_salariu_mediu FROM ANGAJATI WHERE job_id=v_functie;
dbms_output.put_line(v_salariu_mediu);
END;
@ciurca
ciurca / ex1.plsql
Last active January 7, 2024 14:14
Laborator 6 PLSQL
-- Exercitiul 1 (record)
DECLARE
CURSOR c_angajat IS
SELECT employee_id, first_name, last_name, job_id, salary, hire_date FROM angajati
WHERE employee_id=236;
v_angajat c_angajat%ROWTYPE;
BEGIN
OPEN c_angajat;
LOOP
FETCH c_angajat INTO v_angajat;
@ciurca
ciurca / lab7.plsql
Last active January 7, 2024 14:14
Laborator 7 plsql
-- Exercitiul 1 (exceptie)
DECLARE
v_angajat angajati%ROWTYPE;
BEGIN
SELECT * INTO v_angajat FROM angajati WHERE employee_id = 259;
dbms_output.put_line(v_angajat.first_name || ' ' || v_angajat.last_name || ' ' || v_angajat.salary);
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('Nu exista angajati in categoria ceruta');
END;
@ciurca
ciurca / Laborator8-9.plsql
Last active January 7, 2024 14:15
Laborator 8-9
-- Exercitiul 1 - return functie
CREATE OR REPLACE FUNCTION afla_functie
(
v_emp_id IN angajati.employee_id%TYPE)
RETURN angajati.job_id%TYPE IS
functie angajati.job_id%TYPE;
BEGIN
SELECT (job_id) INTO functie FROM angajati WHERE employee_id = v_emp_id;
RETURN functie;
<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:signavio="http://www.signavio.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exporter="Signavio Process Editor, http://www.signavio.com" exporterVersion="17.14.1" expressionLanguage="http://www.w3.org/TR/XPath" id="sid-f3455b58-5838-44d4-b387-83ea77a87992" name="Employee Onboarding" targetNamespace="http://www.signavio.com" typeLanguage="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">
<collaboration id="sid-d5f8d0b3-f261-43d8-8311-8886ef148191">
<extensionElements>
<signavio:signavioDiagramMetaData metaKey="prozessreifegrad" metaValue="high"/>
<signavio:signavioDiagramMetaData metaKey="iso9000ff" metaV