在 SSIS 中映射时如何检查条件?
我想创建一个 ssis 包,它从平面文件中获取值并将其插入数据库表中,具体取决于companyname
。
例如:
我有表字段:
Date SecurityId SecurityType EntryPrice Price CompanyName
2011-08-31 5033048 Bond 1.05 NULL ABC Corp
现在我想将 Price
插入到该表中,但我需要与 CompanyName
匹配 并且在文件 CompanyName
中也类似于 ABC
那么我如何检查并仅插入特定数据...... 像这样,我的文件中有 20 条具有不同公司名称
的记录。
我确实喜欢这个
在查找中我做了
现在我的问题是我需要从平面文件中检查公司名称并将该公司价格插入表中,但在平面文件中公司名称的给出类似于“AK STL” ans桌子就像“AK STEEL CORPORATION”,所以为此我使用了列转换,但是我写什么表达式来查找匹配...与其他公司名称相同,平面文件中只有 1 英尺 2-3 个字符,请帮助
i want to create one ssis package which takes values from flat file and insert it into database table depending upon there companyname
.
for example:
I have table fields:
Date SecurityId SecurityType EntryPrice Price CompanyName
2011-08-31 5033048 Bond 1.05 NULL ABC Corp
now i want to insert Price
into this table but i need to match with CompanyName
and in that also in file CompanyName
is like ABC
so how can i checked that and insert only particular data...
like this i have 20 records in my file with different company names
.
I DID LIKE THIS
in lookup i did
and now my problem is i need to check company name from flat file and insert that company price into table but in flat file company name is given like 'AK STL' ans in table it is like 'AK STEEL CORPORATION' so for this i have used column transformation but what expression i write to find match ...same with other company names only 1ft 2-3 charachters are there in flat file please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,您希望将数据“更新插入”到数据库中。 这里是一个简单的外观向上插入示例。正如您所说,数据集中的记录很少,这种方法就足够了。对于较大的数据集,您可能需要研究使用临时表并使用类似于以下的 SQL 逻辑:
Basically, you are looking to "Upsert" your data into the database. Here is a simple look up upsert example. With as few of records in your dataset as you have said, this method will suffice. With larger datasets, you probably want to look into using temp tables and using sql logic similar to this: