选定的数据移到另一个数据库. [英] selected data moved to another database.

查看:82
本文介绍了选定的数据移到另一个数据库.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我在将数据移到另一个数据库时遇到问题.


我有一个列表框.然后,当我选择一个.表单视图将出现.
在该表单视图上.有一个编辑.而且我有这个类别",当我选择或更新它时,该类别"中的数据将从默认数据库中保存.并连接到另一个数据库.

我希望你能帮助我.

非常感谢.

-chaosgray-

hello guys.

i have a problem in moving the data into another database.


i have a listbox. then when i select one. a form view will appear.
on that form view. there is an editing. and i have this "category" that when i selected or update it, the data from this "category" will be saved from the default database. and to another database.

i hope you can help me.

thanks a lot.

-chaosgray-

推荐答案

chaosgray,
您可以使用完全限定的表名来执行此操作(仅当两个数据库的类型相同(SQL SERVER)时)

请尝试选择进入
Hi chaosgray,
You can use full qualified table names to do this(only if both the databases are of same type (SQL SERVER))

Please try SELECT INTO
SELECT * INTO
     [Database1].[dbo].[CodeProjectTmp1]
FROM [DataBase2].[dbo].[CodeProjectTmp2]



对于 INSERT INTO 以及SELECT 语句,将采用相同的逻辑.

您也可以尝试OUTPUT clause in SQL server to tweak it

单击此处以了解有关OUTPUT子句的更多信息



The same logic will workout for INSERT INTO along with a SELECT statement.

You can also try OUTPUT clause in SQL server to tweak it

click here for more about OUTPUT clause


这篇关于选定的数据移到另一个数据库.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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