我在MSSQL中有两个数据库,并且通过将值插入第一个表的程序,我希望此过程将相同的值插入到第二个表中。
ALTER PROCEDURE [dbo].[ylk_banka_ekle]
@banka_kod varchar(25)
AS
BEGIN
INSERT INTO MikroDB_V15_TEST2.dbo.BANKALAR
(ban_RECid_DBCno, ban_RECid_RECno, ban_SpecRECNo,
ban_iptal, ban_fileid, ban_hidden, ban_kilitli, ban_degisti, ban_CheckSum,
ban_create_user, ban_create_date, ban_lastup_user, ban_lastup_date,
ban_special1, ban_special2, ban_special3, ban_kod)
SELECT
ban_RECid_DBCno, ban_RECid_RECno, ban_SpecRECNo,
ban_iptal, ban_fileid, ban_hidden, ban_kilitli, ban_degisti, ban_CheckSum,
ban_create_user, ban_create_date, ban_lastup_user, ban_lastup_date,
ban_special1, ban_special2, ban_special3, ban_kod
FROM BANKALAR
WHERE (ban_kod = @banka_kod)
UPDATE BANKALAR SET ban_RECid_RECno = ban_RECno WHERE ban_RECno !=
ban_RECid_RECno
END
GO
在sql中,当我执行此程序时,它表示只有' Command成功'但不将任何行添加到第二个数据库中。 任何人都可以知道我的错误在哪里?