Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle call a function in a insert statement

FUNCTION mfi_cust_details(vacid VARCHAR2) return my_table%ROWTYPE as 
  my_table%ROWTYPE vcustdetails;
BEGIN
  SELECT a.cust_title_code,
    a.cust_id,
    b.address_line1,
    b.address_line2,
    mfi_citycountry (b.country, b.city),
    b.zip
  INTO vcustdetails 
  FROM tbaadm.cmg a, crmuser.address b
            WHERE TRIM (a.cif_id) = TRIM (b.orgkey)
              AND UPPER (b.addresscategory) IN ('MAILING', 'REGISTERED')
              AND cust_id IN (SELECT cust_id
                              FROM tbaadm.gam
                              WHERE acid = vacid);  

  RETURN vcustdetails;
END;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #oracle #call #function #insert #statement
ADD COMMENT
Topic
Name
5+8 =