all groups > sql server dts > november 2004 >
You're in the

sql server dts

group:

Multiple Query Advice


Multiple Query Advice awwtau
11/11/2004 9:24:06 AM
sql server dts:
I have a DTS which runs multiple queries pulling the same type of data from
similar tables. One of the 'where' conditions is a date range but this date
is going to change from month to month. To prevent me having to alter the
where clause of each individual query to pull the current date range, is
there a way to specify the date range for the whole DTS, so I can enter the
date range once and each query would run off of that range?

Any advice would be appreciated.

Re: Multiple Query Advice Allan Mitchell
11/11/2004 8:20:26 PM
How about you define the Range as parameters so

SELECT................
WHERE StartDate >= ? And EndDate <= ?

You can then map the ? to Global variables

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


[quoted text, click to view]

AddThis Social Bookmark Button