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.
---------------------------------------------------------------------- -
-
set serveroutput on
-
set echo off
-
set markup html entmap off
-
-
declare
-
n number;
-
nparts number;
-
snparts number;
-
-
begin
-
dbms_output.disable;
-
-
dbms_output.put_line('<table border=1>');
-
dbms_output.put_line('<tr>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('SNUM');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('SNAME');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('STATUS');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('CITY');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('TOTAL QTY');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('</tr>');
-
dbms_output.put_line('<tr>');
-
for x in (select * from s order by s#)
-
loop
-
select sum(qty) into snparts from spj where s#=x.s#;
-
-
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.s#);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.sname);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.status);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.city);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(snparts);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('</tr>');
-
-
-
end loop;
-
dbms_output.put_line('</table>');
-
-
end;
-
-
7 1298
Could you give the sample data indicating your blank lines??
Is it something like few blank rows in a table that you are generating??
Try this May be helpful to you..... -
-
DECLARE
-
n NUMBER;
-
nparts NUMBER;
-
snparts NUMBER;
-
BEGIN
-
--dbms_output.disable;
-
dbms_output.put_line('<table border=1>');
-
dbms_output.put_line('<tr>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('empno');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('ename');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('job');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('mgr');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line('Total_sal');
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('</tr>');
-
dbms_output.put_line('<tr>');
-
FOR x IN (SELECT * FROM emp where deptno=&deptno ORDER BY empno)
-
LOOP
-
SELECT SUM(sal) INTO snparts FROM emp WHERE deptno=x.deptno;
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.empno);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.ename);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.job);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(x.mgr);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('<th>');
-
dbms_output.put_line(snparts);
-
dbms_output.put_line('</th>');
-
dbms_output.put_line('</tr>');
-
END LOOP;
-
dbms_output.put_line('</table>');
-
END;
-
/
-
and this also -
-
-
SELECT xmlelement("Name",first_name), xmlelement("id",id), xmlelement("Date", start_date)
-
FROM employee;
-
-
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
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
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,
. If yes, I will adhere to it next time. Sorry.
Anjana
I haven't learned xml yet. Programming it in isql, Can you help me with it?
Thank you.
Anjana
Did you mean to say,
. 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
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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,...
|
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.
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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,...
| |