dbTalk Databases Forums  

Beginner question about lookups

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


Discuss Beginner question about lookups in the microsoft.public.sqlserver.dts forum.



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

Default Beginner question about lookups - 03-08-2006 , 01:45 PM






I'm new to using DTS. I have a package that contains an ActiveX Script Task
that sets two global variables (date1 and date2). I now need to retrieve a
record from an sql2000 database that contains a date value to use in
comparison. I'm use to msAccess and would typically use a DLOOKUP to get
this. How do I retrieve and set a variable to this retrieved value? I was
thinking of creating another ActiveX Script Task using ado but I'm not sure
if this is possible or the way to go? Any suggestions.

Thanks in advance




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

Default Re: Beginner question about lookups - 03-09-2006 , 04:02 PM






Hello Franky,


If what you want to do is retrieve a value from a SQL Server 2000 server
by issuing a query and store the returned value in a variable. You can then
use this variable in a parameterised statement then you can have a look here
at this

http://www.sqldts.com/default.aspx?205

You can grab the value from your Query by using an ExecuteSQL task and hitting
the Parameters button



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I'm new to using DTS. I have a package that contains an ActiveX
Script Task that sets two global variables (date1 and date2). I now
need to retrieve a record from an sql2000 database that contains a
date value to use in comparison. I'm use to msAccess and would
typically use a DLOOKUP to get this. How do I retrieve and set a
variable to this retrieved value? I was thinking of creating another
ActiveX Script Task using ado but I'm not sure if this is possible or
the way to go? Any suggestions.

Thanks in advance




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.