Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2006, 05:36 PM
Registered User
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default DTS - Multiple Column Lookup Problem

Hi Guys,

I am sure you can help me. I am new to the DTS and working on multiple column lookup under ActiveX script. I am using SQL Server 2000 with no sevice pack.

Lookup Query:
SELECT STATUS_DATE,STATUS_CODE,DELIVERY_DATE
FROM PRODUCT_ORDER
WHERE (PRODUCT_ORDER_ID = ?)

The Transformation is
Function Main()
aProduct = DTSLookups("ProductPO").Execute(DTSSource("ORDER_N UMBER"))
POStatusDate = aProduct(0)
POStatusCode = aProduct(1)
PODeliveryDate = aProduct(2)

DTSDestination("PO_NUMBER") = DTSSource("ORDER_NUMBER")
DTSDestination("PO_DATE") = aProduct(0)
DTSDestination("PO_STATUS") = aProduct(1)
DTSDestination("PO_DELIVERY_DATE") = aProduct(2)
Main = DTSTransformStat_OK
End Function

When i run this transformation I am getting an error that seems to be with multiple column lookup.

I would appreciate any help.
Thanks.



 
Old March 29th, 2006, 10:57 AM
Registered User
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can someone help me please!

 
Old April 4th, 2006, 01:58 PM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

If possible I would try and rewrite this query to do a join rather than a lookup. If you need pump over the data into a staging table and then do the join. Unless you have to pump over large volumes of data this is usually faster than do a lookup

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup max with criteria in multiple columns cc16 Excel VBA 2 September 6th, 2006 05:48 AM
Excel/VBA Multi-Column Lookup - Round 2 RollingWoodFarm Excel VBA 4 August 3rd, 2006 07:28 PM
DTS Column Mapping Problem hortoristic SQL Server 2000 2 August 2nd, 2004 03:21 PM
database lookup functiod (multiple rows) amitagg Biztalk 0 April 12th, 2004 07:20 PM
Lookup Table Problem mikericc Access VBA 2 January 19th, 2004 07:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.