Have you ever got the following SQL Insert statement issues
"There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement."
Like me you probably went and counted your columns and then counted your values and realised they were the same so spent ages scratching your head trying to figure out what on earth was going on. Well here is how I managed to reproduce the issue.
insert into myTable ([columnA], [columnB ) values (1,2)
Did you see what I did in the above statement? I left the "]" off the end of "columnB" the above statement will give you the above mentioned error message. It was pretty much a typo on my part and it took me ages to find it in a large SQL Insert statement.
Hope this helps anyone who has gone about trying to solve the above problem and found they do have equal columns and values.
Welcome to my blog, I'm a bit of a technology geek and have been in the coding/ developer/ consultancy arena for over 10 years.
I love coding, solving problems and tinkering with new technology - you could say I am passionate about technology :)
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in anyway.
Page rendered at Thursday, 23 February 2017 04:50:51 (GMT Standard Time, UTC+00:00)