只有在使用列列表且IDENTITY_INSERT为ON时,才能指定表'Gl_Transaction'中标识列的显式值。 [英] An explicit value for the identity column in table 'Gl_Transaction' can only be specified when a column list is used and IDENTITY_INSERT is ON.

查看:91
本文介绍了只有在使用列列表且IDENTITY_INSERT为ON时,才能指定表'Gl_Transaction'中标识列的显式值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AOA ...我在将值插入表格时收到此错误....

喜欢:

AOA ... i am getting this error while inserting values into table....
like:

insert into Gl_Transaction values(001,001,0010010010006,'Furniture',103 ,'Opening Balance on 01-02-2013',   '2013-02-01',   0000000026,'    JV',    20000.00,   0.00    ,NULL,  NULL,   NULL    ,12300)
insert into Gl_Transaction values(001,001,0010010010006,'Furniture',103 ,'Opening Balance on 01-02-2013',   '2013-02-01',   0000000026,'    JV',    0.00,   20000.00    ,NULL,  NULL,   NULL    ,12300)



i已经设置了表格的标识但是没有用。



喜欢:


i already set identity of table on but did not work.

like:

set identity_insert gl_Transaction On
insert into Gl_Transaction values(001,001,0010010010006,'Furniture',103 ,'Opening Balance on 01-02-2013',   '2013-02-01',   0000000026,'    JV',    20000.00,   0.00    ,NULL,  NULL,   NULL    ,12300)
insert into Gl_Transaction values(001,001,0010010010006,'Furniture',103 ,'Opening Balance on 01-02-2013',   '2013-02-01',   0000000026,'    JV',    0.00,   20000.00    ,NULL,  NULL,   NULL    ,12300)
set identity_insert gl_Transaction Off



我该怎么办? :(


what can i do?? :(

推荐答案

请仔细阅读错误消息。它说只能在使用列列表并且IDENTITY_INSERT为ON时才能指定。你有下半部分但你需要上半部分。你需要指定列列表。



Just read the error message carefully. It says "can only be specified when a column list is used and IDENTITY_INSERT is ON." You have the second half but you need the first half. You need to specify the column list.

INSERT INTO gl_Transaction (identity_field, field1, field2, field3, ...)
VALUES (001, 001, ...)


这篇关于只有在使用列列表且IDENTITY_INSERT为ON时,才能指定表'Gl_Transaction'中标识列的显式值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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