db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Trivial Update of "SendEmailRoutine" by DanDebrunner
Date Fri, 13 Jan 2006 04:14:09 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by DanDebrunner:
http://wiki.apache.org/db-derby/SendEmailRoutine

------------------------------------------------------------------------------
    BODY VARCHAR(32000))
  LANGUAGE JAVA PARAMETER STYLE JAVA
  NO SQL
- EXTERNAL NAME 'testing.MailTest';
+ EXTERNAL NAME 'testing.MailTest.sendSMTP';
  
  CREATE FUNCTION SEND_MAIL(
    TO_ADDRESS VARCHAR(320),
@@ -125, +125 @@

  
  {{{
  -- Use the procedure, passing in the content from the application.
- CALL SEND_MAIL('fred@yahoo.com', 'Special Offer', ?);
+ CALL SEND_MAIL('fred@yahoo.com', 'Special Offer', ?)
  
  -- Send an e-mail customers in good standing with a special
  -- offer based upon the customer type.
  select SEND_MAIL(c.email, 'Special Offer!!', M.email_text)
  FROM CUSTOMERS C, MAILINGS M
- WHERE C.BALANCE > 1000.0 AND C.TYPE = M.CUST_TYPE AND M.OFFER_TYPE = 'special';
+ WHERE C.BALANCE > 1000.0 AND C.TYPE = M.CUST_TYPE AND M.OFFER_TYPE = 'special'
  }}}
  
  {{{
@@ -142, +142 @@

  MODE DB2SQL
  SELECT SEND_MAIL(c.email, 'Welcome to AcmeWidgets', M.email_text)
  FROM newtab C, MAILINGS M
- WHERE C.TYPE = M.CUST_TYPE AND M.OFFER_TYPE = 'welcome';
+ WHERE C.TYPE = M.CUST_TYPE AND M.OFFER_TYPE = 'welcome'
  }}}
  

Mime
View raw message