Solved

How can I execute this package?

Posted on 2003-10-21
3
4,716 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 35

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pfile and SPfile - Oracle 2 57
PL/SQL LOOP CURSOR 3 58
How do I get sql developer to give me valuable exception information? 2 46
oracle 11g 23 50
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

920 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

15 Experts available now in Live!

Get 1:1 Help Now