|
|
Archives of the TeradataForum
Message Posted: Wed, 14 Jun 2006 @ 10:56:16 GMT
Subj: | | Re: Can we get Bteq output in HTML format? |
|
From: | | Ray, Edmond |
There is no option for bteq to generate HTML automagically, but you can do it with SQL.
Here is an example of one I created for a customer.
SELECT ' ' (TITLE '');
SELECT '' (TITLE '');
SELECT 'Form | ' (TITLE '');
SELECT 'Oldest Filing | ' (TITLE '');
SELECT 'Latest Filing | ' (TITLE '');
SELECT 'Nbr
Of Filings | ' (TITLE '');
LOCKING ROW FOR ACCESS
SELECT
CASE WHEN RANK(1, A.Form ) MOD 2 = 0
THEN ''
ELSE ' '
END (TITLE '')
, ''||A.Form||' | ' (TITLE '')
, ''||A.OldestFiling||' | ' (TITLE '')
, ''||A.NewestFiling||' | ' (TITLE '')
, ''||A.TotalFilings||' | ' (TITLE '')
FROM (SELECT Report_Form_Type_Cd
, MIN(Report_Received_Dt) (FORMAT 'MMM. DD, YYYY')
, MAX(Report_Received_Dt) (FORMAT 'MMM. DD, YYYY')
, COUNT(*)
FROM Report
WHERE Report_Received_Dt BETWEEN ADD_MONTHS(DATE, -132) AND DATE
GROUP BY 1
) A ( Form, OldestFiling, NewestFiling, TotalFilings )
ORDER BY 2
;
LOCKING ROW FOR ACCESS
SELECT '' (TITLE '')
FROM (SELECT 'TOTAL'
, MIN(Report_Received_Dt) (FORMAT 'MMM. DD, YYYY')
, MAX(Report_Received_Dt) (FORMAT 'MMM. DD, YYYY')
, COUNT(*)
FROM Report
WHERE Report_Received_Dt BETWEEN ADD_MONTHS(DATE, -132) AND DATE
GROUP BY 1
) A ( Form, OldestFiling, NewestFiling, TotalFilings )
;
SELECT '
| | |
'
(TITLE '');
Ed
| |
| |
|
|
|
|
| |
| |
|
|
Copyright 2016 - All Rights Reserved |
Last Modified: 15 Jun 2023 |
|
|