我想用存储过程将查询结果email到指定邮箱。怎么实现? 用asp,jsp实现起来应该很容易只知道oracle有HTTP服务,不知道有没有SMTP 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 oracle有utl_smtp package,可以发送邮件。 * EXAMPLES * Retrieve the home page from http://www.acme.com/ * * DECLARE * c utl_smtp.connection; * * PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS * BEGIN * utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF); * END; * * BEGIN * c := utl_smtp.open_connection('smtp-server.acme.com'); * utl_smtp.helo(c, 'foo.com'); * utl_smtp.mail(c, '[email protected]'); * utl_smtp.rcpt(c, '[email protected]'); * utl_smtp.open_data(c); * send_header('From', '"Sender" <[email protected]>'); * send_header('To', '"Recipient" <[email protected]>'); * send_header('Subject', 'Hello'); * utl_smtp.write_data(c, utl_tcp.CRLF || 'Hello, world!'); * utl_smtp.close_data(c); * utl_smtp.quit(c); * EXCEPTION * WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN * utl_smtp.quit(c); * raise_application_error(-20000, * 'Failed to send mail due to the following error: ' || sqlerrm); * END; 请帮忙看看使用关联查询或者是with.. as能否优化如下sql语句? 急求oracle导出报错信息解决 谢谢~在线等 sql 子查询 用oracle函数实现,怎么做? sql/plus的问题,请大家帮帮忙!参与者有分。 oracle 11g 修改密码后无法登陆 在线等 关于oracle中date类型的字段 如何清理oracle过大的日志文件?在线等!! 一个简单的问题? 访问量特大!数据库选型及解决方案彷徨中......... [有实施经验者请进] pl/sql导表 关于ORACLE的数据库挖掘(数据仓库) 谁有proc中动态方法4的例子
* EXAMPLES
* Retrieve the home page from http://www.acme.com/
*
* DECLARE
* c utl_smtp.connection;
*
* PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
* BEGIN
* utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF);
* END;
*
* BEGIN
* c := utl_smtp.open_connection('smtp-server.acme.com');
* utl_smtp.helo(c, 'foo.com');
* utl_smtp.mail(c, '[email protected]');
* utl_smtp.rcpt(c, '[email protected]');
* utl_smtp.open_data(c);
* send_header('From', '"Sender" <[email protected]>');
* send_header('To', '"Recipient" <[email protected]>');
* send_header('Subject', 'Hello');
* utl_smtp.write_data(c, utl_tcp.CRLF || 'Hello, world!');
* utl_smtp.close_data(c);
* utl_smtp.quit(c);
* EXCEPTION
* WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
* utl_smtp.quit(c);
* raise_application_error(-20000,
* 'Failed to send mail due to the following error: ' || sqlerrm);
* END;