dbTalk Databases Forums  

Parameters in DTS tasks

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


Discuss Parameters in DTS tasks in the microsoft.public.sqlserver.dts forum.



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

Default Parameters in DTS tasks - 09-04-2003 , 12:15 PM






I am trying to put together a DTS task and am wondering
about parameters. Not sure if parameters will solve the
problem, but I'm trying to pull data from a table where
the date is the max date in the table. Can I set a
parameter to select max(date) from table? Then can I use
this param in my query for my DTS task? How do I refer
to the parameter in the query?

Thanks

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

Default Re: Parameters in DTS tasks - 09-04-2003 , 12:43 PM






Thanks, that was an easy one. I should have known that,
but have been brain dead most of the day.
Quote:
-----Original Message-----
If you're looking to pull data from a table based on the
current maximum
date in that same table, then you don't need parameters
at all.

For example, here's a query to run against the Pubs
database.

select *
from sales
where
ord_date in (
select max(ord_date)
from sales
)

For your situation it may be faster to use a join
instead. Experiment and
decide.

Best regards.

JOH



"Andy" <drewb6911 (AT) yahoo (DOT) com> wrote in message
news:1edb01c37308$30b07870$a501280a (AT) phx (DOT) gbl...
I am trying to put together a DTS task and am wondering
about parameters. Not sure if parameters will solve
the
problem, but I'm trying to pull data from a table where
the date is the max date in the table. Can I set a
parameter to select max(date) from table? Then can I
use
this param in my query for my DTS task? How do I refer
to the parameter in the query?

Thanks


.


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.