dbTalk Databases Forums  

DTS - With Conditions

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


Discuss DTS - With Conditions in the microsoft.public.sqlserver.dts forum.



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

Default DTS - With Conditions - 04-28-2005 , 03:13 AM






Hi All,

I have DTS which uses global variables and dynamic mapping to map to the
variables as per the parameters that i send from the Stored procedure that
used to call / execute the DTS.

My DTS has to export data from a SQL Server (Join Based Query) to a TARGET
..DBF file.

problem 1: How do I create the target .dbf file in the specied folder if
that does not exists? I pass the target folder name and dtf file name from
Stored Procedure and that has to be mapped for the dBase Connection.

problem 2: If the Query (that will get executed before the dbf file will get
create) does not return any rows then I dont want to create the dbf file. My
DTS should stop there by logging some message in log (if this is possible?)

Please suggest.

Thanks
Prabhat



Reply With Quote
  #2  
Old   
Chandra
 
Posts: n/a

Default RE: DTS - With Conditions - 04-29-2005 , 12:52 AM






Hi Prabhat,

Please try to use Import-Export whizard tool available in SQL Server. This
is a whizard to program your DTS aswell.

You can then save the steps as a DTS package

hope this gives a hint on how to go about

thanks and regards
Chandra


"Prabhat" wrote:

Quote:
Hi All,

I have DTS which uses global variables and dynamic mapping to map to the
variables as per the parameters that i send from the Stored procedure that
used to call / execute the DTS.

My DTS has to export data from a SQL Server (Join Based Query) to a TARGET
..DBF file.

problem 1: How do I create the target .dbf file in the specied folder if
that does not exists? I pass the target folder name and dtf file name from
Stored Procedure and that has to be mapped for the dBase Connection.

problem 2: If the Query (that will get executed before the dbf file will get
create) does not return any rows then I dont want to create the dbf file. My
DTS should stop there by logging some message in log (if this is possible?)

Please suggest.

Thanks
Prabhat




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

Default Re: DTS - With Conditions - 04-29-2005 , 01:16 AM



Hi Chandra,

Thanks for the hint. But I believe that In the Import / Export we can start
a Wizard if the file does not exist.

Thanks
Prabhat

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

Quote:
Hi Prabhat,

Please try to use Import-Export whizard tool available in SQL Server. This
is a whizard to program your DTS aswell.

You can then save the steps as a DTS package

hope this gives a hint on how to go about

thanks and regards
Chandra


"Prabhat" wrote:

Hi All,

I have DTS which uses global variables and dynamic mapping to map to the
variables as per the parameters that i send from the Stored procedure
that
used to call / execute the DTS.

My DTS has to export data from a SQL Server (Join Based Query) to a
TARGET
..DBF file.

problem 1: How do I create the target .dbf file in the specied folder if
that does not exists? I pass the target folder name and dtf file name
from
Stored Procedure and that has to be mapped for the dBase Connection.

problem 2: If the Query (that will get executed before the dbf file will
get
create) does not return any rows then I dont want to create the dbf
file. My
DTS should stop there by logging some message in log (if this is
possible?)

Please suggest.

Thanks
Prabhat






Reply With Quote
  #4  
Old   
Chandra
 
Posts: n/a

Default Re: DTS - With Conditions - 04-29-2005 , 02:08 AM



If the file already exists, u can over write the file

"Prabhat" wrote:

Quote:
Hi Chandra,

Thanks for the hint. But I believe that In the Import / Export we can start
a Wizard if the file does not exist.

Thanks
Prabhat

"Chandra" <Chandra (AT) discussions (DOT) microsoft.com> wrote in message
news:31D82797-6A69-4ECF-AE96-3845AC1FA694 (AT) microsoft (DOT) com...
Hi Prabhat,

Please try to use Import-Export whizard tool available in SQL Server. This
is a whizard to program your DTS aswell.

You can then save the steps as a DTS package

hope this gives a hint on how to go about

thanks and regards
Chandra


"Prabhat" wrote:

Hi All,

I have DTS which uses global variables and dynamic mapping to map to the
variables as per the parameters that i send from the Stored procedure
that
used to call / execute the DTS.

My DTS has to export data from a SQL Server (Join Based Query) to a
TARGET
..DBF file.

problem 1: How do I create the target .dbf file in the specied folder if
that does not exists? I pass the target folder name and dtf file name
from
Stored Procedure and that has to be mapped for the dBase Connection.

problem 2: If the Query (that will get executed before the dbf file will
get
create) does not return any rows then I dont want to create the dbf
file. My
DTS should stop there by logging some message in log (if this is
possible?)

Please suggest.

Thanks
Prabhat







Reply With Quote
  #5  
Old   
Prabhat
 
Posts: n/a

Default Re: DTS - With Conditions - 04-29-2005 , 05:30 AM



That is not a problem. But how Do I start the wizard if the file does not
exists?


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

Quote:
If the file already exists, u can over write the file

"Prabhat" wrote:

Hi Chandra,

Thanks for the hint. But I believe that In the Import / Export we can
start
a Wizard if the file does not exist.

Thanks
Prabhat

"Chandra" <Chandra (AT) discussions (DOT) microsoft.com> wrote in message
news:31D82797-6A69-4ECF-AE96-3845AC1FA694 (AT) microsoft (DOT) com...
Hi Prabhat,

Please try to use Import-Export whizard tool available in SQL Server.
This
is a whizard to program your DTS aswell.

You can then save the steps as a DTS package

hope this gives a hint on how to go about

thanks and regards
Chandra


"Prabhat" wrote:

Hi All,

I have DTS which uses global variables and dynamic mapping to map to
the
variables as per the parameters that i send from the Stored
procedure
that
used to call / execute the DTS.

My DTS has to export data from a SQL Server (Join Based Query) to a
TARGET
..DBF file.

problem 1: How do I create the target .dbf file in the specied
folder if
that does not exists? I pass the target folder name and dtf file
name
from
Stored Procedure and that has to be mapped for the dBase Connection.

problem 2: If the Query (that will get executed before the dbf file
will
get
create) does not return any rows then I dont want to create the dbf
file. My
DTS should stop there by logging some message in log (if this is
possible?)

Please suggest.

Thanks
Prabhat









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.