.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

LookUp Transformation

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :Sql Server
Hi All I have a flatFile which has 3 columns. Serialnumber,name,string. And i have a DB Table called dbo.devices and i have two columns in it deviceID,Serialnumber. In this table for each serialnumber ,deviceid is a identity generated column. Now i want to replace the SerialNumber Column in the FlatFile with the Correspoding deviceID column in the DB Table. My flat files will have app 20ooo Rows and i have  7000 Files. How can i accomplish this Task. This is just a one time task but i want it to be done in faster way. Am planning to use a Lookup Transformation For this

View Complete Post

More Related Resource Links

SSIS Lookup Transformation Issue

I am having a strange issue, In my data flow i have a Lookup Transformaton which will match on key columns of the fact and is followed by a condetional split that would deside if it should insert (old db destination) or go to update (oledb command) or ignore if no change. I have packages running for the last 1 year with the same logic. But in the recent packages I am experiencing a problem.  example: Key columns for join are - type_no (varchar 16) with all numeric values except one record wihh ' '(space) in it  and type_cd (decimal(18,0)) with values(0,1,2,3,4,5) It worked fine when I test the package. After couple of day running in schedule I get integrity violation and huge file with failed records which are supposed to be blocked at the condetional split as they are already in the fact. When i add a data viewer what i found is for all the llokup columns its having nulls (no match found). Workaround that is working for me for now is - I select full cash and say ok in the lookup transofrmation and again open it and set it back to no cash. Then it starts working as expected. Did anyone come accross this kind of issue? is the some standard that I have to follow to make sure this doesnot happen again  

Script Component Transformation as a Lookup

Hi Guys, I have the following code from my Script Component as a Lookup. Imports System Imports System.Data Imports System.Math Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper Imports Microsoft.SqlServer.Dts.Runtime.Wrapper Imports System.Collections.Generic Imports System.Data.SqlClient <Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute()> _ <CLSCompliant(False)> _ Public Class ScriptMain     Inherits UserComponent     Dim connMgr As IDTSConnectionManager100     Dim sqlConn As SqlConnection     Dim sqlCmd As SqlCommand     Private vTaxAmt As Decimal     Private vDelChgAmt As Decimal     Public Overrides Sub AcquireConnections(ByVal Transaction As Object)         connMgr = Me.Connections.Connection         sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)     End Sub     Public Overrides Sub PreExecute()         sqlCmd = New SqlCommand("SELECT ItemTypeCode FROM LkpItemDepartment WHERE (ItemDeptCode = @ItemDeptCode) AND (ItemClassCode = @ItemClassCode)", sqlConn)                 With sqlCmd.Parameters   

Lookup Transformation Task



Can someone please explain me about the cache definitions in this task? What are the considerations for determining what type of cache to use, whether to use the cache connection manager for full cache, how to determine the best size of a partial cache for each case, etc.



Excel File as input paramter for Lookup Data Flow Transformation problems


Before I start, I'm using SQL 2008.

I have a Excel file with email addresses that need to acts at input parameters to a Lookup transformation. I have set the Excel Source to my file and specified the email field to be the output. I have dropped the Lookup Transformation Data Flow and connected the both. I'm going to execute a very simple stored procedure, and under the Connections section my SQL query looks like follows: EXEC Test_GetUserName ? 
When I run that I get an error saying that no parameter was provided. But when I run EXEC Test_GetUserName 'someemail@companyname.com' everything executes great, for the obvious part that the email is hard coded. How do I pass the excel input as the parameter?

Thanks for all the help.

There is 10 types of people in the world, those that understand binary, and those that don't.

Lookup Transformation: Fails to match in full cache mode both fields same case and collation


Hi All

I am at wits end trying to resolve a lookup transformation issue where lookups fail to match in full cache mode. 


1. BIDS 2008

2. Both tables are in the same db with the same collation (Latin1_General_CI_AI)

3. Both columns have the same collation (Latin1_General_CI_AI)

4. Both values are the same case

5. Both columns are varchar(9)

I'm not sure what else there is to check. I would prefer to understand what is causing the lookups to fail vs using partial cache.

Any suggestions welcome!


SQL CE connections in Lookup transformation


Hi I am trying to use the Lookup transformation to lookup values from a SQL CE database. The problem is that the OleDB data source doesnt have a SQL CE provider. Is there any place to download the SQL CE provider for OLEDB or any alternative way to query data from SQL CE database.

Any help would be highly appreciated. Thanks,

Ganesh Ranganathan
[Please mark the post as answer if it answers your question]

Lookup transformation


I am trying to load a Dim table which is type2, I am trying to load past 5years of data at one time. When I am loading it I am sorting the data by statusdate which is going to be SCDStartDate in Target table. When I load the data, I am using two lookups, one for businesss key column, and if that match, I am using lookup for all the rows to see if there is any changed data. If its changed, then it should get inserted and update the already inserted row SCDEndDate = dateadd(ms,-1,statusdate).  When I am using 2nd lookup even when there is an row in target its not updating scdenddate.

Can somebody tell me how to chande the SCDEndDate?. I am using OLEDB command to do that. But I dont know how to get the incoming row statusdate as SCDEnddate.



Script Component Transformation with Lookup


Hi Guys,

I have the following recordset in the data flow.

Col0 Col1 Col2
Itm VM RY FF    128.00

Is it a Lookup Transformation or something else?

Hello all,
I'm totaly new to SSIS.  I'm looking for the way to join two tables from different connections and return a result depending on the match.  Tables will be LEFT JOINed by ClientID field.  It is something like a CASE WHEN in a LEFT JOIN.  What I want to accomplish is the same as the following SQL statement:

when table2.ClientID is null then 'MyStatus'
else table2.ClientStatus
end as x
table1 left join table2 on table1.ClientID = table2ClientID

Is this possible in SSIS?  How can this be done?
Thanks in advance

WPF Geometry Transformation Tool

The geometry transformer is a simple tool I wrote to scale-, translate- and rotate-transform a geometry in the path mini language.

calculation, field and map traverse adjustment, and coordinate transformation

Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.

Extreme ASP.NET: Text Template Transformation Toolkit and ASP.NET MVC


The Visual Studio T4 code generation engine lets you parse an input file and transform it into an output file. We give you a basic introduction to T4 templates and show you how ASP.NET MVC uses this technology.

Scott Allen

MSDN Magazine January 2010

lookup table query


we are doing our cms migration. both cms's have their own articleID/contentID, we have a lookup table that contain the article URL and its content id.  Now we want to query that table on every single click to get its respective id. 

How and where i can implement this?

BDC Entity as a Data Source for a Lookup column

Is it possible to create a custom lookup field type to have a BDC entity as the data source?

wss2.0 update/delete/hide lookup column that does not display any values


Hi All,

I have a document library that contains a Category column that is a lookup field. This is a default column that is a required field when uploading documents to the document library. The Category column is empty and I am unable to amend, hide, make it not required or delete it.

I have gone to Modify settings and columns -> clicked on the Category field to edit, but there is no option to amend the content or delete it. I am only able to amend the Column name and Description.

Since then, I have amended the column name to eg. Category1 and created a new Category field as a lookup and linked it to the correct list.

The problem I am facing now, is that I cannot hide, delete or make the Category1 (old Category) field NOT required. Either I would like to update the original field to display the correct values or alternately hide, delete or make the column not required.

Please help.

Datasheet view lookup column issue


When a column that has a lookup is empty in datasheet view and I attempt to update a different column I get this message: the text entered for isn't an item from the list. select an item from the list, or enter text that matches one of the listed items.

I found this hotfix, but it did not apply.


Any ideas how to get this resolved?

SSIS Changing Column Order during Transformation

First let me say, I really can't believe this chain of events myself--and they are happening to me. I am upgrading several DTS packages to SSIS on what will be my new production server.  These packages create tables, export them to a flat file, and ftp them off to other locations. What is happening (on the SSIS side) is that the OLE DB Source is reordering some of the columns on its own (moving them to the end of the table/file.  Then when my pickup/load routines run, the data is out of place and they fail. Can anyone please explain what is happening here with the mapping.  I have evaluated the table and the columns are in the order that I expect.  When I preview the source table in the OLE DB Source Editor the columns are in the correct order/alignment, but when them in the OLE DB Source Editor --Columns section within BIDS the order is changed arbitrarily. I have been somewhat successful (2 out of 3) in being able to re-map the data, but this last table just doesn't want to change.  Thanks in advance for any help and/or information you can provide
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend