Answers for "Retrieve 'Text file' from a table" The latest
answers for the question "Retrieve 'Text file' from a table"
Answer by sritej The following BCP utility worked for the issue
I posted earlier. The only issue pending is getting the
timestamp from BillDt column. For formatting purpose we're
inserting @@@ on all header records but what we noticed is that
the BillDt (timestamp) is not displayed properly (see below the
results from bcp utility). So, How do I get the BillDt in the
correct format? BCP Utility: C:\>bcp "SELECT TOP 5 '@@@',
[BillDt], [FileName], [FileExt], [BillImage] FROM
[Eclips].[dbo].[tblBill] WHERE BillType in ('ITBP2007',
'CURRENT_MONTH_DEMAND' )" queryout C:\Temp\eClips\eClipsdata.dat
-N -S SQLSERVER01\TEST -T Results from BCP utility: @ @ @ ?ž H 9
9 9 9 - 9 9 9 9 - 9 9 _ 2 0 1 0 - 1 2 - 0 1 _ I T B P 2 0 0 7 .
h t m H T M öu @ @ @ !ž H 9 9 9 9 - 9 9 9 9 - 9 9 _ 2 0 1 0 - 1
1 - 0 1 _ I T B P 2 0 0 7 . t x t T X T u @ @ @ å J 0 0 3 0 - 0
6 7 3 - 0 1 _ C U R R E N T _ M O N T H _ D E M A