SQL 2005, Ole db source does not return any record
I am using SSIS to retrive record from SQL 2005 into an Excel file. when using Ole Db Source and Excel Destination, in the progress window there is the following message :
[DTS.Pipeline] information : "Component Excel Destination (663) wrote 0 rows.
If instead of OLE DB Source I use a Data Reader source, records are written to the Excel file.
Could someone explain me why ?
I prefer to use the OLE DB source as it has more properties like timeout.
Patrick
June 28th, 2011 10:10am
I write into excel 2003 data read from a sql server 2005 tablePatrick
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2011 1:34pm
Ole db Source properties:
IsDefaultLocale=true
LocalId=english (United States)
ValidateExternalMetadata=true
Access
Mode= SQL Command
AlwaysUseDefaultCodePage=False
CommandTimeOut=0
DefaultCodePage=1252
ParameterMapping=''
SQL
Command=
use Freight
set dateFormat dmy;
select DebtorCode as CustomerCode, ltrim(rtrim(ExpenseGlCode)) + '/' + ltrim(rtrim(DeptGlCode)) as GlCode,
ltrim(rtrim(InvoiceReference)) as InvoiceNumber, ltrim(rtrim(FileReference)) as OrderNumber,
ltrim(rtrim(ExpenseDescription)) as ExpenseDescription
from IntegrationSales as SD where LineType = 'G' and (select TransactionType from InvoiceHeader where InvoiceNumber = SD.InvoiceNumber) in ('I','D')
Statement to create the Excel Destination
CREATE TABLE `Excel Destination` (
`CustomerCode` NVARCHAR(50),
`GlCode` NVARCHAR(41),
`InvoiceNumber` NVARCHAR(20),
`OrderNumber` NVARCHAR(20),
`ExpenseDescription` NVARCHAR(50)
)
Patrick
July 3rd, 2011 6:20am