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 September 17th, 2003, 11:21 AM
Registered User
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing date parms into a DTS pkg with dtsrun

I have a pkg that moves data for a specific period (monthly) from a main DB2 repository to our SQL Server database.

It works fine and here is the SQL stmt for selecting results for the appending into target table. Works great with dates hard coded into SQL stmt. I just run the following cmd line...

DTSrun /F J:\Data\Loaders\tbl0210ProviderInq.dts

But, when I replace the dates with Global Parms like this

SELECT * FROM KDIR0000.KTIR0210_PROV_INQ WHERE (KDIR0000.KTIR0210_PROV_INQ.CORP_RECD_DATE Between ? And ?);

everything goes to hell. It blows up because the parms aren't being processed properly and so the result set it tries to append is empty. Boom.

My gobal parms are set in order, startdate: datetype value:1/1/2000and enddate: datetype value:1/1/2000

This is the command line trying to run it!
DTSrun /F J:\Data\Loaders\tbl0210ProviderInq.dts /A startdate:7="8/1/2003" /A enddate:7="8/31/2003"

I can't find ANY info about passing dates! Help.

Thanks



DTSrun /F J:\Data\Loaders\tbl0210ProviderInq.dts /A startdate:7="d{'9/1/2003'}" /A enddate:7="d{'9/14/2003'}"
 
Old September 25th, 2003, 09:20 AM
Registered User
 
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm trying to figure out why nobody's taken a shot at this is it too easy and already been covered? If so, where, cause I haven't found it. The std use documentation is not accurate because it does not work and there is no documentation on the solution. Is it because it does not work at all or is there a special process to apply to use it?

 
Old October 26th, 2003, 05:54 PM
Registered User
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

try to use ISO date format yyyy-MM-dd.

http://www.iso.ch/iso/en/prods-servi...esandtime.html

Regards,

Nuno






Similar Threads
Thread Thread Starter Forum Replies Last Post
Running DTS package through Execute SQL / pkg Task sthekk SQL Server DTS 1 April 23rd, 2007 11:18 AM
DTS package - passing values at run time kkrish SQL Server 2000 1 June 20th, 2006 04:56 PM
Passing table name as parameter in a DTS Package nimma SQL Server DTS 2 January 7th, 2005 02:24 AM
DTS Import ( Date string to Date field) gfowajuh SQL Server 2000 1 September 30th, 2003 06:28 AM





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