I am trying to make an query on my database, I want to move all the rows that have eventcodes.PRIORITY=1 and g052013.WCODE=eventcodes.WCODE, as you can see I copy all the rows from the last month to the new month.
the error I get is :
#1136 - Column count doesn't match value count at row 1
and I have the same number of cols in the tables.
What I am doing wrong here?
Here is my query :
insert into g062013
select g052013.pnumber,g052013.id,
g052013.Ccode,
g052013.WCODE,
g052013.ndate,
g052013.TIMECALL,
g052013.EventHandling,
g052013.Endtimecare,
g052013.User,
g052013.TIMEARRIAVAL,
g052013.FREEDATA,
g052013.sendtime from
g052013 RIGHT JOIN eventcodes ON g052013.WCODE=eventcodes.WCODE AND eventcodes.PRIORITY='1'
WHERE gyoman052013.EventHandling!=2