Toad World® Forums

How to have "End of File" text print at end of text delimited output file


#1

I’m currently spooling to a text delimited output file being called from a sql file being called using TDA Automate function.

SQL being called:
select cdbcase_ctyp_code AS Ctype,
cdbcase_id AS CaseID,
cdbcase_desc AS CaseDesc,
to_char(cdrdoct_filing_date, ‘MM-DD-YYYY’)AS FlgDate
from cdbcase, ctrcsts, cdbcsts, cdrdoct, ctrdtyp
where cdbcase_locn_code = ‘FM’
AND cdbcase_ctyp_code NOT IN (‘MI’)
AND cdbcase_id NOT LIKE ‘TEST%’
AND cdbcase_id = cdrdoct_case_id
AND cdrdoct_dtyp_code = ctrdtyp_code
AND ctrdtyp_code_pred like ‘XF0%’
AND trunc (cdrdoct_activity_date) >= ‘01-JAN-2010’
AND cdrdoct_case_id = cdbcsts_case_id
AND cdbcase_id = cdbcsts_case_id
AND cdbcsts_csts_seq = ctrcsts_seq
AND cdbcsts_maint_ind is null
AND cdbcsts_status_seq =
(SELECT MAX (cst.cdbcsts_status_seq)
FROM cdbcsts cst
WHERE cdbcase_id = cst.cdbcsts_case_id
AND cst.cdbcsts_effective_date =
(SELECT MAX (cs.cdbcsts_effective_date)
FROM cdbcsts cs
WHERE cdbcase_id = cs.cdbcsts_case_id));

Sample output:
“DV”|“CADV10-xxxx”|“Simms vs Simms”|“01-07-2010”
“DV”|“CADV10-xxxx”|“White-Bacon vs. Bacon”|“01-22-2010”
“DV”|“CADV10-xxxx”|“Bacon vs. White-Bacon”|“01-22-2010”

I would like to somehow add this text to all output text files:
“DV”|“CADV10-xxxx”|“Simms vs Simms”|“01-07-2010”
“DV”|“CADV10-xxxx”|“White-Bacon vs. Bacon”|“01-22-2010”
“DV”|“CADV10-xxxx”|“Bacon vs. White-Bacon”|“01-22-2010”
“End of File”


#2

You could try the Find and Replace activity. Look for

“Bacon vs. White-Bacon”|“01-22-2010”

And replace with

“Bacon vs. White-Bacon”|“01-22-2010”
“End of File”