Russ' Do It Yourself Home Workshop

Finding Fixes to Just About Anything and Everything

Archive for August, 2012

How to Get a CSV File Generated from a SQL Server Query (SQL 2008)

Posted by Russell Wright on August 21, 2012

In SSMS (SQL Server Management Studio) you are running a query and want to get a CSV file as the results.  This is accomplished by setting the Output format in the Query Options to Comma delimited.  You can also determine whether to include the column headers in the results.


By right-clicking on the query design surface you can choose to send the results to a file.


You should be prompted to specify a file to save to when the query is executed.

Posted in SQL Server | Leave a Comment »

Oracle OLE DB Error 0x80040E07 in SSIS

Posted by Russell Wright on August 17, 2012

If you find yourself dealing with running an OLE DB query against an Oracle database in SSIS and you get an error similar to this, make sure you are comparing dates using the Oracle TO_DATE function.

e.g.  DOC_DATE  >= TO_DATE( ’01-01-2012′, ‘MM-DD-YYYY’)



Code: 0xC0202009
   Source: Import Level tables Level1 Source [1261]
   Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E07.
An OLE DB record is available.  Source: "Microsoft OLE DB Provider for Oracle"  Hresult: 0x80040E07  Description: "ORA-01861: literal does not match format string".


Search strings:

ORA-01861: Literal does not match format string

Microsoft OLE DB Provider for Oracle 0x80040E07

Posted in SQL Server | Leave a Comment »