Solved

How can I execute this package?

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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 explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

679 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