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!

Export to csv file 1

Status
Not open for further replies.

xtreemnet

Programmer
Aug 9, 2003
88
NZ
Hi,

I am trying to export the output from oracle query to a csv file using SSIS. I have the oledb source and a flat file destination tasks. The output of the csv file randomly strips the first few digits from the first field. Example as below:

Query : select customerno, case when type = 'RT3' then '3'
when type = 'RT2' then '2'
when type = 'RT1' then '1'
else '0'
end
from customer.

Expected output is:

10001234,2
11002342,1
21005423,3
23007323,1

Actual output:
10001234,2
1002342,1
5423,3
23007323,1

What could be wrong?
 
it is a bug in the OLEDB Driver which driver is it the MS or Oracle provided one. What is the data type on the oracle side?
 
I am using the oracle provided driver. The customerno is numeric and the type is nvarchar2. When I add the data viewwer on the link from oledb and flat file destination the data looks ok.
 
change to the MS Oracle driver. you may want to go into the andvanced editor on the ole db source and change the output data type ot be varhar or a DT_I8 and see if that works.
 
Thanks. That helped. Except I kept the Oracle driver same but cast the customer to nvarchar2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top