Blank lines using DBMS_OUTPUT package
Hi Friends,
how can i put blank lines between two PUT_LINE procedures. I was trying to write
the NEW_LINE procedure but it is not working.......
code is as follow
DBMS_OUTPUT.PUT_LINE(' Hello');
DBMS_OUTPUT.NEW_LINE();
DBMS_OUTPUT.PUT_LINE(' How r u ? ');
output is as follow:-
Hello
How r u? // there is no blank space between two lines
But i want output as follow
Hello
// here i want a blank line
How r u?
Thanks
U can put like this
DBMS_OUTPUT.NEW_LINE(' ');
Did you test it..?
SQL> exec DBMS_OUTPUT.NEW_LINE(' ');
BEGIN DBMS_OUTPUT.NEW_LINE(' '); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'NEW_LINE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Similar Messages
-
How to print new line using DBMS_OUTPUT package
Hi,
I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
set serveroutput on size 200000
set feedback on
BEGIN
DBMS_OUTPUT.PUT_LINE('First Line');
DBMS_OUTPUT.PUT_LINE('');
DBMS_OUTPUT.PUT_LINE('Second Line');
END;
I expect following output ...
First Line
Second Line
but i got following output....
First Line
Second Line
why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?You can try the following:
SQL> ED
Wrote file afiedt.buf
1 BEGIN
2 DBMS_OUTPUT.PUT('ONE LINE...');
3 DBMS_OUTPUT.PUT('SECOND LINE...');
4 DBMS_OUTPUT.NEW_LINE;
5 DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
6 DBMS_OUTPUT.PUT('TEST');
7 DBMS_OUTPUT.NEW_LINE;
8 DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
9 DBMS_OUTPUT.PUT_LINE(CHR(10));
10 DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
11* END;
SQL> /
ONE LINE...SECOND LINE...
THIRD LINE WITH NEW LINE...
TEST
FOURTH LINE
EXAMPLE
FIFTH LINE
PL/SQL procedure successfully completed.Documentation:
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062 -
Printing blank lines using plsql
Hi,
I am trying to print a blank line using plsql can anyone help me on this
eg
Employee Report
(a blank line here)
I am not able to print a blank line where I have written (a blank line).
Chiranjibdbms_output is trimming blanks, therefore you need to use some other non-visible character, e.g.
SQL> begin
2 dbms_output.put_line('Employee Report');
3 dbms_output.put_line('***************************');
4 dbms_output.put_line(chr(255));
5 dbms_output.put_line('*****************************');
6 end;
7 /
Employee Report
PL/SQL procedure successfully completed.
SQL> -
Printing blank spaces using dbms_output.put_line
There is one string getting generated dynamically. Upon generation, it may or may not contain blank spaces in the beginning. Then I am trying to print this on standard I/O using DBMS_OUTPUT.PUT_LINE. But if there are some leading spaces in the string, they are ignored. Is there any other way to print the exact string as it is?
hi..
it's depend on your client configuration.. you can configure the wrap option at the serveroutput parameter...
set serveroutput on size 100000 for wrap;
begin
2 dbms_output.put_line(' Hello world.');
3 end;
4 /
Hello world.
PL/SQL procedure successfully completed. -
Need help in dbms_output package
Hi,
I am using dbms_output package in my sql, while displaying the content its not coming in one line. Could you please help me out here.
DBMS_OUTPUT.PUT_LINE ('Its testing for around '||l_run_time||' minutes in this step, but average test time for this step is '||l_avg_time||' minutes.');
o/p:
Its running for around 63 minutes in this step, but average run time for this
step is 0 minutes.
Desired o/p
Its running for around 63 minutes in this step, but average run time for this step is 0 minutes.
Thanks.Plese try this .
SQL> set serveroutput on
SQL> set pages 3000
SQL> set lines 3000
SQL>
SQL> declare
2 l_run_time number ;
3 l_avg_time number;
4 begin
5 l_run_time := 63;
6 l_avg_time := 0;
7 DBMS_OUTPUT.PUT_LINE ('Its testing for around '||l_run_time||' minutes in this step,but average
test time for this step is '||l_avg_time||' minutes.');
8 end;
9 /
Its testing for around 63 minutes in this step,but average test time for this step is 0 minutes.
PL/SQL procedure successfully completed.
SQL>
Thanks,
Lakshmi Kondu -
How to avoid blank lines in smartforms?
Hi all,
I am using an INCLUDE TEXT in a smartform. The problem is it is priniting with the blank lines entered in the standard text.
I couldn't find any option for avoiding these blank lines using the respective smartstyles.
Is there any option to avoid the blank lines ? Please help me.
Thanks,
AravindHi,
well if the blank lines are present in the include text.
then you have to modify the standard text.
in the smartform the text is printed as it is.
you need to make changes to the standard text. -
Using dbms_output in Trigger
hi
I asked my question previous;y but couldnt get an exact answer for my question
I have three table grade
grade(studentno,courseno,grade)
courses(courseno,coursename)
prerequisite(courseno,prereqcourseno)
prereq(courseno) is foreign key on courses(courseno)
I want to make I trigger that when one try to add a course in grade table
the trigger will check the prerequisite of that course
and if the course is not exist in grade table( which means student has not take the prereq before)
the trigger will give an error and will report the prerequisites that the student need for that course;
The problem is I cant show the prerequisite courses that the student need, when I insert a course without prerequisite.
for example let say prereq of course C is A and B
so when I try to insert A into grade, the trigger should say that u cant do it, because u nedd A and B
thanks in advanceI agree totally with Kamal Kishores opinion. even i discourage my friends , the usage of DBMS_OUTPUT package.
It should be used more or less as a tool for debugging. As a beginner it may be advantageous and easy to learn abt the
stored procedure programming. But keeping in view that PL/SQL is more used in the backend processing. Just keep in view that
we are using a front end tool and we are writing our programs in back end (PL/SQL) then the use of DBMS_OUTPUT package and
dependency on that is waste of efforts. infact the point of DBMS_OUTPUT using to output a big chunk of varchar2 string to the
client SQL*PLUS window may / may not be advantageous.
coz if we are using Windows client and using the DBMS_OUTPUT put display the message on the screen then we may not be seeing
the messages immediately on the screen unless the execution of the program is completed. For that we are using our debugging in a separate way.
Suppose if i want to know what is the program doing at the current instance of time , then it may not be possible using DBMS_OUTPUT package.
my debugging style is in this way. I have created a procedure with AUTONOMOUS TRANSACTION with a single arguement of VARCHAR2;
CREATE OR REPLACE PROCEDURE SEND_MES(MES VARCHAR2) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO DEBUG_TRAP VALUES(MES,TO_CHAR(SYSDATE,'HH24-MI-SS'));
COMMIT;
end;
EVEN THOUGH IT MAY BE AN OVER HEAD but it is very very advantageous to findout how the program is behaving and
where the current control is in the program. i monitor the values inputted in the table DEBUG_TRAP using another session. which makes me easily understandable where my program is
and gives me idea how to improve / tune my program .
prakash -
Blank Lines at end of file when using Variable Substitution in File Adapter
Hi all,
I'm using variable substitution in a File Adapter, it's refers an element of message, like:
filename payload:MESSAGE_INTERFACE,1,FILENAME,1
The variable substitution is working right, but it's append a BLANK LINE at end of file.
Anyone knows how to solve this problem ?
Thanks in advance.Hi Regis,
I suppose you're using content conversion?
if so try adding
<b>endSeparator</b> = '0'
to your last element
this will delete the default line break at the end
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a> -
How to display the blank lines in between the message using SO_NEW_DOCUMENT
Hi,
I want to display the blank lines in between the paragarph of message using the function module SO_NEW_DOCUMENT_ATT_SEND_API1.
Regards
NagendraHi Rajesh,
Try using this code:
CLASS: cl_abap_char_utilities DEFINITION LOAD.
data: lf TYPE C VALUE cl_abap_char_utilities=>CR_LF.
move lf to wa_lines.
append wa_lines to li_lines.
Hope this helps!
Regards,
Saumya -
Ignore blank lines in text file using number format exception.
hi.. does anyone know how to ignore a blank line and move on to the next line? the text file contains:
2
bla bla bla
112.4
222.5
ble ble vle
115.5
123.2The problem with trim() is that it only trims spaces (0x20). In a source code file, "blank" lines are as likely to contain TABs as spaces. I would recommend something like if (line.length() == 0 || line.matches("\\s+")) If the inefficiency of matches() becomes a problem, you can use a pre-compiled Pattern object, or roll your own isItWhitespace() method.
-
Grid using - GL_GUI_ALV_GRID inserting blank line
Hi experts ...
I am creating report using grid instance of class GL_GUI_ALV_GRID ...
its displaying results output table say itab[] ... I want to insert one blank line in display ...
if i append work area of type itab to itab ... in that case the column which showing amount displays 0.0
instead i want complete blank row ...
Thanks & Regards ...
AshishHi,
check this link;[Blank Row in ALV Grid Display;
hope u'll get some idea.
Regards,
Sneha. -
How fix blank lines on scans using MF5770
how fix blank lines on scans using MF5770. Already restarted Win 7 computer and MF5770. Using Windows fax and scan. Several months of successful use before this problem began last couple weeks. 9/2014 Thnks for any help
Patrice,
Thanks for your reply and questions. See my responses in the body of your text pasted below
So that we can better assist you, how is the printer connected? Is it connected directly to the computer with a USB cable,YES ITS CONNECTED BY A USB CABLE LESS THAN 10' LONG FROM THE BACK OF THE MF 5770 TO A USB PORT ON THE BACK OF MY DESKTOP COMPUTER or with a LAN cable to a router? If it is connected with a USB cable, how long is the cable, and are there any devices,NO DEVICES such as a USB hub or extender, connected between the printer and the computer? Finally, which version of Windows 7 are you running on your computer? Is it the 32-bit or 64-bit version? 64 BIT VERSION SERVICE PACK 1 PROCESSOR AMD PHENOM II X4 810 2.61 GHz INSTALLED MEM 4 GB
Chip Hazel
[Mod note - removed personal information PER FORUM GUIDELINES] -
Installing Acrobat using CCP package, blank program entry
Hi all,
I am trying to install Acrobat Pro XI using a package created on CCP as Creative Cloud Admin, however whether I run the exe or msi, I get a program entry but no package or install.
The installer just drops out like it has finished with no errors.
To add...the installer falls over at the 'gathering required information' stage.
Additionally...I used CCP (same credentials, same workstation) to create a package for Illustrator, Photoshop, InDesign and Bridge. This will run fine and install all the applications.
Any advice would be welcome.
ThanksIt's a known issue. You need to install the Acrobat MSI in the Exceptions folder with a specific command line and then the Creative Cloud Packager MSI on Windows.
http://helpx.adobe.com/creative-cloud/packager/deploying-acrobat.html -
Can we use dbms_output.put_line package with forall statement
Hello Everybody
Can we use dbms_output.put_line package with forall or can we use insert,update and delete only
declare
type emp_rec is table of emp%rowtype
index by binary_integer;
t emp_rec;
begin
select * bulk collect into t from emp;
forall i in t.first..t.last
dbms_output.put_line(t(i).name);
end;Thanks & Regards
peeyush
Edited by: Peeyush on Nov 25, 2010 11:45 PMMichaelS wrote:
Well as the docs explain (though not very clear and detailed, I admit) you can use a dynamic sql statement (execute immediate) with FORALL.You got me interested in the performance side doing this Michael - running PL/SQL code via a FORALL loop.
It is faster than using a normal FOR loop to execute dynamic PL/SQL - a bit surprising as I expected another context switch to be in there. But seems like the PL/SQL engine is a more clever at optimisation than what I originally credited it with.. ;-)
Of course - pre-compiled/static PL/SQL code in a FOR loop is the fastest, as expected.
SQL> declare
2 type TNumbers is table of number;
3
4 type TTimes is record(
5 for_all number,
6 for_dynamic number,
7 for_static number
8 );
9
10 type TTimesTable is table of TTimes;
11
12 MAX_ITERATIONS constant number := 10;
13
14 plBlock varchar2(1000) :=
15 'declare i number;
16 begin i:= :var / 10; end;';
17
18 performance TTimesTable;
19 t1 number;
20 bindVar TNumbers;
21 n number;
22 begin
23 select
24 level bulk collect into bindVar
25 from dual
26 connect by level <= 10000;
27
28 dbms_output.put_line( 'Iterations: '||bindVar.Count||' for loop cycle(s)' );
29
30 performance := new TTimesTable();
31 performance.Extend( MAX_ITERATIONS );
32
33 for j in 1..MAX_ITERATIONS
34 loop
35 t1 := dbms_utility.get_time;
36 forall i in 1..bindVar.Count
37 execute immediate plBlock using bindVar(i);
38 performance(j).for_all := dbms_utility.get_time-t1;
39
40 t1 := dbms_utility.get_time;
41 for i in 1..bindVar.Count
42 loop
43 execute immediate plBlock using bindVar(i);
44 end loop;
45 performance(j).for_dynamic := dbms_utility.get_time-t1;
46
47 t1 := dbms_utility.get_time;
48 for i in 1..bindVar.Count
49 loop
50 n := bindVar(i) / 10;
51 end loop;
52 performance(j).for_static := dbms_utility.get_time-t1;
53 end loop;
54
55 dbms_output.put_line( 'Times in 100th of a second' );
56 dbms_output.put_line( rpad('for all',15) || rpad('for dynamic',15) || rpad('for static',15) );
57 for i in 1..performance.Count
58 loop
59 dbms_output.put_line(
60 rpad( performance(i).for_all, 15 )||' '||
61 rpad( performance(i).for_dynamic, 15 )||' '||
62 rpad( performance(i).for_static, 15)
63 );
64 end loop;
65
66 end;
67 /
Iterations: 10000 for loop cycle(s)
Times in 100th of a second
for all for dynamic for static
10 72 0
6 37 0
6 37 0
6 37 0
6 36 0
6 37 1
5 37 0
5 37 0
6 37 1
5 37 0
PL/SQL procedure successfully completed.
SQL> -
Maybe I'm missing something, but it seems to me that if I have a style with a "space before" setting of, for example, 21p, i should be able to put text into a new text box and have that text with the style applied pop down the page. It doesn't do this. I can make it work by just hitting "enter" and having a blank line in front of it, but in my mind this shouldn't be necessary. What am I doing wrong?
That's expected behavior. If the text spans columns or pages you wouldn't want a space above if a new column started with a paragraph at the top. Like this where you want the 2nd column to align with the others:
Maybe you are looking for
-
Dear All We are in process to confiigure SLA in service desk. we have created one new service contract of transaction type SLFV, org. data profile is SLFN0000002. We released it at item level (under status tab ) & it showed us Released for ATP Chec
-
Looking for some advice regarding an image related program
Hi fellas, Im looking for some guidance here. I want to write a program that will read an image (image will be an xray image of a square), convert the image to black and white, and measure the length and width of the square. Im looking for the best p
-
Getting squish to work on IE inside accordion which is inside a table
Greetings all. I'm having trouble getting Squish to work inside an accordion, on IE only. Everything works fine in Firefox. Now, technically, this isn't a Spry problem; it's a problem with the lame HTML I'm currently stuck with. See, everything works
-
UNION ALL slow (cost goes from 75 and 173 to 450,789!)
Hi, I have two Selects (lots of joins - big tables) Select A) has an explain plan cost of 75 Select B) has an explain plan cost of 173 If I union (or union all) the cost goes up to 450,789! I can paste in the queries, plans etc - but if anyone has an
-
Can I call a function using array index?
I've defined an array which stores the function name, like this: var aresetButtonTop:Array = new Array(resetTop1,resetTop2,resetTop3,resetTop4,resetTop5); Then I have a button named"btnresetTop" which when clicked will call one of the five function