﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Integration Services / Data Warehousing  / SSIS2005: DataFlow Task from OLE DB Source to Excel File Destination / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 08:57:57 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SSIS2005: DataFlow Task from OLE DB Source to Excel File Destination</title><link>http://www.sqlservercentral.com/Forums/Topic1401888-364-1.aspx</link><description>It's possible something with the OLE DB driver could not infer (or the database did not return an acceptable inference) the data types output by the expressions making up the last three columns in your SELECT. You may have had some luck adding a CAST around each of those columns but I am happy you got it sorted.</description><pubDate>Mon, 07 Jan 2013 08:02:38 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>RE: SSIS2005: DataFlow Task from OLE DB Source to Excel File Destination</title><link>http://www.sqlservercentral.com/Forums/Topic1401888-364-1.aspx</link><description>@OPCSorry for the delay in answering.  It was running against the OLEDB datasource (SQL server 2005).I eventually fudged it by creating the SELECT statement as a view in the database and calling that instead, filtering in the WHERE clause for the search conditions.</description><pubDate>Mon, 07 Jan 2013 01:54:11 GMT</pubDate><dc:creator>aaron.reese</dc:creator></item><item><title>RE: SSIS2005: DataFlow Task from OLE DB Source to Excel File Destination</title><link>http://www.sqlservercentral.com/Forums/Topic1401888-364-1.aspx</link><description>Sorry if I am missing it, but are you running this SELECT against a SQL Server OLE DB connection or trying to run it against an Excel OLE DB connection?</description><pubDate>Thu, 03 Jan 2013 17:37:20 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>SSIS2005: DataFlow Task from OLE DB Source to Excel File Destination</title><link>http://www.sqlservercentral.com/Forums/Topic1401888-364-1.aspx</link><description>Hi guys,Once again it looks like Excel is the poor relation in SSIS.I am trying to create a DataFlow task which connects to my database and runs an SQL SELECT statement into an Excel results set.The SQL statement is as follows[code="sql"]SELECT			OBR.cppolref,			OBR.ValidFrom,			S.FSASegment,			S.Warning,			F.Deceased,			F.VIP,			F.AltAddress,			F.Flats,			F.HEC,			F.SpecialNeeds,			coalesce(F.SpecialNeedsDescription,'') as 'SpecialNeedsDescription',			PF.additionalElementPrice,			coalesce(count(CDC.complaintref),0) + coalesce(count(CMS.complaintref),0) as 'TotComplaints',			coalesce(count(CDC2.complaintref),0) + coalesce(count(CMS2.complaintref),0) as 'TotOpenComplaints',			coalesce(count(CDC3.complaintref),0) + coalesce(count(CMS3.complaintref),0) as 'TotOpenFSAComplaints'FROM			opsBatchRecord OBR	join			Segments S on S.cppolref = OBR.cppolref			AND S.validfrom = OBR.Validfrom	join			cpfact F on F.cppolref = OBR.cppolref			AND F.validFrom = OBR.ValidFrom	join			priceFact PF on PF.cppolref = OBR.cppolref			AND PF.ValidFrom = OBR.ValidFrom	left join			CDCComplaints CDC on CDC.cppolref = OBR.cppolref			AND CDC.ValidFrom = (SELECT Max(ValidFrom) from CDCComplaints Where Validto &amp;lt;= f.validto)	left join			CMSComplaints CMS on CMS.cppolref = OBR.cppolref	left join			CDCComplaints CDC2 on CDC2.cppolref = OBR.cppolref			AND CDC2.ValidFrom = (SELECT Max(ValidFrom) from CDCComplaints Where Validto &amp;lt;= f.validto)			AND CDC2.Status = 'Open'	left join			CMSComplaints CMS2 on CMS2.cppolref = OBR.cppolref			AND CMS2.status in ('open','FSA open') 		left join			CDCComplaints CDC3 on CDC3.cppolref = OBR.cppolref			AND CDC3.ValidFrom = (SELECT Max(ValidFrom) from CDCComplaints Where Validto &amp;lt;= f.validto)			AND CDC3.Status = 'Open'			AND CDC3.FSAReportable = 1	left join			CMSComplaints CMS3 on CMS3.cppolref = OBR.cppolref			AND CMS3.status = 'FSA open'WHERE			OBR.BatchID = 1001Group by			OBR.cppolref,			OBR.ValidFrom,			S.FSASegment,			S.Warning,			F.Deceased,			F.VIP,			F.AltAddress,			F.Flats,			F.HEC,			F.SpecialNeeds,			F.SpecialNeedsDescription,			PF.additionalElementPrice[/code]Firstly, SSIS seems to choke on the colaesce() statement; when I put the code into Build Query it puts the coalesce in square brackets [coalesce] and treats it as a field name which then breaks the syntax - WHY!!!!!! :hehe:  I have replaced the coalesce() with isnull() and it seems to be happier, but still gives me an error message "syntax error in FROM clause" when I try to parse the query.  Both versions of the query work just fine in Mgmt studio</description><pubDate>Wed, 02 Jan 2013 08:59:54 GMT</pubDate><dc:creator>aaron.reese</dc:creator></item></channel></rss>