alias47 Posted August 13, 2006 Share Posted August 13, 2006 I'm getting the above error with the following SQL Statement. I cannot seem to find the error in the code. The select statement does pull multiple rows.I'm using my SQL version: 4.1.19Any clue on why this isn't working?Thanks,INSERT INTO `Grants` ( `Project_Code` , `Grant_Code` , `Fiscal_Year` , `Capital` ) VALUES ((SELECT Project_Code, Grant_Code, FY, SUM( Capital ) FROM Grants_TempWHERE Project_Code = 'OSUT'AND FY = '2006'AND Claim_Month = '072006'GROUP BY Grant_CodeORDER BY Grant_Code)) Quote Link to comment https://forums.phpfreaks.com/topic/17438-1136-column-count-doesnt-match-value-count-at-row-1/ Share on other sites More sharing options...
fenway Posted August 14, 2006 Share Posted August 14, 2006 You can't mix VALUES with SELECT. Drop the extra VALUES() clause... it should read INSERT INTO...SELECT ...WHERE.... Quote Link to comment https://forums.phpfreaks.com/topic/17438-1136-column-count-doesnt-match-value-count-at-row-1/#findComment-74342 Share on other sites More sharing options...
alias47 Posted August 14, 2006 Author Share Posted August 14, 2006 Thanks fenway, that worked Quote Link to comment https://forums.phpfreaks.com/topic/17438-1136-column-count-doesnt-match-value-count-at-row-1/#findComment-74808 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.