dbTalk Databases Forums  

Empty csv file

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Empty csv file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sunanda
 
Posts: n/a

Default Empty csv file - 04-09-2004 , 03:31 PM






I create a comma delimited flat file based on a view . Then if this process completes successfully, I read the file created into a table to do some processing. I do all this in a dts package
DB->Data Transformation Task -> Destination FlatFile -> On Completion -> Source Flatfile -> Data Transformation Task -> DB

This DTS runs inside a job

But the problem is, when the view returns nothing, a 0kb or empty flat file is created. And hence the reading back into the table fails. How can this problem be solved

I would really appreciate immediate repsonse

Thanks
Sunanda


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Empty csv file - 04-10-2004 , 02:14 AM






You could use workflow.

Either

Check the file size and if it is 0 bytes then do not do your datapump
OR
Check the rowcount of a select from your view and if that is 0 then do not
do the datapump.

Workflow
(http://www.sqldts.com/default.aspx?103)
--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Sunanda" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I create a comma delimited flat file based on a view . Then if this
process completes successfully, I read the file created into a table to do
some processing. I do all this in a dts package.
Quote:
DB->Data Transformation Task -> Destination FlatFile -> On Completion -
Source Flatfile -> Data Transformation Task -> DB.

This DTS runs inside a job.

But the problem is, when the view returns nothing, a 0kb or empty flat
file is created. And hence the reading back into the table fails. How can
this problem be solved.
Quote:
I would really appreciate immediate repsonse.

Thanks,
Sunanda.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.