dbTalk Databases Forums  

Multiple Query Advice

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


Discuss Multiple Query Advice in the microsoft.public.sqlserver.dts forum.



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

Default Multiple Query Advice - 11-11-2004 , 11:24 AM






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.

Alan

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

Default Re: Multiple Query Advice - 11-11-2004 , 02:20 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


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

Quote:
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.

Alan



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.