Convert DB2 command line output to HTML 
Author Message
 Convert DB2 command line output to HTML
In the version 7 command center you can save the output of a query as
html.  Is there a way from the command line to cause the output to be
in HTML?


Wed, 15 Sep 2004 00:38:35 GMT
 Convert DB2 command line output to HTML

Not that I know of...
--
Serge Rielau
DB2 UDB SQL Compiler Development
IBM Software Lab, Canada


Fri, 17 Sep 2004 02:28:47 GMT
 Convert DB2 command line output to HTML
Not unless you DIY

SELECT B FROM
(
VALUES( 1,'<HTML><BODY><TABLE border=2 cellPadding=2
cellSpacing=1><TBODY>')
UNION ALL
SELECT 2, '<TR>'
  || '<TD>' || CHAR(col1) || '</TD>'
  || '<TD>' || CHAR(SUM(col2)) || '</TD>'
  || '<TD>' || CHAR(SUM(col3)) || '</TD>'
  || '</TR>'
FROM table
GROUP BY col1
UNION ALL
VALUES(3, '</TBODY></TABLE></BODY></HTML>')
) AS SS (A,B)
ORDER BY A

Regards
Paul Vernon
Business Intelligence, IBM Global Services



Sat, 18 Sep 2004 21:15:56 GMT
 Convert DB2 command line output to HTML

Quote:

> Not unless you DIY

> SELECT B FROM
> (
> VALUES( 1,'<HTML><BODY><TABLE border=2 cellPadding=2
> cellSpacing=1><TBODY>')
> UNION ALL
> SELECT 2, '<TR>'
>   || '<TD>' || CHAR(col1) || '</TD>'
>   || '<TD>' || CHAR(SUM(col2)) || '</TD>'
>   || '<TD>' || CHAR(SUM(col3)) || '</TD>'
>   || '</TR>'
> FROM table
> GROUP BY col1
> UNION ALL
> VALUES(3, '</TBODY></TABLE></BODY></HTML>')
> ) AS SS (A,B)
> ORDER BY A

> Regards
> Paul Vernon
> Business Intelligence, IBM Global Services

Thanks Paul,

I did something similiar using Perl to parse the output.  Your code
may come in handy in the future though.



Mon, 20 Sep 2004 01:01:38 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. How to format output from db2 command line processor for CLOB datatype

2. DB2 Command Line - Formatting output

3. sqleditor's command line parametre to save as html

4. YNT: sqleditor's command line parametre to save as html

5. How to output error from command line program

6. problem in output unicode from DB2 to html

7. problem in output unicode from DB2 to html

8. Redirecting command line output?

9. Converting Export Data Wizard information to BCP command line syntax

10. DB2 Command Center GUI New Line Problem

11. db2 command line V 7.2

12. Calling a Stored Procedure Created in DB2/UDB on UNIX from a UNIX command line


 
Powered by phpBB® Forum Software