我希望避免重写下面的相同查询(对于每个唯一表):
Insert Into dbo.DatabaseNEW (Field1 , Field 2)
Select Field 1, Field 2 FROM OldDatabase.dbo.[Table 1] WHERE DESCRIPTION LIKE 'Something';
Insert Into dbo.DatabaseNEW (Field1 , Field 2)
Select Field 1, Field 2 FROM OldDatabase.dbo.[Table 2] WHERE DESCRIPTION LIKE 'Something';
我试过组合如下查询,但它不起作用:
Insert Into dbo.DatabaseNEW (Field1 , Field 2)
Select Field 1, Field 2 FROM OldDatabase.dbo.[Table 1], OldDatabase.dbo.[Table 2] WHERE DESCRIPTION LIKE 'Something';
有什么帮助吗?对不起菜鸟问题。谢谢!