Advertisement
Guest User

Untitled

a guest
May 26th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. create or replace procedure email2
  2. AS
  3. osa varchar2(55);
  4. BEGIN
  5. select ((substr(EESNIMI,1,1)) || PERENIMI) into osa from yliopilase_kontakt limit;
  6.  
  7. if length(osa) >8 THEN
  8. update yliopilase_kontakt set email = (substr(((substr(EESNIMI,1,1)) || PERENIMI), 1, 8) || '@itcollege.ee');
  9. else
  10. update yliopilase_kontakt set email = ((substr(EESNIMI,1,1)) || PERENIMI || '@itcollege.ee');
  11. end if;
  12.  
  13. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement