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.
| 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 CHECKREGISTERWHERE (BANK_NO = '20')and AP_CHK_DAT =convert(varchar(10), getdate(),101)and AP_CHK_FRM='C' |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
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! |
 |
|
|
|
|
|
|
|