July 27, 2015 at 8:43 am
Hi
I am trying to use SSIS 2005 to export data from a sql server 2005 database to a flat file, comma delimited. The customer wants and NULL values to be blank. I created the script below and obtained the required results within SSMS 2005 but when I tried to export to the flat comma delimited file using SSIS no rows were exported. The job finished successfully but 0 rows were written. Could anyone give me insight into why 0 rows were written when there are 55 rows in this table?
Thanks
Kathy
USE xxdb;
SELECT
xxID,
xxType,
xxDate,
xxUser,
ISNULL(CONVERT(varchar(10), xyzDate, 121), '') AS xyzDate,
ISNULL(xyzUser, ' ') AS xyzUser,
ISNULL(xxxMethod,'') AS xxxMethod,
ISNULL(xyzType,'') AS xyzType,
ISNULL(xyzRegion,'') AS xyzRegion,
ISNULL(xyzOffice, '') AS xyzOffice,
ISNULL(Duration, '') AS Duration,
ISNULL(zzzType,'') AS zzzType,
ISNULL(bbbType,'') AS bbbType,
ISNULL(Comments,'') AS Comments
FROM dbo.CustomerService;
July 27, 2015 at 9:18 am
Are you pointing to the correct database/server?
July 27, 2015 at 9:28 am
Yes I have the correct server and database selected. When I do the preview on the OLE DB Source Editor I see the data but when I try and look at the
preview for the Flat File Destination I just see column headers without data.
Thanks
Kathy
July 27, 2015 at 10:07 am
I found the answer--I took any semi-colons off my statements and the 55 rows exported.
Thanks
Kathy
July 27, 2015 at 10:12 am
That's weird.
I suppose that it just stopped at the first semicolon. I generally avoid using "USE database_name" and that's probably why I've never encountered that problem.
Thank you for sharing the solution.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply