473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Does ECHO work in SQLPLUS? If not what works?

4
This is a SQLPLUS question. How do I display what is being executed. In other words, in the listing below what command do I need to use to see if commit will be executed. As an example, can I say:

ECHO "commit begins";

is this the right syntax for SQLPLUS?

Expand|Select|Wrap|Line Numbers
  1. declare
  2. recs number     := 0;
  3. looper number := 0;
  4. i number;
  5. begin
  6. select count(*) into recs from TTRACK where call_dt <  '1940/01/01';
  7. if recs > 0 and recs > 4 then looper := recs/5;
  8. elsif recs between 0 and 4 then looper := 1;
  9. elsif recs = 0 then
  10. return;
  11. end if;
  12.  
  13. for i in 1..looper loop
  14. DELETE FROM TTRACK WHERE rownum < 5 AND CALL_DT < '1940/01/01';
  15.  
  16. commit;
  17.  
  18. end loop;
  19.  
  20. end;
/
Sep 20 '07 #1
1 18418
amitpatel66
2,367 Expert 2GB
This is a SQLPLUS question. How do I display what is being executed. In other words, in the listing below what command do I need to use to see if commit will be executed. As an example, can I say:

ECHO "commit begins";

is this the right syntax for SQLPLUS?

*******************************************
declare
recs number := 0;
looper number := 0;
i number;
begin
select count(*) into recs from TTRACK where call_dt < '1940/01/01';
if recs > 0 and recs > 4 then looper := recs/5;
elsif recs between 0 and 4 then looper := 1;
elsif recs = 0 then
return;
end if;

for i in 1..looper loop
DELETE FROM TTRACK WHERE rownum < 5 AND CALL_DT < '1940/01/01';

commit;

end loop;

end;
/
***************************************end******** ****************
Make use of DBMS_OUTPUT.PUT_LINE in order to display any user defined message on the screen.

Before useing DBMS_OUTPUT package, you need to execute the below command:
Expand|Select|Wrap|Line Numbers
  1. SQL> SET SERVEROUTPUT ON
  2.  
Then you include the line DBMS_OUTPUT.PUT_LINE('Commit Begins') in your anonymous block
Sep 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: tooheys | last post by:
This may be to simple for the level of material I've already seen here, but nothing ventured. I have two web page linked from http://www.rhodeisland-aa.org/ricsmeetings/index.htm They are...
2
by: Harry Haller | last post by:
Why does the following work: // (1) Set new cookies setcookie ("font_type", $type_sel, time()+3600); setcookie ("font_size", $size_sel, time()+3600); // (1) Get most recent cookie $font_type =...
3
by: Alexander Gräf | last post by:
Hello, I'm stuck with a simple problem, for which I don't have a solution. I basically have an XML file containing fragments of plain text and html, in several languages: <?xml version="1.0"...
11
by: minnesotti | last post by:
Hi there, I subscribed to a photographic pictures-hosting website which is heavy on JavaScript. My preferred latest browser Mozilla Firefox does not work with it -- no pictures are displayed and...
3
by: wwwmike | last post by:
For some reasons my HTTP Redirect for 404 errors does not work for certain files like .gif .jpg on IIS Version: 5.1, but it works perfectly with the VisualStudio2005 internal webserver ...
5
by: antonyliu2002 | last post by:
Hi, It looks like so many people are having problems with the javascript submit in firefox. I searched around, but haven't found a solution yet. Mostly, people were saying, try this or try...
14
by: seralasu | last post by:
Hi, I have refresh problem.When user does refresh or clicks F5 then form variables again posting. It crates same a lot of inserts. I don't know How to solve it.
2
by: DC | last post by:
Hi, why does this not work: <asp:ImageButton id="myButt" runat="server" OnCommand="myButt_kick" ImageUrl="<% =GetMyButtUrl() %>" </asp:ImageButton>
5
by: Pat | last post by:
Hi ASP Gurus, Please help me. Autocomplete works fine when the control does not have the focus when the page load. But when I put the focus on page load, then autocomplete does not work. I even...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.