List:General Discussion« Previous MessageNext Message »
From:Dave Date:September 13 2005 4:19am
Subject:"Operand should contain 1 column" error
View as plain text  
(Topic moved from "Copying data stored in different field formats from 
one table to another")

MySQL General List,

   Server specifications:
   MySQL 4.1.3-beta, phpMyAdmin 2.5.7-pl1, PHP 4.3.8
   My specifications:
   MySQL beginner, PHP intermediate, HTML and CSS advanced.

   The situation:
   While trying to copy data over from one table to another, I have 
encountered the following error:
#1241 - Operand should contain 1 column(s)

    The query that I used which led to this error was this:
INSERT  INTO forum_members( dateRegistered, realName, ID_MEMBER, 
memberName, emailAddress, active, keitai, number, admin, cardpic, 
cardbio, hofpic, hofbio, nickname, contactMe, showMe, websiteUrl )
SELECT ( UNIX_TIMESTAMP( joindate ) , CONCAT_WS(  ' ', firstname, 
lastname ) , id, username, email, active, keitai, number, admin, 
cardpic, cardbio, hofpic, hofbio, nickname, contactMe, showMe, website )
FROM members

   The Questions:
   What do I need to do to my query to remove this error and 
successfully copy the data from one table to another.

    What I've done so far:
    Of course I looked on Google for explanations of this error. One web 
page I looked at said:
"This error will occur in cases like this:
SELECT (SELECT column1, column2 FROM t2) FROM t1;"
    But I am not running a SELECT within a SELECT.
    Other web sites all seemed to indicate this was an issue of nesting 
queries within each other, particularly SELECT within SELECT. But my 
query seems more straight forward than that, so I'm not sure if that 
advice applies.

   Any assistance is much appreciated. Thank you.

Dave
Thread
"Operand should contain 1 column" errorDave13 Sep
  • Re: "Operand should contain 1 column" errorJasper Bryant-Greene13 Sep
    • Re: "Operand should contain 1 column" error [SOLVED]Dave13 Sep
  • Re: "Operand should contain 1 column" errorPaul DuBois13 Sep
    • Re: "Operand should contain 1 column" errorDave13 Sep