Tuesday, November 17, 2009

Export table to HTML format

SELECT
'<TABLE BORDER="1">','<TH>Company Name</TH>','<TH>Customer ID</TH>',''
UNION ALL
SELECT '<TR>','<TD>'+CompanyName+'</TD>','<TD>'+CustomerId+'</TD>','</TR>'
FROM Customer
UNION ALL
SELECT
'</TABLE>','','',''

No comments:

Post a Comment

Oracle Query