Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. select sum (pret*cantitate)into p_val
  2. from comenzi t join rand_comenzi r on
  3. t.nr_comanda = r.nr_comanda where id_client =p_client_id
  4. and extract (year from t.data)=p_year;
  5. else
  6. select sum(pret*cantitate)into p_val
  7. from comenzi t join rand_comenzi r on
  8. t.nr_comanda=r.nr_comanda where id_client=p_client_id;
  9. end if;
  10. return nvl(p_val,0);
  11. end;
  12. /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement