Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2005, 04:46 AM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default DTS Package failing

I have a DTS package that creates a temp table and then wites the values from that temp table to a flat file,
This DTS is scheduled every 15 min, Some times thee is no data modification in Source Table when the DTS is executed.

I have an ActiveX script that checks for the records on the datasourse, if the records on the source are greater than 0 the DTS executes correctly, but when there arre no records the dts package executes the on failure task, sends a notification email and then I get an error message saying te package has failed.

Is there any way in which the package stops executing when there are no records in the datasource and exits, rather than Giving an error message saying the package has failed...

Thanks
 
Old August 17th, 2005, 08:27 AM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I crearia a task that verify if in the board of origin registrations exist to insert, if this complies I do the insercion of it contario is carried out nothing

for example

declare cont int

set cont = ( select count(*) from table_temp(datasource)
            )
if cont > 0
 begin
   insert into ......
   if @@error <> 0
    begin
      print 'ha ocurrido un error en la tabla de destino'
    end
 end
else
 begin
   print 'No hay registros para insertar'
 end








Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with DTS PACKAGE mxwebb SQL Server DTS 1 November 28th, 2007 05:16 PM
scheduling a DTS package psugak SQL Server DTS 3 March 29th, 2007 01:26 PM
question on DTS package kpshende SQL Server 2000 0 April 22nd, 2006 07:08 AM
Scheduling DTS Package chiefg SQL Server DTS 11 April 30th, 2004 11:18 AM
DTS Package Deployment acdsky VB Databases Basics 1 February 22nd, 2004 12:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.