12 lines
569 B
SQL
12 lines
569 B
SQL
-- verif_nnir_cod.sql - NNIR distinct pe ACT/RUL/RUL_OBINV pentru un COD dat
|
|
-- Rulare: sqlplus -L -S MARIUSM_AUTO/<parola>@ROA_CENTRAL @verif_nnir_cod.sql <cod>
|
|
set pagesize 200 linesize 200 trimspool on feedback off
|
|
define v_cod = &1
|
|
prompt ==ACT==
|
|
select cod, an, luna, id_set, nnir from act where cod = &v_cod;
|
|
prompt ==RUL_NNIR_DISTINCT==
|
|
select an, luna, nnir, count(*) cnt from rul where cod = &v_cod group by an, luna, nnir;
|
|
prompt ==RUL_OBINV_NNIR_DISTINCT==
|
|
select an, luna, nnir, count(*) cnt from rul_obinv where cod = &v_cod group by an, luna, nnir;
|
|
exit;
|