sql server - Insert error in sql cursor -
i have sql server query cursor:
declare @ids table(id varchar(50)) insert @ids values ('1098264', '1098859', '1098860', '1098267', '1098265')
but when run code, error:
insert error: column name or number of supplied values not match table definition.
you have 1 column in table i.e id
, trying insert 5 column values in table.
try this
create table :
declare @ids table(id varchar(50))
insert values table :
insert @ids values ('1098264') insert @ids values ('1098859') insert @ids values ('1098860') insert @ids values ('1098267') insert @ids values ('1098265')
Comments
Post a Comment