Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create output to a Character delimited .csv file

Status
Not open for further replies.

jpotucek

Technical User
Jan 26, 2005
144
US
My question is basically two parts..

I have a view that produces the results I need to send to a Vendor in .csv format .. here is the code:

SELECT DISTINCT
dbo.Schedule_Reports.Report_Show_Date, dbo.Schedule_Reports.Report_Show_Time, dbo.Schedule_Reports.Report_Sort_Order,
dbo.Schedule_Storer.Storer_Show_End_Time, dbo.Schedule_Storer.Storer_Show_Name, dbo.Schedule_Storer.Storer_House_No,
dbo.Vw_Genre_Catgry_Shows.Category_Code, dbo.Vw_Genre_Catgry_Shows.Category_Desc, dbo.Vw_Genre_Catgry_Shows.Genre_Code,
dbo.Vw_Genre_Catgry_Shows.Genre_Desc, DATENAME(Weekday, dbo.Schedule_Reports.Report_Show_Date) AS WD,
dbo.Schedule_Storer.Storer_Episode_No, dbo.Schedule_Storer.Storer_Episode_Title, dbo.Schedule_Storer.Storer_Premiere_Flag,
dbo.Schedule_Storer.Storer_Live_SDD_Flag, dbo.Schedule_Storer.Storer_Ratings_Code, dbo.Schedule_Storer.Storer_CC_Flag
FROM dbo.Schedule_Reports LEFT OUTER JOIN
dbo.Schedule_Storer ON dbo.Schedule_Reports.Report_Show_Date = dbo.Schedule_Storer.Storer_Show_Date AND
dbo.Schedule_Reports.Report_Show_Time = dbo.Schedule_Storer.Storer_Show_Start_Time LEFT OUTER JOIN
dbo.Vw_Genre_Catgry_Shows ON dbo.Schedule_Storer.Storer_Show_Name = dbo.Vw_Genre_Catgry_Shows.Show_Name

I just exec my view in using DTS and pump the output to a .csv file.. no problem.

But what they are asking for now is a row delimiter on the file that we ulitmately send them. Is there anyway in the SQL code or with DTS to add a 'character' at the end of each row in the .csv file output??? Or is this something that can only be done using VB or something like that ??????

any input would be appreciated.

 
I beleive in DTS as you define your Destination connection, that being the CSV file, after you set the path and the name, you are able to hit the "Properties" button.

In there you are able to set the row delimiter as well as a couple of other settings that a unique to the CSV file you are generating.

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top