dbTalk Databases Forums  

DDQ- check existence of source data file

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


Discuss DDQ- check existence of source data file in the microsoft.public.sqlserver.dts forum.



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

Default DDQ- check existence of source data file - 11-20-2003 , 05:16 AM






Hi
I have a DTS package which imports data from a text file into SQL server. I am using Data driven query task for the same.
I dont want to execute this task if the source text file is not available. What is the best way of doing this?
I think multiphase data pump can be used here but not sure as to which return code is to be used

Anyone having pointers may please help

Thanks
Ajit

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

Default Re: DDQ- check existence of source data file - 11-20-2003 , 05:33 AM






Workflw and a small piece of ActiveX Script

Multiple Paths in Workflow
(http://www.sqldts.com/default.aspx?218)

How can I check if a file exists?
(http://www.sqldts.com/default.aspx?211)

--

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



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

Quote:
Hi,
I have a DTS package which imports data from a text file into SQL server.
I am using Data driven query task for the same.
I dont want to execute this task if the source text file is not available.
What is the best way of doing this?
I think multiphase data pump can be used here but not sure as to which
return code is to be used?

Anyone having pointers may please help.

Thanks,
Ajit



Reply With Quote
  #3  
Old   
Ajit
 
Posts: n/a

Default RE: DDQ- check existence of source data file - 11-20-2003 , 09:26 AM



Thanks Allan

The thing is I have 4 different DDQs to import 4 different data files.
My requirement is to check presence of data file and if file is present then only execute DDQ. But if one file is missing and other three are present, import those three data files.
If a file is not present, I get an error message "Error opening datafile. This system can not find the file specified.
What I want is just skip one DDQ and execute other three for which input files are present

Thanks
Aji


Reply With Quote
  #4  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: DDQ- check existence of source data file - 11-20-2003 , 09:14 PM



You can find samples of what you need in the workflow
section of sqldts.com:
http://www.sqldts.com/default.aspx?103
The sample is there for checking to see if a file exists.
You can also check the link on skipping the execution of a
task.
The following article on MSDN also goes through controlling
the workflow:
http://msdn.microsoft.com/library/en...kflow_0793.asp

-Sue

On Thu, 20 Nov 2003 07:26:05 -0800, "Ajit"
<anonymous (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Thanks Allan,

The thing is I have 4 different DDQs to import 4 different data files.
My requirement is to check presence of data file and if file is present then only execute DDQ. But if one file is missing and other three are present, import those three data files.
If a file is not present, I get an error message "Error opening datafile. This system can not find the file specified."
What I want is just skip one DDQ and execute other three for which input files are present.

Thanks,
Ajit


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.