![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
To return a value from your stored procedure, just use a resultset (SELECT statement) in the procedure. Make sure you add SET NOCOUNT ON to the top of the procedure. Some more articles on lookups- Data Transformation Services (DTS) (http://www.databasejournal.com/featu...le.php/1459171) Looking at Lookups (http://msdn.microsoft.com/library/de...-us/dnsqlpro2k /html/sql00l5.asp) -- Darren Green http://www.sqldts.com "Gregor Anton" <nospamplease (AT) hotmail (DOT) com> wrote in message news:e8BIGIvBEHA.1236 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I've got it working now, although I havent figured out yet how to retrieve an output parameter and make it the lookup value? "Gregor Anton" <nospamplease (AT) hotmail (DOT) com> wrote in message news:eH1vG0tBEHA.3284 (AT) TK2MSFTNGP09 (DOT) phx.gbl... I've tried to do that but I get an error: The Query Designer does not support the EXEC SQL construct. My Query for the lookup is exec sysdba.GetKey NULL, PICKLIST, XXXX "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:JNcGq9FJm2TAFwDb (AT) sqldts (DOT) com... In message <uQgcvMsBEHA.3284 (AT) TK2MSFTNGP09 (DOT) phx.gbl>, Gregor Anton nospamplease (AT) hotmail (DOT) com> writes Is it possible to execute a stored procedure for every record when importing? I have a table with a number of rows that need to imported into a table that requires a unique key, this unique key is generated via a stored procedure. So what I'd like to do is call this stored procedure, grab the return value and map it to the destination id field and map all other fields from the import table to the destination table. Any suggestions? Use an ActiveX Script Transform, and call a DTS Lookup. How to Use Lookups in DTS (http://www.sqldts.com/default.aspx?277) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |