473,405 Members | 2,421 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,405 software developers and data experts.

Get weired table row reflections. How do I get rid of it?

Hi

Dynamic isql programming.

I am trying to present the query results. I get the desired results. But I also get greenish extra blank rows before my populated rows.

I hope you are understanding what I mean.

Thanks
Anjana.
----------------------------------------------------------------------

Expand|Select|Wrap|Line Numbers
  1.  
  2. set serveroutput on
  3. set echo off
  4. set markup html entmap off
  5.  
  6. declare 
  7. n number;
  8. nparts number;
  9. snparts number;
  10.  
  11. begin
  12.   dbms_output.disable;
  13.  
  14.   dbms_output.put_line('<table border=1>');
  15.   dbms_output.put_line('<tr>');
  16.   dbms_output.put_line('<th>');
  17.   dbms_output.put_line('SNUM');
  18.   dbms_output.put_line('</th>');
  19.   dbms_output.put_line('<th>');
  20.   dbms_output.put_line('SNAME');
  21.   dbms_output.put_line('</th>');
  22.   dbms_output.put_line('<th>');
  23.   dbms_output.put_line('STATUS');
  24.   dbms_output.put_line('</th>');
  25.   dbms_output.put_line('<th>');
  26.   dbms_output.put_line('CITY');
  27.   dbms_output.put_line('</th>');
  28.   dbms_output.put_line('<th>');
  29.   dbms_output.put_line('TOTAL QTY');
  30.   dbms_output.put_line('</th>');
  31.   dbms_output.put_line('</tr>');
  32.   dbms_output.put_line('<tr>');
  33. for x in (select * from s order by s#)
  34. loop
  35.   select sum(qty) into snparts from spj where s#=x.s#; 
  36.  
  37.  
  38.   dbms_output.put_line('<th>');
  39.   dbms_output.put_line(x.s#);
  40.   dbms_output.put_line('</th>');
  41.   dbms_output.put_line('<th>');
  42.   dbms_output.put_line(x.sname);
  43.   dbms_output.put_line('</th>');
  44.   dbms_output.put_line('<th>');
  45.   dbms_output.put_line(x.status);
  46.   dbms_output.put_line('</th>');
  47.   dbms_output.put_line('<th>');
  48.   dbms_output.put_line(x.city);
  49.   dbms_output.put_line('</th>');
  50.   dbms_output.put_line('<th>');
  51.   dbms_output.put_line(snparts);
  52.   dbms_output.put_line('</th>');
  53.   dbms_output.put_line('</tr>');
  54.  
  55.  
  56. end loop; 
  57.     dbms_output.put_line('</table>'); 
  58.  
  59. end;
  60.  
  61.  
Feb 8 '08 #1
7 1298
amitpatel66
2,367 Expert 2GB
Could you give the sample data indicating your blank lines??
Is it something like few blank rows in a table that you are generating??
Feb 8 '08 #2
Try this May be helpful to you.....
Expand|Select|Wrap|Line Numbers
  1.  
  2. DECLARE
  3. n NUMBER;
  4. nparts NUMBER;
  5. snparts NUMBER;
  6. BEGIN
  7.   --dbms_output.disable;
  8.   dbms_output.put_line('<table border=1>');
  9.   dbms_output.put_line('<tr>');
  10.   dbms_output.put_line('<th>');
  11.   dbms_output.put_line('empno');
  12.   dbms_output.put_line('</th>');
  13.   dbms_output.put_line('<th>');
  14.   dbms_output.put_line('ename');
  15.   dbms_output.put_line('</th>');
  16.   dbms_output.put_line('<th>');
  17.   dbms_output.put_line('job');
  18.   dbms_output.put_line('</th>');
  19.   dbms_output.put_line('<th>');
  20.   dbms_output.put_line('mgr');
  21.   dbms_output.put_line('</th>');
  22.   dbms_output.put_line('<th>');
  23.   dbms_output.put_line('Total_sal');
  24.   dbms_output.put_line('</th>');
  25.   dbms_output.put_line('</tr>');
  26.   dbms_output.put_line('<tr>');
  27. FOR x IN (SELECT * FROM emp where deptno=&deptno ORDER BY empno)
  28. LOOP
  29.   SELECT SUM(sal) INTO snparts FROM emp WHERE deptno=x.deptno;
  30.   dbms_output.put_line('<th>');
  31.   dbms_output.put_line(x.empno);
  32.   dbms_output.put_line('</th>');
  33.   dbms_output.put_line('<th>');
  34.   dbms_output.put_line(x.ename);
  35.   dbms_output.put_line('</th>');
  36.   dbms_output.put_line('<th>');
  37.   dbms_output.put_line(x.job);
  38.   dbms_output.put_line('</th>');
  39.   dbms_output.put_line('<th>');
  40.   dbms_output.put_line(x.mgr);
  41.   dbms_output.put_line('</th>');
  42.   dbms_output.put_line('<th>');
  43.   dbms_output.put_line(snparts);
  44.   dbms_output.put_line('</th>');
  45.   dbms_output.put_line('</tr>');
  46. END LOOP;
  47.     dbms_output.put_line('</table>');
  48. END;
  49. /
  50.  
and this also
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. SELECT xmlelement("Name",first_name), xmlelement("id",id), xmlelement("Date", start_date)
  4.     FROM employee;
  5.  
  6.  
Feb 8 '08 #3
amitpatel66
2,367 Expert 2GB
Subashsavji,

Inspite of telling you so many times, you are repeatedly not using CODE TAGS for the source code.

You have also been requested to use CODE TAGS by PM, but I think you are not taking this seriously.

This will be last time I am requesting you to use the CODE TAGS, else I will need to give you official warning for not using CODE TAGS.

If you dont know about the guidelines of this forum, Check POSTING GUIDELINES

MODERATOR
Feb 8 '08 #4
Could you give the sample data indicating your blank lines??
Is it something like few blank rows in a table that you are generating??
Thank you for the response. There are no blanks rows in the table.

Lets take just one row of data,

'S1', 'SAM', 10,'Delhi', 500

Anjana
Feb 8 '08 #5
Subashsavji,

Inspite of telling you so many times, you are repeatedly not using CODE TAGS for the source code.

You have also been requested to use CODE TAGS by PM, but I think you are not taking this seriously.

This will be last time I am requesting you to use the CODE TAGS, else I will need to give you official warning for not using CODE TAGS.

If you dont know about the guidelines of this forum, Check POSTING GUIDELINES

MODERATOR
Did you mean to say,

Expand|Select|Wrap|Line Numbers
  1.  actual code 
. If yes, I will adhere to it next time. Sorry.

Anjana
Feb 8 '08 #6
I haven't learned xml yet. Programming it in isql, Can you help me with it?

Thank you.

Anjana
Feb 8 '08 #7
amitpatel66
2,367 Expert 2GB
Did you mean to say,

Expand|Select|Wrap|Line Numbers
  1.  actual code 
. If yes, I will adhere to it next time. Sorry.

Anjana
Hi Anjana,

Thats right. CODE tags need to be used every time source code is post in this forum

MODERATOR
Feb 8 '08 #8

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

Similar topics

5
by: Nedu N | last post by:
Hi All, I am facing a typical problem in my .NET application with the pop-up script messages. The thing is that its working fine when i run on my development machine but not running in expected...
13
by: Lars Netzel | last post by:
hi! myDataSet that is fillled from an Access 2000 db and includes ONE table From that Table in myDataSet I create myDataView and use a Rowfilter to get a few rows that i work with (i need a...
4
by: Annie | last post by:
Hi guys, I am having a weired situation that don't know how to handle it ... I have master pages, the master page contains a dynaic menu which is set up in the database and has page url, name,...
7
by: Wei | last post by:
Hi all, I found out I can use the max function which is defined in STL <algorithmwithout including this header in my program. The compilers I used are GNU g++ 3.4.4 and Visual Studio C++ 2005. ...
0
by: arturbl | last post by:
I just finished my sort of MVC/P framework where I do url rewriting. During the url rewriting I access properties of the controller/presenter based on the url. First thing that most of us would...
3
by: bobh | last post by:
Hi All, In AccessXP I have a report, in print preview the report looks good, when I choose Office Links - Analyze It With Excel the spreadsheet opens and will have different values in a...
1
by: ckrows | last post by:
I am working with a Reflections HP session and i created a macro within the VBA editor in Reflections where i copy to the clipboard the information i need. Now the issue is that i do not know how to...
0
by: Robertson1995 | last post by:
I have been using Reflections for a while and I am familiar with macros, but am new to VBA. I need a VBA code that I think is fairly simple, but being new I need help. I have a piece of equipment...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.