Solved

How can I execute this package?

Posted on 2003-10-21
3
4,698 Views
Last Modified: 2008-03-17
How can I execute this package in TOAD?


PKG_SMTP_EMAIL.SEND_EMAIL
(
        'Reporting@Weightwatchers.com',
      'Reporting Server',
      PKG_SMTP_EMAIL.ARRAY('test@aol.com','test@comcast.net',
      PKG_SMTP_EMAIL.ARRAY('test@weightwatchers.com'),
      PKG_SMTP_EMAIL.ARRAY(),
      'Corporate Solutions EDI Report - PLEASE DO NOT REPLY' ,
      NULL
      ,PKG_SMTP_EMAIL.ARRAY('test.txt')
);
0
Comment
Question by:andw928
3 Comments
 
LVL 11

Accepted Solution

by:
pennnn earned 50 total points
ID: 9591387
Enclose the statement you have in BEGIN/END;
Hope that helps!
0
 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 9591681
You cannot execute a PL\SQL package.

You can execute individual procedures or functions within a package.
0
 
LVL 5

Expert Comment

by:Pontis
ID: 9592020
begin

PKG_SMTP_EMAIL.SEND_EMAIL
(
       'Reporting@Weightwatchers.com',
     'Reporting Server',
     PKG_SMTP_EMAIL.ARRAY('test@aol.com','test@comcast.net',
     PKG_SMTP_EMAIL.ARRAY('test@weightwatchers.com'),
     PKG_SMTP_EMAIL.ARRAY(),
     'Corporate Solutions EDI Report - PLEASE DO NOT REPLY' ,
     NULL
     ,PKG_SMTP_EMAIL.ARRAY('test.txt')
);
end;
/

I'm not sure if TOAD supports it, but SQL Navigator (another Quest product) does:

execute PKG_SMTP_EMAIL.SEND_EMAIL ( 'Reporting@Weightwatchers.com', 'Reporting Server', PKG_SMTP_EMAIL.ARRAY 'test@aol.com','test@comcast.net',   PKG_SMTP_EMAIL.ARRAY('test@weightwatchers.com'),  PKG_SMTP_EMAIL.ARRAY(),   'Corporate Solutions EDI Report - PLEASE DO NOT REPLY' ,     NULL     ,PKG_SMTP_EMAIL.ARRAY('test.txt'));

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now