Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 need date in CSV without the quotes

Author  Topic 

Hommer
Aged Yak Warrior

808 Posts

Posted - 2006-11-16 : 13:39:15
Hi,

I need your help on getting the date (datetime) in mmddyyyy format into a CSV file.

I have following script in my dts. The destination is an empty csv file. It got everything in there, but the dates are wrapped around with double quotes if opens in notepad, but not in excel.
Upload to the bank site failed because the quotes. Thanks!

SELECT distinct '001234567891'AccountNo,
right('0000000000'+ right(AP_CHK_NO,6),10)[Check Number],
right('000000000000' + convert(varchar(13),convert(int, convert(decimal(18,2),F_PAY_AMT)*100)),12) Amount,
replace(convert(varchar(10), AP_CHK_DAT, 110),'-','')[Date]
FROM CHECKREGISTER
WHERE (BANK_NO = '20')and AP_CHK_DAT =convert(varchar(10), getdate(),101)
and AP_CHK_FRM='C'

X002548
Not Just a Number

15586 Posts

Posted - 2006-11-16 : 14:09:44
well the quotes are an option..just don't select them

But why don't you just use bcp?


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Hommer
Aged Yak Warrior

808 Posts

Posted - 2006-11-16 : 14:53:39
Ok, I see.

In DTS, the default column type in the destination is quoatable. I have to change them to not quotable.

Thanks!

Go to Top of Page
   

- Advertisement -