KK,
Which version of SQL server are you using?
If it is Sql server 2000...
For XML output, you need to consider using
at the end of SELECT statement.
For HTML output, you may consider using
sp_makewebtask and
sp_runwebtask
_________________________
- Vijay G
Strive for Perfection