检索@identity(SSIS数据流xml源到两个表的一个xml文件外键指向身份主键) [英] retrieve @identity (ssis dataflow xml source one xml file to two tables foreign key point to identity primary key)

查看:111
本文介绍了检索@identity(SSIS数据流xml源到两个表的一个xml文件外键指向身份主键)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< pre lang ="msil">从xml导入两个表,其中外键指向身份主键问题问题:
我有两个表user(id,name等)和userassociation(userid,orgid等)
User(id)是身份设置为yes的主键.
userassociation(userid)是引用用户(id)的外键

我有几个小的xml文件,每个文件都有有关单个用户和用户关联的信息.

我正在使用数据流任务和xml源导入来填充两个表
将行导入到用户表以使用它向用户关联中添加行之后,如何检索身份>

<pre lang="msil">import from xml to two table with foreign key pointing to identity primary key problemQuestion:
I have two tables user (id, name,etc.) and userassociation(userid, orgid, etc.)
User(id) is a primary key with identity set to yes
userassociation (userid) is foreign key referencing user(id)

I have several small xml files each has information about a single user and userassociation.

I am using dataflow task and xml source to import the populate the two tables
How can I retrieve the identity after importing a row to the user table to use it to add a row to the userassociation</pre>

推荐答案

数据类型是什么用户ID列?以及您正在使用哪个数据库? (访问,MSSQL,MySQL,Orcale ...)
您有执行任务的任何程序吗?如果是的话,还请张贴该帖子,以便我理解您的问题.还请告诉我您在应用程序中使用哪种语言.

谢谢
What is the data type of userid column? and also which database you are using? (Access, MSSQL, MySQL, Orcale...)
Do you have any procedure to execute the task? if yes please also post that so I could understand your problem. please also tell me which language are you using in your application.

Thanks


这篇关于检索@identity(SSIS数据流xml源到两个表的一个xml文件外键指向身份主键)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆