![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- Are you using SQL Server 2000 ? If yes then you can use an ExecuteSQL task to assign a select statement's output to a Global Variable. You can then reuse that elsewhere in your package -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Gary" <gconte (AT) optonline (DOT) net> wrote in message news:0c1801c34b18$a1bb97b0$a001280a (AT) phx (DOT) gbl... I need to use the result of MAX(date_XX)in connection 2 in the "where" clause of connection 1. From what I've read I can either us a global variable or a look-up. Documentation is very unclear (or just difficult for me to understand). Can any of you kind people suggest which one is best and provide a sample instructions. Thank you in advance! . |
#3
| |||
| |||
|
|
Thanks for the information. I have set up the Exec SQL task and created the Global variable with the output result. When I go to set up the input parameter to make the variable available, I receive an error message when I click on the parameter button on the source tab of the data pump. That connection i am using a Sybase ODBC connection. The mssage I am getting is : "Microsoft OLEDB provider for ODBC driver." "Provider can not derive parameter information and serparameterinfo has not been called." Any help would be appreciated. -----Original Message----- I would do it like this- Exec SQL Task on Conn 1 SELECT MAX(Date_XX) FROM ... Use an output parameter Row value to store this result into a global variable. In the DataPump source query use an Input parameter to use the variable value- SELECT * FROM Table WHERE DateCol = ? You would not use Lookups here, they are only available within a transformation script. -- Darren Green http://www.sqldts.com "Gary" <gconte (AT) optonline (DOT) net> wrote in message news:0c1801c34b18$a1bb97b0$a001280a (AT) phx (DOT) gbl... I need to use the result of MAX(date_XX)in connection 2 in the "where" clause of connection 1. From what I've read I can either us a global variable or a look-up. Documentation is very unclear (or just difficult for me to understand). Can any of you kind people suggest which one is best and provide a sample instructions. Thank you in advance! . |
![]() |
| Thread Tools | |
| Display Modes | |
| |